返回顶部
b

browser-session-archive

Extracts and archives chatgpt.com and claude.ai share links to Markdown using Chrome CDP (e.g., ChatGPT or Claude conversations).

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.1
安全检测
已通过
101
下载量
0
收藏
概述
安装方式
版本历史

browser-session-archive

# Browser Session Archive Extracts and archives chatgpt.com and claude.ai share links to Markdown using Chrome DevTools Protocol. ## Triggers User message contains: 1. **Keywords**: `提取 chatgpt`, `提取 claude`, `提取文档`, `提取 chatgpt 对话`, `提取 claude 对话`, `归档 chatgpt 对话`, `归档 claude 对话`, `保存 chatgpt 对话`, `保存 claude 对话`, `extract chatgpt`, `extract claude`, `archive chatgpt`, `archive claude`, `save chatgpt`, `save claude` 2. **Links**: - `https://chatgpt.com/share/{share-id}` - `https://claude.ai/share/{share-id}` ## Usage ### Quick Start ```bash # Copy script to PATH cp {baseDir}/scripts/extract.sh /usr/local/bin/ chmod +x /usr/local/bin/extract.sh # Run extract.sh "https://chatgpt.com/share/xxx" extract.sh "https://claude.ai/share/xxx" ``` ### Step by Step ```bash # 1. Capture HTML cd {baseDir}/scripts CHROME_DEBUG_PORT=9222 TARGET_URL="https://chatgpt.com/share/xxx" \ node capture-cdp.js # 2. Convert to Markdown (use output path from step 1) node convert-markdown.js --metadata "~/LookBack/$(date +%Y-%m-%d)/ChatGPT/.metadata.json" ``` ## Environment Variables | Variable | Description | Default | |----------|-------------|---------| | `CHROME_DEBUG_PORT` | Chrome debugging port | `9222` | | `TARGET_URL` | Share link URL | (required) | | `OUTPUT_DIR` | Output directory | `~/LookBack/{date}/{ChatGPT\|Claude}` | ## Output Structure ``` ~/LookBack/{YYYY-MM-DD}/ ├── ChatGPT/ │ ├── {title}-{timestamp}.md # Markdown file │ ├── {title}-{timestamp}-captured.html # HTML snapshot │ └── .metadata.json # Metadata └── Claude/ └── ... ``` ## Prerequisites 1. **Chrome Debug Mode**: Start Chrome with `--remote-debugging-port=9222` ```bash # macOS open -a "Google Chrome" --args --remote-debugging-port=9222 # Linux google-chrome --remote-debugging-port=9222 ``` 2. **Install Dependencies**: ```bash npm install -g ws ``` ## Error Handling | Error | Cause | Solution | |-------|-------|----------| | Connection refused | Chrome debug port not open | Start Chrome with `--remote-debugging-port` | | Timeout | Page loading slow | Increase wait time or refresh manually | | Target not found | Invalid link | Verify the share link is correct | ## Scripts | Script | Description | |--------|-------------| | `capture-cdp.js` | CDP capture script, extracts HTML | | `convert-markdown.js` | HTML to Markdown converter | | `extract.sh` | One-click entry script | ## References - [Chrome DevTools Protocol](https://chromedevtools.github.io/devtools-protocol/) - [OpenClaw Skills](https://docs.openclaw.ai/tools/skills)

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 browser-session-archive-1776009317 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 browser-session-archive-1776009317 技能

通过命令行安装

skillhub install browser-session-archive-1776009317

下载 Zip 包

⬇ 下载 browser-session-archive v1.0.1

文件大小: 13.07 KB | 发布时间: 2026-4-13 09:34

v1.0.1 最新 2026-4-13 09:34
1. Added more trigger keywords to SKILL.
2. Added a "silent mode" for the browser in capture-cdp.js.
3. Fixed formatting loss issues in convert-markdown.js.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部