Back to Skills

csctf

majiayu000
Updated Today
1 views
58
9
58
View on GitHub
Documentationai

About

csctf converts public AI chat share links from ChatGPT, Gemini, Grok, and Claude into clean Markdown and HTML transcripts with preserved code blocks. It uses headless browsers for reliable scraping and generates portable files with deterministic naming. Developers can use it to archive or publish conversations from multiple AI providers in a standardized format.

Quick Install

Claude Code

Recommended
Plugin CommandRecommended
/plugin add https://github.com/majiayu000/claude-skill-registry
Git CloneAlternative
git clone https://github.com/majiayu000/claude-skill-registry.git ~/.claude/skills/csctf

Copy and paste this command in Claude Code to install this skill

Documentation

csctf 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

ProviderURL PatternMethod
ChatGPTchatgpt.com/share/*Headless Chromium
Geminigemini.google.com/share/*Headless Chromium
Grokgrok.com/share/*Headless Chromium
Claudeclaude.ai/share/*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:

  • <conversation_title>.md - Clean Markdown with preserved code fences
  • <conversation_title>.html - Styled static HTML (no JavaScript)

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 (gh) installed and authenticated
  • Run gh auth status to verify

All Flags

FlagDefaultDescription
--timeout-ms60000Navigation + selector timeout
--outfileautoOverride output path
--no-html / --md-onlyoffSkip HTML output
--html-onlyoffSkip Markdown output
--quietoffMinimal logging
--check-updatesoffCheck for new version
--versionPrint version
--publish-to-gh-pagesoffPublish to GitHub Pages
--gh-pages-repoautoTarget repo (owner/name)
--gh-pages-branchgh-pagesTarget branch
--gh-pages-dircsctfSubdirectory in repo
--rememberoffSave GH settings
--forget-gh-pagesoffClear saved settings
--dry-runoffSimulate publish
--yesoffSkip confirmation prompt
--gh-installoffAuto-install gh 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:

  1. Copying your Chrome session cookies to a temp profile
  2. Launching Chrome with remote debugging
  3. 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

IssueSolution
"No messages found"Link may be private or expired; verify it opens in browser
Timeout errorsUse --timeout-ms 90000 for slow/large conversations
Claude.ai won't loadEnsure you're logged into claude.ai in Chrome
Cloudflare challengeComplete challenge in Chrome window, press Enter
Publish auth failsRun gh auth status to verify GitHub CLI login
Filename collisionsNormal - tool appends _2, _3, etc.

File Locations

  • Config: ~/.config/csctf/config.json (GitHub Pages settings)
  • Playwright cache: ~/.cache/ms-playwright/
  • Output: Current directory (or --outfile path)

Requirements

  • Bun 1.3+ or prebuilt binary
  • macOS, Linux, or Windows
  • Chrome (for Claude.ai shares only)
  • GitHub CLI (gh) for publishing (optional)

GitHub Repository

majiayu000/claude-skill-registry
Path: skills/csctf

Related Skills

sglang

Meta

SGLang is a high-performance LLM serving framework that specializes in fast, structured generation for JSON, regex, and agentic workflows using its RadixAttention prefix caching. It delivers significantly faster inference, especially for tasks with repeated prefixes, making it ideal for complex, structured outputs and multi-turn conversations. Choose SGLang over alternatives like vLLM when you need constrained decoding or are building applications with extensive prefix sharing.

View skill

evaluating-llms-harness

Testing

This Claude Skill runs the lm-evaluation-harness to benchmark LLMs across 60+ standardized academic tasks like MMLU and GSM8K. It's designed for developers to compare model quality, track training progress, or report academic results. The tool supports various backends including HuggingFace and vLLM models.

View skill

langchain

Meta

LangChain is a framework for building LLM applications using agents, chains, and RAG pipelines. It supports multiple LLM providers, offers 500+ integrations, and includes features like tool calling and memory management. Use it for rapid prototyping and deploying production systems like chatbots, autonomous agents, and question-answering services.

View skill

llamaguard

Other

LlamaGuard is Meta's 7-8B parameter model for moderating LLM inputs and outputs across six safety categories like violence and hate speech. It offers 94-95% accuracy and can be deployed using vLLM, Hugging Face, or Amazon SageMaker. Use this skill to easily integrate content filtering and safety guardrails into your AI applications.

View skill