Claude-skill-registry csctf
Chat Shared Conversation To File - convert ChatGPT, Gemini, Grok, and Claude share links to clean Markdown + HTML transcripts with preserved code fences.
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/csctf" ~/.claude/skills/majiayu000-claude-skill-registry-csctf && rm -rf "$T"
skills/data/csctf/SKILL.mdcsctf Skill
Convert public AI chat share links into clean, portable Markdown and HTML files. Preserves code blocks with language detection, generates deterministic filenames, and optionally publishes to GitHub Pages.
Supported Providers
| Provider | URL Pattern | Method |
|---|---|---|
| ChatGPT | | Headless Chromium |
| Gemini | | Headless Chromium |
| Grok | | Headless Chromium |
| Claude | | Your Chrome (uses session cookies) |
Basic Usage
# Convert any share link to Markdown + HTML csctf https://chatgpt.com/share/69343092-91ac-800b-996c-7552461b9b70 # Gemini conversation csctf https://gemini.google.com/share/66d944b0e6b9 # Grok conversation csctf https://grok.com/share/bGVnYWN5_d5329c61-f497-40b7-9472-c555fa71af9c # Claude conversation (requires Chrome login) csctf https://claude.ai/share/549c846d-f6c8-411c-9039-a9a14db376cf
Output:
- Clean Markdown with preserved code fences<conversation_title>.md
- Styled static HTML (no JavaScript)<conversation_title>.html
Output Options
# Markdown only (skip HTML) csctf <url> --md-only # HTML only (skip Markdown) csctf <url> --html-only # Custom output path csctf <url> --outfile ~/exports/my_chat.md # Quiet mode (minimal logging) csctf <url> --quiet
Timeout Control
# Default is 60 seconds csctf <url> --timeout-ms 60000 # For slow/large conversations csctf <url> --timeout-ms 90000 # Very long conversations csctf <url> --timeout-ms 120000
GitHub Pages Publishing
Publish conversations to a GitHub Pages site with auto-generated index:
# Publish with defaults (creates my_shared_conversations repo) csctf <url> --publish-to-gh-pages --yes # Custom repo csctf <url> --publish-to-gh-pages --gh-pages-repo myuser/my-chats --yes # Custom branch and directory csctf <url> --publish-to-gh-pages --gh-pages-branch main --gh-pages-dir exports --yes # Remember settings for future runs csctf <url> --publish-to-gh-pages --remember --yes # Then just use --yes for subsequent runs csctf <url> --yes # Clear remembered settings csctf --forget-gh-pages # Dry run (build index without pushing) csctf <url> --publish-to-gh-pages --dry-run
Requirements for publishing:
- GitHub CLI (
) installed and authenticatedgh - Run
to verifygh auth status
All Flags
| Flag | Default | Description |
|---|---|---|
| | Navigation + selector timeout |
| auto | Override output path |
/ | off | Skip HTML output |
| off | Skip Markdown output |
| off | Minimal logging |
| off | Check for new version |
| — | Print version |
| off | Publish to GitHub Pages |
| auto | Target repo (owner/name) |
| | Target branch |
| | Subdirectory in repo |
| off | Save GH settings |
| off | Clear saved settings |
| off | Simulate publish |
| off | Skip confirmation prompt |
| off | Auto-install CLI |
Output Format
Markdown Structure
# Conversation: <Title> **Source:** https://chatgpt.com/share/... **Retrieved:** 2026-01-04T15:30:00Z ## User How do I sort an array in Python? ## Assistant Here's how to sort an array in Python: ```python # Sort in place my_list.sort() # Return new sorted list sorted_list = sorted(my_list)
### HTML Features - Standalone (no external dependencies) - Zero JavaScript - Inline CSS with light/dark mode support - Syntax highlighting via highlight.js (inline) - Table of contents - Print-friendly styles - Language badges on code blocks ## Filename Generation Filenames are automatically generated from conversation titles: - Lowercased - Non-alphanumerics → `_` - Trimmed, max 120 chars - Collision handling: `_2`, `_3`, etc. Examples:
"How to Build a REST API" → how_to_build_a_rest_api.md "Python Tips & Tricks!" → python_tips_tricks.md
## Clawdbot Workflows ### "Save this ChatGPT conversation"
User: Can you save this conversation? https://chatgpt.com/share/abc123...
Clawdbot: Uses csctf to download and convert csctf "https://chatgpt.com/share/abc123..." --outfile ~/Documents/chats/
### "Archive all my shared chats" ```bash # Save multiple conversations csctf https://chatgpt.com/share/abc... --outfile ~/archive/ csctf https://gemini.google.com/share/xyz... --outfile ~/archive/ csctf https://claude.ai/share/def... --outfile ~/archive/
"Publish to my blog"
csctf https://chatgpt.com/share/abc... \ --publish-to-gh-pages \ --gh-pages-repo myuser/ai-conversations \ --yes
"Quick export for reference"
# Just get the markdown, skip HTML csctf https://chatgpt.com/share/abc... --md-only --quiet
Performance Notes
- First run: Downloads Playwright Chromium (~200MB, cached)
- Subsequent runs: 5-15 seconds depending on conversation length
- Claude.ai: Uses your installed Chrome (bypasses Cloudflare)
Claude.ai Special Handling
Claude.ai uses Cloudflare protection. csctf handles this by:
- Copying your Chrome session cookies to a temp profile
- Launching Chrome with remote debugging
- Extracting conversation via Chrome DevTools Protocol
Requirements:
- Chrome installed
- Logged into claude.ai in your regular Chrome session
- If Chrome is running, tool will offer to save tabs, restart, and restore
Troubleshooting
| Issue | Solution |
|---|---|
| "No messages found" | Link may be private or expired; verify it opens in browser |
| Timeout errors | Use for slow/large conversations |
| Claude.ai won't load | Ensure you're logged into claude.ai in Chrome |
| Cloudflare challenge | Complete challenge in Chrome window, press Enter |
| Publish auth fails | Run to verify GitHub CLI login |
| Filename collisions | Normal - tool appends , , etc. |
File Locations
- Config:
(GitHub Pages settings)~/.config/csctf/config.json - Playwright cache:
~/.cache/ms-playwright/ - Output: Current directory (or
path)--outfile
Requirements
- Bun 1.3+ or prebuilt binary
- macOS, Linux, or Windows
- Chrome (for Claude.ai shares only)
- GitHub CLI (
) for publishing (optional)gh