baoyu-danger-x-to-markdown
X(旧Twitter)のツイートや記事のURLを、Markdown形式に変換して、コンテンツを再利用しやすくするSkill。ただし、利用にはユーザーの同意が必要となる点に注意が必要です。
📜 元の英語説明(参考)
Convert X (Twitter) tweet or article URL to markdown. Uses reverse-engineered X API (private). Requires user consent before use.
🇯🇵 日本人クリエイター向け解説
X(旧Twitter)のツイートや記事のURLを、Markdown形式に変換して、コンテンツを再利用しやすくするSkill。ただし、利用にはユーザーの同意が必要となる点に注意が必要です。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o baoyu-danger-x-to-markdown.zip https://jpskill.com/download/19385.zip && unzip -o baoyu-danger-x-to-markdown.zip && rm baoyu-danger-x-to-markdown.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/19385.zip -OutFile "$d\baoyu-danger-x-to-markdown.zip"; Expand-Archive "$d\baoyu-danger-x-to-markdown.zip" -DestinationPath $d -Force; ri "$d\baoyu-danger-x-to-markdown.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
baoyu-danger-x-to-markdown.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
baoyu-danger-x-to-markdownフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 14
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
XをMarkdownに変換
X (Twitter) のコンテンツをMarkdown形式に変換します。
- ツイートスレッド → YAMLフロントマター付きMarkdown
- X記事 → 記事コンテンツの完全抽出
スクリプトディレクトリ
重要: すべてのスクリプトは、このスキル内の scripts/ サブディレクトリにあります。
エージェント実行手順:
- この
SKILL.mdファイルのディレクトリパスをSKILL_DIRとして特定します。 - スクリプトパス =
${SKILL_DIR}/scripts/<script-name>.ts - このドキュメント内のすべての
${SKILL_DIR}を実際のパスに置き換えます。
スクリプト参照:
| スクリプト | 目的 |
|--------|---------|
| scripts/main.ts | URL変換のためのCLIエントリーポイント |
⚠️ 免責事項 (必須)
このスキルを使用する前に、同意確認を必ず実行してください。
同意確認フロー
ステップ1: 同意ファイルを確認します。
# macOS
cat ~/Library/Application\ Support/baoyu-skills/x-to-markdown/consent.json 2>/dev/null
# Linux
cat ~/.local/share/baoyu-skills/x-to-markdown/consent.json 2>/dev/null
# Windows (PowerShell)
Get-Content "$env:APPDATA\baoyu-skills\x-to-markdown/consent.json" 2>$null
ステップ2: 同意が存在し、accepted: true かつ disclaimerVersion: "1.0" が一致する場合:
警告を表示して続行します。
⚠️ Warning: Using reverse-engineered X API (not official). Accepted on: <acceptedAt date>
ステップ3: 同意ファイルが存在しない、または disclaimerVersion が一致しない場合:
免責事項を表示し、ユーザーに尋ねます。
⚠️ DISCLAIMER
このツールは、公式APIではなく、リバースエンジニアリングされたX (Twitter) APIを使用しています。
リスク:
- XがAPIを変更した場合、予告なく動作しなくなる可能性があります。
- 公式サポートや保証はありません。
- APIの使用が検出された場合、アカウント制限の可能性があります。
- 自己責任でご使用ください。
これらの条件を受け入れ、続行しますか?
AskUserQuestion ツールを以下のオプションで使用します。
- Yes, I accept - 続行し、同意を保存します。
- No, I decline - 直ちに終了します。
ステップ4: 同意した場合、同意ファイルを作成します。
# macOS
mkdir -p ~/Library/Application\ Support/baoyu-skills/x-to-markdown
cat > ~/Library/Application\ Support/baoyu-skills/x-to-markdown/consent.json << 'EOF'
{
"version": 1,
"accepted": true,
"acceptedAt": "<ISO timestamp>",
"disclaimerVersion": "1.0"
}
EOF
# Linux
mkdir -p ~/.local/share/baoyu-skills/x-to-markdown
cat > ~/.local/share/baoyu-skills/x-to-markdown/consent.json << 'EOF'
{
"version": 1,
"accepted": true,
"acceptedAt": "<ISO timestamp>",
"disclaimerVersion": "1.0"
}
EOF
ステップ5: 拒否した場合、メッセージを出力して停止します。
User declined the disclaimer. Exiting.
使用方法
# ツイートを変換 (Markdownパスを出力)
npx -y bun ${SKILL_DIR}/scripts/main.ts <url>
# 特定のファイルに保存
npx -y bun ${SKILL_DIR}/scripts/main.ts <url> -o output.md
# JSON出力
npx -y bun ${SKILL_DIR}/scripts/main.ts <url> --json
オプション
| オプション | 説明 |
|---|---|
<url> |
ツイートまたは記事のURL |
-o <path> |
出力パス (ファイルまたはディレクトリ) |
--json |
JSON形式で出力 |
--login |
クッキーのみを更新 |
ファイル構造
x-to-markdown/
└── {username}/
└── {tweet-id}.md
サポートされているURL
https://x.com/<user>/status/<id>https://twitter.com/<user>/status/<id>https://x.com/i/article/<id>
出力形式
---
url: https://x.com/username/status/123
author: "Display Name (@username)"
tweet_count: 3
---
Tweet content...
---
Thread continuation...
認証
オプション1: 環境変数 (推奨)
X_AUTH_TOKEN-auth_tokenクッキーX_CT0-ct0クッキー
オプション2: Chromeログイン (環境変数が設定されていない場合、自動)
- 初回実行時にログインのためにChromeが開きます。
- クッキーはローカルにキャッシュされます。
拡張機能のサポート
EXTEND.md を介したカスタム設定。
パスの確認 (優先順位):
.baoyu-skills/baoyu-danger-x-to-markdown/EXTEND.md(プロジェクト)~/.baoyu-skills/baoyu-danger-x-to-markdown/EXTEND.md(ユーザー)
見つかった場合、ワークフローの前にロードされます。拡張機能のコンテンツはデフォルトを上書きします。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
X to Markdown
Converts X (Twitter) content to markdown format:
- Tweet threads → Markdown with YAML front matter
- X Articles → Full article content extraction
Script Directory
Important: All scripts are located in the scripts/ subdirectory of this skill.
Agent Execution Instructions:
- Determine this SKILL.md file's directory path as
SKILL_DIR - Script path =
${SKILL_DIR}/scripts/<script-name>.ts - Replace all
${SKILL_DIR}in this document with the actual path
Script Reference:
| Script | Purpose |
|--------|---------|
| scripts/main.ts | CLI entry point for URL conversion |
⚠️ Disclaimer (REQUIRED)
Before using this skill, the consent check MUST be performed.
Consent Check Flow
Step 1: Check consent file
# macOS
cat ~/Library/Application\ Support/baoyu-skills/x-to-markdown/consent.json 2>/dev/null
# Linux
cat ~/.local/share/baoyu-skills/x-to-markdown/consent.json 2>/dev/null
# Windows (PowerShell)
Get-Content "$env:APPDATA\baoyu-skills\x-to-markdown\consent.json" 2>$null
Step 2: If consent exists and accepted: true with matching disclaimerVersion: "1.0":
Print warning and proceed:
⚠️ Warning: Using reverse-engineered X API (not official). Accepted on: <acceptedAt date>
Step 3: If consent file doesn't exist or disclaimerVersion mismatch:
Display disclaimer and ask user:
⚠️ DISCLAIMER
This tool uses a reverse-engineered X (Twitter) API, NOT an official API.
Risks:
- May break without notice if X changes their API
- No official support or guarantees
- Account restrictions possible if API usage detected
- Use at your own risk
Do you accept these terms and wish to continue?
Use AskUserQuestion tool with options:
- Yes, I accept - Continue and save consent
- No, I decline - Exit immediately
Step 4: On acceptance, create consent file:
# macOS
mkdir -p ~/Library/Application\ Support/baoyu-skills/x-to-markdown
cat > ~/Library/Application\ Support/baoyu-skills/x-to-markdown/consent.json << 'EOF'
{
"version": 1,
"accepted": true,
"acceptedAt": "<ISO timestamp>",
"disclaimerVersion": "1.0"
}
EOF
# Linux
mkdir -p ~/.local/share/baoyu-skills/x-to-markdown
cat > ~/.local/share/baoyu-skills/x-to-markdown/consent.json << 'EOF'
{
"version": 1,
"accepted": true,
"acceptedAt": "<ISO timestamp>",
"disclaimerVersion": "1.0"
}
EOF
Step 5: On decline, output message and stop:
User declined the disclaimer. Exiting.
Usage
# Convert tweet (outputs markdown path)
npx -y bun ${SKILL_DIR}/scripts/main.ts <url>
# Save to specific file
npx -y bun ${SKILL_DIR}/scripts/main.ts <url> -o output.md
# JSON output
npx -y bun ${SKILL_DIR}/scripts/main.ts <url> --json
Options
| Option | Description |
|---|---|
<url> |
Tweet or article URL |
-o <path> |
Output path (file or dir) |
--json |
Output as JSON |
--login |
Refresh cookies only |
File Structure
x-to-markdown/
└── {username}/
└── {tweet-id}.md
Supported URLs
https://x.com/<user>/status/<id>https://twitter.com/<user>/status/<id>https://x.com/i/article/<id>
Output Format
---
url: https://x.com/username/status/123
author: "Display Name (@username)"
tweet_count: 3
---
Tweet content...
---
Thread continuation...
Authentication
Option 1: Environment variables (recommended)
X_AUTH_TOKEN- auth_token cookieX_CT0- ct0 cookie
Option 2: Chrome login (auto if env vars not set)
- First run opens Chrome for login
- Cookies cached locally
Extension Support
Custom configurations via EXTEND.md.
Check paths (priority order):
.baoyu-skills/baoyu-danger-x-to-markdown/EXTEND.md(project)~/.baoyu-skills/baoyu-danger-x-to-markdown/EXTEND.md(user)
If found, load before workflow. Extension content overrides defaults.
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (4,124 bytes)
- 📎 scripts/constants.ts (6,708 bytes)
- 📎 scripts/cookie-file.ts (2,449 bytes)
- 📎 scripts/cookies.ts (13,902 bytes)
- 📎 scripts/graphql.ts (12,854 bytes)
- 📎 scripts/http.ts (3,527 bytes)
- 📎 scripts/main.ts (12,171 bytes)
- 📎 scripts/markdown.ts (8,560 bytes)
- 📎 scripts/paths.ts (1,507 bytes)
- 📎 scripts/thread-markdown.ts (8,212 bytes)
- 📎 scripts/thread.ts (8,942 bytes)
- 📎 scripts/tweet-article.ts (2,936 bytes)
- 📎 scripts/tweet-to-markdown.ts (5,605 bytes)
- 📎 scripts/types.ts (1,477 bytes)