Skip to content

Guide · Agent skill

How to use the X to Markdown agent skill (baoyu-danger-x-to-markdown)

Updated · written with AI from the project's own documentation and checked against our catalogue data

The X to Markdown skill is an agent skill that lets an AI agent turn an x.com or twitter.com tweet, thread or X Article into a local markdown file with YAML front matter. This guide explains what the skill does, how to install it, how to ask for a conversion in plain language, and what it needs from your machine before you use it. By the end you will know how to save a tweet as a markdown note and what safety trade-offs to consider first.

X to MarkdownJimLiu/baoyu-skills · MIT

Quick start

  1. 1Download and unzip. Download the skill ZIP from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder.
  2. 2Check requirements. Confirm bun or npx, and Google Chrome, Chromium or Edge, are installed on your machine.
  3. 3Log in to X. Sign in to X in the browser the skill launches so it can capture the auth_token and ct0 cookies.
  4. 4Accept the consent prompt. Read the reverse-engineered API disclaimer and choose to accept, or the skill will stop.
  5. 5Complete first-time setup. Answer the media, output directory and save-location questions so EXTEND.md is created.
  6. 6Ask for a conversion. Paste an x.com or twitter.com link and say you want it saved as markdown.

What the skill makes the agent do

Once installed, the agent can take a tweet, thread or X Article link and convert its text into a markdown file. The output begins with YAML front matter that records fields such as the author, the original URL, the tweet count and a cover image.

You can also ask the skill to download the images and videos locally and rewrite the links so they point at those local files. The skill reads X content by driving a Chrome browser session with your logged-in cookies and calling X's internal web API, which is not an official public API.

  • Tweets and threads become markdown with YAML front matter.
  • X Articles get full content extraction.
  • Optional: images go to imgs/ and videos go to videos/ next to the markdown file.

Install the skill (ZIP download or Claude apps)

Download the skill ZIP from this page and unzip it. For a personal install, place the unzipped folder in ~/.claude/skills/. For a single project, place it in that project's .claude/skills/ folder.

If you use the Claude apps, you can instead upload the skill under Settings → Capabilities → Skills.

  • Personal: ~/.claude/skills/
  • Project: .claude/skills/ inside your project folder
  • Claude apps: Settings → Capabilities → Skills

Meet the requirements before your first run

The scripts are TypeScript and run with bun or npx. The skill checks for bun first; if it is missing and npx is available, it runs the scripts through npx -y bun. You also need Google Chrome, Chromium or Edge installed, because the skill launches it for login and cookie capture.

You need an X account logged in through that browser. The skill uses the auth_token and ct0 cookies. The scripts depend on the npm package baoyu-chrome-cdp, listed in scripts/package.json.

  • bun or npx
  • Google Chrome, Chromium or Edge
  • An X account logged in through the browser (auth_token and ct0 cookies)
  • npm dependency baoyu-chrome-cdp (from scripts/package.json)

Before any conversion, the skill checks for a consent file. If none exists, it shows a disclaimer stating that the API is reverse-engineered and not official, may break, comes with no guarantees or support, can lead to possible account restrictions, and is used at your own risk. You must choose to accept; declining stops the skill.

On first use the skill also asks for preferences: how to handle media (ask each time, always download, or never download), the default output directory, and whether to save preferences for the user or the project. These are stored in an EXTEND.md file.

  • Consent is stored in a consent.json file under the skill's data folder (the path differs on macOS and Linux).
  • Preferences live in EXTEND.md at a project, XDG or home location; the first one found is used.
  • Setup must finish before any conversion starts.

Ask for a conversion in plain language

You do not need to type commands. The skill triggers on phrases such as "X to markdown", "tweet to markdown", "save tweet", or when you paste an x.com or twitter.com URL and ask for it to be converted.

Supported links are https://x.com/<user>/status/<id>, https://twitter.com/<user>/status/<id> and https://x.com/i/article/<id>.

  • "Save this tweet as markdown: https://x.com/user/status/123"
  • "Convert this X Article to markdown and download its images."
  • "Turn this thread into a markdown note."

Run the script directly and check the output

The skill runs main.ts with a URL. You can add -o to set an output path, --json for JSON output, --download-media to save images and videos locally, or --login to refresh cookies only.

Output is saved to x-to-markdown/{username}/{tweet-id}/{content-slug}.md. The front matter includes url, author, tweetCount and coverImage. With --download-media, markdown media links are rewritten to relative paths.

  • -o <path>: output path
  • --json: JSON output
  • --download-media: localize images and videos
  • --login: refresh cookies only
${BUN_X} {baseDir}/scripts/main.ts <url> --download-media

What people use it for

  • Saving a specific tweet or thread as a local markdown note with its author and URL in the front matter.
  • Converting an X Article into readable markdown for research or writing.
  • Keeping images and videos next to the markdown file by using the download option.
  • Feeding tweet content into a documentation or note workflow through the scripted output.

Frequently asked questions

Is the X to Markdown skill free?

The skill is published under the MIT licence. This page does not list any price, so check the skill's source repository for licence terms.

What do I need to install the X to Markdown skill?

You need bun or npx to run the TypeScript scripts, Google Chrome, Chromium or Edge, and an X account logged in through that browser. The scripts also depend on the npm package baoyu-chrome-cdp.

Where do I put the skill folder?

Unzip the downloaded ZIP into ~/.claude/skills/ for personal use or into .claude/skills/ inside a project. In the Claude apps you can upload it under Settings → Capabilities → Skills.

Does the skill use an official X API?

No. The skill calls X's internal web API, which is reverse-engineered and not official. The skill's own disclaimer says it may break if X changes its API and comes with no guarantees or support.

Can the skill get banned from X?

The disclaimer warns of possible account restrictions. Avoid bulk scraping or monitoring many accounts, since that is the riskiest use.

Does the skill read my cookies?

Yes. It uses your auth_token and ct0 cookies, taken from a Chrome session you log into, so a local script can read and use them. If you do not want that, do not use this skill.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use this skill if you want to save specific tweets, threads or X Articles as local markdown notes and you are comfortable with a local script using your logged-in X cookies. Pick a different option if you need bulk scraping, monitoring of many accounts, or a stable, officially supported integration, since the skill provides no guarantees or support.

Download the skill