agentleFS
JimLiuJimLiu/baoyu-skills/skills/baoyu-danger-x-to-markdown/SKILL.md

baoyu-danger-x-to-markdown

Skill27k starsChanged 7 months agoMITView on GitHub

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.

9 other projects use a version of this, 9 of them edited; 9 of 9 edited versions we compared changed its rules.

How people change it

9 of 9 edited versions changed its rules, and some changes recur.

Of the 9 edited versions we compared: 9 made changes of their own.

Rules people drop

  1. When this skill prompts the user, follow this tool-selection rule (priority order):dropped by 9 of 9
  2. 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.dropped by 9 of 9
  3. 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.dropped by 9 of 9
  4. Read the consent file:dropped by 9 of 9
  5. Check it for remote media (https:// image/video links); none → done, no promptdropped by 9 of 9
  6. Run without --download-media → markdown saveddropped by 2 of 9

Rules people add

  1. A rule we can't quote: its licence doesn't allow itadded by 9 of 9
  2. A rule we can't quote: its licence doesn't allow itadded by 8 of 9
  3. A rule we can't quote: its licence doesn't allow itadded by 8 of 9
  4. A rule we can't quote: its licence doesn't allow itadded by 8 of 9
  5. A rule we can't quote: its licence doesn't allow itadded by 8 of 9
  6. A rule we can't quote: its licence doesn't allow itadded by 7 of 9
  7. A rule we can't quote: its licence doesn't allow itadded by 7 of 9
  8. A rule we can't quote: its licence doesn't allow itadded by 7 of 9

We split this file and each edited version into the rules they give an agent and match them by wording. A version that adds no rule of its own and has not changed since this file last did reads as an older text, so what it lacks is not counted as dropped. We keep no past texts of a file, so that is inferred, and an edited version that started from an older text still counts its gaps as drops.

Adopted by

Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data

Week of Sep 20: 0 new projectsWeek of Sep 27: 0 new projectsWeek of Oct 4: 0 new projectsWeek of Oct 11: 0 new projectsWeek of Oct 18: 0 new projectsWeek of Oct 25: 0 new projectsWeek of Nov 1: 0 new projectsWeek of Nov 8: 0 new projects
Sep 2026Oct 2026Nov 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 0 in all, so this is a hint, not a trend.

Most recently taken up by

Who's talking about JimLiu/baoyu-skills

The biggest 5 of 66 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 66

Talked about on GitHub, YouTube, Bluesky and the web (66 times).

On GitHub · 50

45 more on GitHub

On YouTube · 12

7 more on YouTube

On Bluesky · 3

On the web · 1

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When this skill prompts the user, follow this tool-selection rule (priority order):

    line 20
  2. Distinctive:

    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 …

    line 23
  3. Distinctive:

    Batching: if the tool supports multiple questions per call, combine all applicable questions into a single call.

    line 24
  4. Distinctive:

    Read the consent file:

    line 35
  5. Very specific:

    Run without --download-media → markdown saved

    line 121
  6. Very specific:

    Check it for remote media (https:// image/video links).

    line 122

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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):

  1. Prefer built-in user-input tools exposed by the current agent runtime — e.g., AskUserQuestion, request_user_input, clarify, ask_user, or any equivalent.
  2. 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.
  3. 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

  1. {baseDir} = this SKILL.md's directory; script = {baseDir}/scripts/main.ts
  2. ${BUN_X} = bun if installed; else npx -y bun if npx available; else suggest installing bun

Consent Requirement (before any conversion)

  1. 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
  2. accepted: true and disclaimerVersion: "1.0" → print Warning: Using reverse-engineered X API. Accepted on: <acceptedAt> and proceed.
  3. 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?
  4. Accept → write the consent file:
    {
      "version": 1,
      "accepted": true,
      "acceptedAt": "<ISO timestamp>",
      "disclaimerVersion": "1.0"
    }
  5. Decline → output "User declined. Exiting." and stop.

Preferences (EXTEND.md)

First one found wins:

PriorityPathScope
1.baoyu-skills/baoyu-danger-x-to-markdown/EXTEND.mdProject
2${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-danger-x-to-markdown/EXTEND.mdXDG
3$HOME/.baoyu-skills/baoyu-danger-x-to-markdown/EXTEND.mdUser 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.

KeyDefaultValues
download_mediaaskask (prompt each time) / 1 (always) / 0 (never)
default_output_dirempty (= ./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
OptionDescription
<url>Tweet or article URL
-o <path>Output path
--jsonJSON output
--download-mediaDownload images/videos to local imgs/ and videos/ next to the markdown, rewrite links to local relative paths
--loginRefresh 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):

  1. Run without --download-media → markdown saved
  2. Check it for remote media (https:// image/video links); none → done, no prompt
  3. Otherwise ask (header "Media", question "Download N images/videos to local files?"): "Yes" — download to local directories / "No" — keep remote URLs
  4. Yes → rerun with --download-media (overwrites markdown with localized links)

Authentication

  1. Environment variables (preferred): X_AUTH_TOKEN, X_CT0
  2. Chrome login (fallback): auto-opens Chrome, caches cookies locally

Extension Support

Custom configurations via EXTEND.md — see Preferences above.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.