Converts X (Twitter) tweets, threads, and articles to markdown with YAML front matter. Requires user consent for reverse-engineered API usage.
Ships in baoyu-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Tweets/threads → markdown with YAML front matter; X Articles → full content.
When this skill prompts the user, follow this tool-selection rule (priority order):
AskUserQuestion, request_user_input, clarify, ask_user, or any equivalent.Concrete AskUserQuestion references below are examples — substitute the local equivalent in other runtimes.
{baseDir} = this SKILL.md's directory; script = {baseDir}/scripts/main.ts${BUN_X} = bun if installed; else npx -y bun if npx available; else suggest installing bun~/Library/Application\ Support/baoyu-skills/x-to-markdown/consent.json~/.local/share/baoyu-skills/x-to-markdown/consent.jsonaccepted: true and disclaimerVersion: "1.0" → print Warning: Using reverse-engineered X API. Accepted on: <acceptedAt> and proceed.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?
{
"version": 1,
"accepted": true,
"acceptedAt": "<ISO timestamp>",
"disclaimerVersion": "1.0"
}
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.
${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>
---
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
By EXTEND.md download_media: 1 → run with --download-media; 0 → run without; ask (default):
--download-media → markdown savedhttps:// image/video links); none → done, no prompt--download-media (overwrites markdown with localized links)X_AUTH_TOKEN, X_CT0Custom configurations via EXTEND.md — see Preferences above.
references/config/first-time-setup.md (opens in a new tab)scripts/bun.lock (opens in a new tab)scripts/constants.ts (opens in a new tab)scripts/cookie-file.ts (opens in a new tab)scripts/cookies.ts (opens in a new tab)scripts/graphql.ts (opens in a new tab)scripts/http.ts (opens in a new tab)scripts/main.ts (opens in a new tab)scripts/markdown.test.ts (opens in a new tab)scripts/markdown.ts (opens in a new tab)scripts/media-localizer.ts (opens in a new tab)scripts/package.json (opens in a new tab)scripts/paths.ts (opens in a new tab)scripts/referenced-tweets.ts (opens in a new tab)scripts/thread-markdown.ts (opens in a new tab)scripts/thread.ts (opens in a new tab)scripts/tweet-article.ts (opens in a new tab)scripts/tweet-to-markdown.ts (opens in a new tab)scripts/types.ts (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
/baoyu-skills:baoyu-danger-x-to-markdownfrom baoyu-skills
npx claudepluginhub jimliu/baoyu-skills --plugin baoyu-skills22 skills in this plugin
/baoyu-article-illustratorAnalyzes article structure, identifies positions requiring visual aids, generates illustrations with Type × Style × Palette three-dimension approach. Use when user asks to "illustrate article", "add images", "generate images for article", or "为文章配图"./baoyu-comicKnowledge comic creator supporting multiple art styles and tones. Creates original educational comics with detailed panel layouts and batch-capable image generation. Use when user asks to create "知识漫画", "教育漫画", "biography comic", "tutorial comic", or "Logicomix-style comic"./baoyu-compress-imageCompresses images to WebP (default) or PNG with automatic tool selection. Use when user asks to "compress image", "optimize image", "convert to webp", or reduce image file size.2 plugins ship this exact skill · first indexed Nov 2, 2026
Other plugins' skills for the same job