csctf について
CSCTFは、AI会話の共有リンクをMarkdownと静的HTMLに変換するコマンドラインツールです。会話を保存・公開する用途向けで、コードフェンスを保ち、安定したファイル名を付け、GitHub Pagesへの公開にも対応します。
主な機能
- 01ChatGPT、Gemini、Grok、Claudeの共有リンクを変換
- 02コードフェンスを保持したMarkdownを作成
- 03目次とシンタックスハイライト付きの静的HTMLを生成
- 04出力形式、保存先、ログの設定
- 05GitHub Pagesへの公開
活用シーン
- 01共有されたAI会話をMarkdownファイルに保存
- 02閲覧・共有用の静的HTMLを生成
- 03複数の会話リンクをまとめてアーカイブ
- 04会話アーカイブをGitHub Pagesで公開
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ dicklesworthstone/ agent_flywheel_clawdbot_skills_and_integrations --skill csctfインストール後、Claude Code で/csctfを入力して読み込まれたか確認します。
同梱ファイル
SKILL.md と一緒にインストールされる参考資料やスクリプト。
references/ALGORITHMS.mdCOMMANDS.mdGITHUB-PAGES.md詳細
CSCTF — Chat Shared Conversation To File
主な機能: AI の共有リンクを、コードフェンスを保持した読みやすい Markdown と HTML に変換し、安定したファイル名を付け、オプションで GitHub Pages に公開します。
クイックスタート
# Install
curl -fsSL https://raw.githubusercontent.com/Dicklesworthstone/chat_shared_conversation_to_file/main/install.sh | bash
# Convert any share link
csctf https://chatgpt.com/share/69343092-91ac-800b-996c-7552461b9b70
出力:
<conversation_title>.md— コードフェンスを保持した読みやすい Markdown<conversation_title>.html— スタイル付きの静的 HTML(JavaScript 不使用)
正確なプロンプト — 共有リンクの変換
Convert this conversation to Markdown:
csctf <share-url>
# Example providers:
csctf https://chatgpt.com/share/69343092-91ac-800b-996c-7552461b9b70
csctf https://gemini.google.com/share/66d944b0e6b9
csctf https://grok.com/share/bGVnYWN5_d5329c61-f497-40b7-9472-c555fa71af9c
csctf https://claude.ai/share/549c846d-f6c8-411c-9039-a9a14db376cf
正確なプロンプト — GitHub Pages への公開
# Publish with defaults (creates repo if needed)
csctf <url> --publish-to-gh-pages --yes
# Save settings for future use
csctf <url> --publish-to-gh-pages --remember --yes
# Subsequent: just use --yes
csctf <url> --yes
# Custom repo
csctf <url> --publish-to-gh-pages \
--gh-pages-repo myuser/my-chats \
--gh-pages-branch main \
--yes
正確なプロンプト — 一括アーカイブ
# Archive multiple conversations
for url in $URLS; do
csctf "$url" --outfile ~/archive/ --quiet
done
# Markdown only (faster, smaller)
csctf <url> --md-only --quiet
# HTML only for embedding
csctf <url> --html-only --outfile site/chat.html
対応プロバイダー
| プロバイダー | URL パターン | 方法 |
|---|---|---|
| ChatGPT | chatgpt.com/share/* | ヘッドレス Chromium |
| Gemini | gemini.google.com/share/* | ヘッドレス Chromium |
| Grok | grok.com/share/* | ヘッドレス Chromium |
| Claude | claude.ai/share/* | お使いの Chrome セッション |
Claude.ai の特別な処理
Claude.ai は Cloudflare の保護を使用します。CSCTF が次の処理を自動的に行います:
- Chrome セッションの Cookie を一時プロファイルにコピーします
- リモートデバッグを有効にして Chrome を起動します
- Chrome DevTools Protocol 経由で会話を抽出します
要件: Chrome がインストールされ、claude.ai にログインしていること
基本コマンド
| フラグ | 説明 |
|---|---|
--outfile <path> | 出力先のパスを上書きします |
--md-only | HTML 出力を省略します |
--html-only | Markdown 出力を省略します |
--quiet | ログを最小限にします |
--timeout-ms <ms> | ページ遷移のタイムアウト(デフォルト:60000) |
--publish-to-gh-pages | GitHub Pages に公開します |
--yes | 確認プロンプトを省略します |
出力形式
Markdown
# Conversation: <Title>
**Source:** https://chatgpt.com/share/...
**Retrieved:** 2026-01-08T15:30:00Z
## User
How do I sort an array in Python?
## Assistant
Here's how to sort:
```python
my_list.sort()
### HTML Features
- **Zero JavaScript** — Safe for any hosting
- **Inline CSS** — Light/dark mode via `prefers-color-scheme`
- **Syntax highlighting** — highlight.js themes inline
- **Table of contents** — Auto-generated from headings
---
## Filename Generation
「How to Build a REST API」 → how_to_build_a_rest_api.md 「Python Tips & Tricks!」 → python_tips_tricks.md 「File exists already」 → file_exists_already_2.md
Rules: lowercase, non-alphanumerics → `_`, max 120 chars, collision suffix
---
## Performance
| Phase | Time |
|-------|------|
| First run (Chromium download) | 30-60s |
| Subsequent runs | 5-15s |
| Claude.ai (uses local Chrome) | 5-10s |
---
## Troubleshooting
| Symptom | Fix |
|---------|-----|
| "No messages found" | Link is private; verify public share |
| Bot detection | Retry; verify link in browser |
| Timeout | Raise `--timeout-ms 90000` |
| Publish fails (auth) | Ensure `gh auth status` passes |
| Claude.ai Cloudflare | Complete verification in Chrome window |
---
## Installation
```bash
# One-liner
curl -fsSL https://raw.githubusercontent.com/Dicklesworthstone/chat_shared_conversation_to_file/main/install.sh | bash
# Pin version
VERSION=v1.0.0 curl -fsSL .../install.sh | bash
# Verify checksum
curl -fsSL .../install.sh | bash -s -- --verify
参考資料
| トピック | 参考資料 |
|---|---|
| コマンドの完全なリファレンス | COMMANDS.md |
| 処理アルゴリズム | ALGORITHMS.md |
| GitHub Pages のセットアップ | GITHUB-PAGES.md |
コメント
Markdown 対応