browser-session-archive

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

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "browser-session-archive" with this command: npx skills add guobaba1/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

# 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

# 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

VariableDescriptionDefault
CHROME_DEBUG_PORTChrome debugging port9222
TARGET_URLShare link URL(required)
OUTPUT_DIROutput 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

    # macOS
    open -a "Google Chrome" --args --remote-debugging-port=9222
    
    # Linux
    google-chrome --remote-debugging-port=9222
    
  2. Install Dependencies:

    npm install -g ws
    

Error Handling

ErrorCauseSolution
Connection refusedChrome debug port not openStart Chrome with --remote-debugging-port
TimeoutPage loading slowIncrease wait time or refresh manually
Target not foundInvalid linkVerify the share link is correct

Scripts

ScriptDescription
capture-cdp.jsCDP capture script, extracts HTML
convert-markdown.jsHTML to Markdown converter
extract.shOne-click entry script

References

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

AutoClaw Browser Automation

Complete browser automation skill with MCP protocol support and Chrome extension

Registry SourceRecently Updated
1K0Profile unavailable
Automation

WSL Chrome CDP

自动检测并启动 Windows Chrome 调试模式,实现 WSL2 环境下对 Chrome 浏览器的无缝远程控制。

Registry SourceRecently Updated
4400Profile unavailable
Automation

Virtual Desktop Pro v4 -- Universal Browser Execution

Persistent authenticated browser for OpenClaw via kasmweb/chrome Docker sidecar. Principal logs in once via noVNC — sessions saved permanently in Docker volu...

Registry SourceRecently Updated
2540Profile unavailable
Automation

Web Intel

网络搜索与信息提取统一入口。整合 content-extraction、Jina Reader、Firecrawl、web-access CDP。自动选最经济工具链。可被 BMW(brand-marketing-workflow)、wealth 子代理等直接调用。

Registry SourceRecently Updated
980Profile unavailable