PlugWiki

baoyu-danger-x-to-markdown: a skill that saves tweets and X articles as markdown

baoyu-danger-x-to-markdown makes your agent save an X (Twitter) tweet, thread or article as a markdown file with YAML front matter.

Installs
28.2K
on skills.sh
Stars
27.2K
on GitHub
Files
19
besides SKILL.md
Updated
Nov 2026
last repo commit

Give your agent an x.com or twitter.com status URL, or an X Article URL, and it runs a bundled TypeScript script that fetches the post and writes markdown to ./x-to-markdown/{username}/.... It can also download images and videos next to the file and rewrite the links.

The word "danger" is in the name for a reason. SKILL.md says it uses a reverse-engineered API, not an official one. It requires your consent before the first conversion, and the README warns it may break and that account restrictions are possible. It needs X login cookies, either as environment variables or from a Chrome login window the script opens.

Good for

  • Researchers and writers who archive tweets and threads as notes
  • Developers feeding X posts into a notes or knowledge-base folder
  • Anyone who accepts the risks of an unofficial X API

Install baoyu-danger-x-to-markdown

Claude Code

  1. 1

    Copy this prompt.

    Install the baoyu-danger-x-to-markdown skill in Claude Code. Run this command:
    
    npx skills add https://github.com/jimliu/baoyu-skills --skill baoyu-danger-x-to-markdown
    
    Then check that it loaded and tell me how to use it.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires Node.js.

From its listing on skills.sh. Source.

What's in the skill

When it loads

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.

Sections in SKILL.md

  1. User Input Tools
  2. Script Directory
  3. Consent Requirement
  4. Consent Flow
  5. Preferences (EXTEND.md)
  6. First-Time Setup (BLOCKING)
  7. Supported Keys
  8. Usage
  9. Options
  10. Supported URLs
  11. Output
  12. Media Download Workflow
  13. Ask-Each-Time Flow
  14. Authentication
  15. Extension Support

Key facts

Installs on skills.sh
28,151 (as of Nov 2, 2026)
Version in SKILL.md
1.117.3
Last repo commit
Nov 1, 2026

What it includes

  • Asks you to accept the unofficial-API disclaimer first

    Checks a consent.json under your user data folder. If it is missing, shows a disclaimer and creates the file only after you accept.

    Write · Consent check

  • Asks 3 questions and saves an EXTEND.md

    Media handling (ask, always, never), default output folder, and whether to save preferences for all projects or this one.

    Write · First-time setup

  • Converts a tweet, thread or X Article to markdown

    Runs with bun, or `npx -y bun` when bun is not installed. Accepts x.com or twitter.com status URLs and x.com/i/article URLs.

    Runs code · main.ts <url>

  • Choose the output file or folder

    Default is x-to-markdown/{username}/{tweet-id}/{content-slug}.md.

    Write · -o <path>

  • Print JSON output

    Includes the markdown path.

    --json

  • Download images and videos locally

    Saves to imgs/ and videos/ next to the markdown and rewrites links to relative paths. With the default setting the agent asks first.

    Write · --download-media

  • Refresh cookies only

    Opens Chrome so you can log in to X and caches the cookies.

    Runs code · --login

From the official docs

Permissions

High risk

It uses your X login cookies with an unofficial API, runs a TypeScript script and can open Chrome. X may restrict an account it sees using this, so use a throwaway account.

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • It uses an unofficial X API with your login

    SKILL.md and the README say the API is reverse-engineered, may break, and account restrictions are possible. Use a throwaway X account rather than your main one. github.com

  • It handles X session cookies

    The script reads X_AUTH_TOKEN, X_CT0 and related variables, or logs in through a Chrome window and caches cookies in a file. Treat those cookies like a password. github.com

  • It runs third-party code

    Scripts run with bun, or `npx -y bun` if bun is missing. scripts/package.json depends on the npm package baoyu-chrome-cdp, which launches Chrome. github.com

  • It writes files and downloads media

    It saves markdown, a consent file and preferences in EXTEND.md, and with --download-media it saves images and videos from the post. github.com

Technical details
Talks tox.com and twitter.com. X media hosts when downloading media
Sign-in and keysCookies come from the X_AUTH_TOKEN and X_CT0 environment variables or a Chrome login. The script writes a cookie file and a Chrome profile folder under your user data folder.
Scopes
  • X login cookies (auth_token, ct0)

Questions

What does baoyu-danger-x-to-markdown do?

It makes your agent turn an X tweet, thread or article into a markdown file with YAML front matter (url, author, tweet count, cover image). It can also download the media.

How do I install it in Claude Code?

Use the install command in the box above. The README also lists a plugin marketplace route that brings every skill in the repo, which it says adds context overhead, so installing only the skills you need is the README's advice.

Does it need an X API key?

No key, but it needs your X login. Set X_AUTH_TOKEN and X_CT0 as environment variables, or let it open Chrome so you can log in and it caches the cookies.

Is it safe?

It is high risk by the author's own wording: an unofficial API, X session cookies and a script that opens Chrome. Use a throwaway account, read the disclaimer it shows and keep the cookie file private.

Why is there a consent prompt?

SKILL.md requires consent before any conversion. It stores your acceptance in a consent.json under your user data folder and shows a warning each time.

Where does it save files?

By default in ./x-to-markdown/{username}/{tweet-id}/, or where you point -o. Your first-run answers are saved in an EXTEND.md in the project or your home folder.

What does it support?

Tweets and threads at x.com or twitter.com status URLs, and X Articles at x.com/i/article/<id>.

Information

updated Nov 2, 2026

Folder
skills/baoyu-danger-x-to-markdown

jimliu/baoyu-skillsskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 4
  1. SKILL.md · github.com
  2. baoyu-skills README · github.com
  3. first-time-setup.md · github.com
  4. scripts/main.ts · github.com

Updated Nov 2, 2026.