baoyu-danger-x-to-markdown
できること
このスキルは、ツイート、スレッド、X Articlesを読みやすいマークダウンファイルに変換します。Xの投稿を保存またはアーカイブしたい人向けです。
使う場面
- ✓ツイートやスレッドをマークダウンファイルとして保存したいとき。
- ✓読みやすいテキストとして残したいX Articleがあるとき。
- ✓変換したいx.comまたはtwitter.comのリンクがあるとき。
スキルのリンク
https://github.com/JimLiu/baoyu-skills/blob/main/skills/baoyu-danger-x-to-markdown/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“この日付と著者をヘッダーに入れて、このツイートのスレッドをマークダウンファイルとして保存してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは同意の条件を受け入れたかを確認し、リバースエンジニアリングされた接続を通じて投稿を取得し、ヘッダー付きのマークダウンとして書き出します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
X to Markdown
Tweets/threads → markdown with YAML front matter; X Articles → full content.
User Input Tools
When this skill prompts the user, follow this tool-selection rule (priority order):
- Prefer built-in user-input tools exposed by the current agent runtime — e.g.,
AskUserQuestion,request_user_input,clarify,ask_user, or any equivalent. - Fallback: if no such tool exists, emit a numbered plain-text message and ask the user to reply with the chosen number/answer for each question.
- Batching: if the tool supports multiple questions per call, combine all applicable questions into a single call; if only single-question, ask them one at a time in priority order.
Concrete AskUserQuestion references below are examples — substitute the local equivalent in other runtimes.
Script Directory
{baseDir}= this SKILL.md's directory; script ={baseDir}/scripts/main.ts${BUN_X}=bunif installed; elsenpx -y bunifnpxavailable; else suggest installing bun
Consent Requirement (before any conversion)
- Read the consent file:
- macOS:
~/Library/Application\ Support/baoyu-skills/x-to-markdown/consent.json - Linux:
~/.local/share/baoyu-skills/x-to-markdown/consent.json
- macOS:
accepted: trueanddisclaimerVersion: "1.0"→ printWarning: Using reverse-engineered X API. Accepted on: <acceptedAt>and proceed.- Missing or version mismatch → show this disclaimer and ask "Yes, I accept" | "No, I decline":
DISCLAIMER This tool uses a reverse-engineered X API, NOT official. Risks: - May break if X changes API - No guarantees or support - Possible account restrictions - Use at your own risk Accept terms and continue? - Accept → write the consent file:
{ "version": 1, "accepted": true, "acceptedAt": "<ISO timestamp>", "disclaimerVersion": "1.0" } - Decline → output "User declined. Exiting." and stop.
Preferences (EXTEND.md)
First one found wins:
| Priority | Path | Scope |
|---|---|---|
| 1 | .baoyu-skills/baoyu-danger-x-to-markdown/EXTEND.md |
Project |
| 2 | ${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-danger-x-to-markdown/EXTEND.md |
XDG |
| 3 | $HOME/.baoyu-skills/baoyu-danger-x-to-markdown/EXTEND.md |
User home |
Found → read and apply. Not found → BLOCKING first-time setup: ask the questions in references/config/first-time-setup.md (Media, Output, Save — all in one call) before any conversion, write EXTEND.md at the chosen location, confirm "Preferences saved to [path]", then continue. Never create EXTEND.md with defaults without asking.
| Key | Default | Values |
|---|---|---|
download_media |
ask |
ask (prompt each time) / 1 (always) / 0 (never) |
default_output_dir |
empty (= ./x-to-markdown/) |
path or empty |
Value priority: CLI arguments (--download-media, -o) → EXTEND.md → skill defaults.
Usage
${BUN_X} {baseDir}/scripts/main.ts <url>
${BUN_X} {baseDir}/scripts/main.ts <url> -o output.md
${BUN_X} {baseDir}/scripts/main.ts <url> --download-media
${BUN_X} {baseDir}/scripts/main.ts <url> --json
| Option | Description |
|---|---|
<url> |
Tweet or article URL |
-o <path> |
Output path |
--json |
JSON output |
--download-media |
Download images/videos to local imgs/ and videos/ next to the markdown, rewrite links to local relative paths |
--login |
Refresh cookies only |
Supported URLs: https://x.com/<user>/status/<id>, https://twitter.com/<user>/status/<id>, https://x.com/i/article/<id>
Output
---
url: "https://x.com/user/status/123"
author: "Name (@user)"
tweetCount: 3
coverImage: "https://pbs.twimg.com/media/example.jpg"
---
Content...
File structure: x-to-markdown/{username}/{tweet-id}/{content-slug}.md
Media Download
By EXTEND.md download_media: 1 → run with --download-media; 0 → run without; ask (default):
- Run without
--download-media→ markdown saved - Check it for remote media (
https://image/video links); none → done, no prompt - Otherwise ask (header "Media", question "Download N images/videos to local files?"): "Yes" — download to local directories / "No" — keep remote URLs
- Yes → rerun with
--download-media(overwrites markdown with localized links)
Authentication
- Environment variables (preferred): `X_AUTH_TOKE
よくある質問
なぜ同意が必要なのですか?
このスキルはリバースエンジニアリングされたXの接続を使うため、初回の利用時に利用規約への同意を求めます。
ファイルには何が含まれますか?
投稿に関する詳細を記した、ファイル先頭のYAMLフロントマターと、その本文が含まれます。
X Articlesも全文保存できますか?
はい。このスキルは、ツイートやスレッドだけでなく、X Articlesも全文に変換します。
詳細
作者による元の説明
Converts X (Twitter) tweets and articles to markdown with YAML front matter. Uses reverse-engineered API requiring user consent. Use when user mentions "X to markdown", "tweet to markdown", "save tweet", or provides x.com/twitter.com URLs for conversion.
repo: JimLiu/baoyu-skills
人気
- GitHubのスター
- 27k
- ランキング
- #9953
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
release-skills
27kエージェントが、バージョンの更新、変更履歴の更新、GitHubのリリースやタグの公開まで、どのプロジェクトでもリリース作業を案内します。
baoyu-article-illustrator
27kエージェントが、記事の中で図版が役立つ箇所を見つけ、同じスタイルで画像を作って、記事にイラストを追加できるよう支援します。
baoyu-comic
27kエージェントが、パネル、画風、トーンを使って、伝記やチュートリアルなどの教育的なコミックを作れるよう支援します。
baoyu-compress-image
27kエージェントが、画像をWebPまたはPNGに変換して、自動的に選ばれたツールでファイルサイズを縮め、読み込みを速くできるよう支援します。
似ているスキル
tavily
394kTavilyでウェブを検索し、特定のWebページから本文を取り出すようエージェントを支援します。深さ、ドメイン、日付のオプションも使えます。
blogwatcher
394kブログやRSS・Atomフィードを追跡し、新しい記事を確認して、読んだ記事に印を付けるようエージェントを支援します。
data-scraper-agent
280kエージェントが公開されているさまざまな情報源からデータを自動で収集できるよう支援します。スケジュール実行、情報の補強、結果の保存が可能です。オンラインデータの監視や追跡に役立ちます。