运行时依赖
安装命令
点击复制技能文档
Browser 会话 归档
提取s and 归档s chatgpt.com and claude.AI 分享 links to Markdown using Chrome Dev工具s Protocol.
Triggers
User message contAIns:
Keywords: 提取 chatgpt, 提取 claude, 提取文档, 提取 chatgpt 对话, 提取 claude 对话, 归档 chatgpt 对话, 归档 claude 对话, 保存 chatgpt 对话, 保存 claude 对话, 提取 chatgpt, 提取 claude, 归档 chatgpt, 归档 claude, save chatgpt, save claude Links: https://chatgpt.com/分享/{分享-id} https://claude.AI/分享/{分享-id} Usage Quick 启动 # Copy script to PATH cp {baseDir}/scripts/提取.sh /usr/local/bin/ chmod +x /usr/local/bin/提取.sh
# 运行 提取.sh "https://chatgpt.com/分享/xxx" 提取.sh "https://claude.AI/分享/xxx"
Step by Step # 1. Capture HTML cd {baseDir}/scripts CHROME_调试_PORT=9222 TAR获取_URL="https://chatgpt.com/分享/xxx" \ node capture-cdp.js
# 2. Convert to Markdown (use 输出 path from step 1) node convert-markdown.js --metadata "~/LookBack/$(date +%Y-%m-%d)/ChatGPT/.metadata.json"
环境 Variables Variable Description Default CHROME_调试_PORT Chrome 调试ging port 9222 TAR获取_URL 分享 link URL (required) 输出_DIR 输出 directory ~/LookBack/{date}/{ChatGPT|Claude} 输出 Structure ~/LookBack/{YYYY-MM-DD}/ ├── ChatGPT/ │ ├── {title}-{timestamp}.md # Markdown file │ ├── {title}-{timestamp}-captured.html # HTML snapshot │ └── .metadata.json # Metadata └── Claude/ └── ...
Prerequisites
Chrome 调试 Mode: 启动 Chrome with --remote-调试ging-port=9222
# macOS open -a "Google Chrome" --args --remote-调试ging-port=9222
# Linux google-chrome --remote-调试ging-port=9222
安装 Dependencies:
npm 安装 -g ws
Error Handling Error Cause Solution Connection refused Chrome 调试 port not open 启动 Chrome with --remote-调试ging-port Timeout Page loading slow Increase wAIt time or refresh manually Tar获取 not found Invalid link 验证 the 分享 link is correct Scripts Script Description capture-cdp.js CDP capture script, 提取s HTML convert-markdown.js HTML to Markdown 转换器 提取.sh One-命令行工具ck entry script References Chrome Dev工具s Protocol OpenClaw 技能s