Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

baoyu-danger-x-to-markdown

Skill by JimLiu

Converts X (Twitter) tweets, threads and X Articles to markdown with YAML front matter. Built for users who want to save posts locally, after accepting a disclaimer about its reverse-engineered API.

  • Score 92
  • 28k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install baoyu-danger-x-to-markdown

Built from the published package, never by AI.

git clone --depth 1 https://github.com/JimLiu/baoyu-skills /tmp/baoyu-skills && mkdir -p ~/.claude/skills && cp -r /tmp/baoyu-skills/skills/baoyu-danger-x-to-markdown ~/.claude/skills/baoyu-danger-x-to-markdown

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install baoyu-danger-x-to-markdown in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill converts X (Twitter) tweets, threads and X Articles into markdown files with YAML front matter. Given an x.com or twitter.com status URL, or an x.com/i/article URL, it saves the content under x-to-markdown/{username}/{tweet-id}/. With the --download-media option, it can save images and videos to local folders and rewrite the links to relative paths.

The skill uses a reverse-engineered X API that is not official. Before the first conversion, it asks the user to accept a disclaimer, since the API may break, comes with no support, and may lead to account restrictions. Authentication uses the X_AUTH_TOKEN and X_CT0 environment variables, with a Chrome login as a fallback. It is aimed at people who want to save tweets or articles as markdown and accept those risks.

Written from the project's SKILL.md and checked against it.

What it can do

  • Tweet conversionConverts a tweet or thread from an x.com or twitter.com status URL to markdown.
  • Article conversionConverts X Articles from x.com/i/article URLs into full content.
  • YAML front matterAdds url, author, tweetCount and coverImage fields to the output file.
  • Media downloadWith --download-media, saves images and videos locally and rewrites links.
  • JSON outputThe --json option returns the result as JSON instead of a markdown file.
  • Consent gateRequires the user to accept a disclaimer before the first conversion.
  • Preferences fileReads EXTEND.md to set download_media and default_output_dir.
  • Login refreshThe --login option refreshes cookies only.

What you need

  • bun, or npx to run the script
  • X_AUTH_TOKEN and X_CT0 environment variables, or Chrome for the login fallback
  • Acceptance of the reverse-engineered API disclaimer

Try asking

  • Convert this X post to markdown: https://x.com/user/status/123
  • Save this tweet as markdown and download its images locally
  • Convert this X Article to markdown and save it as output.md

Good to know

  • Uses a reverse-engineered X API, not an official one.
  • May break if X changes its API. No guarantees or support.
  • Possible account restrictions. Use at your own risk.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/baoyu-danger-x-to-markdown/SKILL.md, skills/baoyu-danger-x-to-markdown/scripts/constants.ts, skills/baoyu-danger-x-to-markdown/scripts/cookie-file.ts, skills/baoyu-danger-x-to-markdown/scripts/cookies.ts, skills/baoyu-danger-x-to-markdown/scripts/graphql.ts, skills/baoyu-danger-x-to-markdown/scripts/http.ts, skills/baoyu-danger-x-to-markdown/scripts/main.ts, skills/baoyu-danger-x-to-markdown/scripts/markdown.test.ts, skills/baoyu-danger-x-to-markdown/scripts/markdown.ts. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md5 KB
  • references/config/first-time-setup.md2 KB
  • scripts/bun.lock392 B
  • scripts/constants.ts7 KB
  • scripts/cookie-file.ts2 KB
Show all 20 files
  • scripts/cookies.ts9 KB
  • scripts/graphql.ts13 KB
  • scripts/http.ts3 KB
  • scripts/main.ts19 KB
  • scripts/markdown.test.ts5 KB
  • scripts/markdown.ts21 KB
  • scripts/media-localizer.ts10 KB
  • scripts/package.json148 B
  • scripts/paths.ts2 KB
  • scripts/referenced-tweets.ts2 KB
  • scripts/thread-markdown.ts8 KB
  • scripts/thread.ts9 KB
  • scripts/tweet-article.ts3 KB
  • scripts/tweet-to-markdown.ts6 KB
  • scripts/types.ts1 KB

Alternatives to baoyu-danger-x-to-markdown

All alternatives →

Compare with obsidian-clipper-template-creator, harness-creator or xberg-extracting-with-ocr

baoyu-danger-x-to-markdown: common questions

Does this use the official X API?

No. The source says it uses a reverse-engineered X API that is not official, and it may break if X changes its API.

Do I have to accept terms before using it?

Yes. The first conversion shows a disclaimer that the user must accept. The acceptance is saved to a consent.json file.

How does it log in to X?

It reads the X_AUTH_TOKEN and X_CT0 environment variables first. If those are not set, it opens Chrome to log in and caches cookies locally.

How do I install baoyu-danger-x-to-markdown?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is baoyu-danger-x-to-markdown free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is baoyu-danger-x-to-markdown safe to use?

It scores 92 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to baoyu-danger-x-to-markdown?

Similar skills: obsidian-clipper-template-creator, harness-creator, xberg-extracting-with-ocr, file-edit-in-place.

baoyu-danger-x-to-markdown Install

Add to stack

Loading.