Skip to content

X to Markdown

Save X/Twitter tweets and articles as markdown files using a reverse-engineered API

Stars
27,191
Licence
MIT
Files
15 files

What it does

Once installed, the agent can take an x.com or twitter.com tweet, thread, or X Article link and convert its text into a markdown file with YAML front matter (author, URL, tweet count, cover image). It can optionally download the images and videos locally and rewrite links to point at those local files. It reads your 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.

Great for

  • People who want to archive or save specific tweets or threads as local markdown notes
  • Researchers or writers who need X Articles converted into readable text
  • Developers who want a scripted way to pull tweet content into a documentation or note workflow

Skip it if

  • Bulk scraping or monitoring many accounts: the reverse-engineered API may break or lead to account restrictions on X
  • Users who do not want their X login cookies read and used by a local script
  • Anyone needing a stable, supported integration; the skill states it has no guarantees or support

Try asking

  • “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 file with front matter”
Step-by-step guide: how to use X to MarkdownInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 15 original files, the MIT licence and an attribution note.

    baoyu-danger-x-to-markdown.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip baoyu-danger-x-to-markdown.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip baoyu-danger-x-to-markdown.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Accept the disclaimer only if you understand the risks; the consent file is stored locally and checked on each run.
  • Choose 'Ask each time' for media downloads to avoid saving large videos you did not intend to keep.
  • Use a dedicated or low-stakes X account, since cookie-based access may trigger account restrictions.

What's inside

  • references/config/first-time-setup.md
  • scripts/constants.ts
  • scripts/cookie-file.ts
  • scripts/cookies.ts
  • scripts/graphql.ts
  • scripts/http.ts
  • scripts/main.ts
  • scripts/markdown.test.ts
  • scripts/markdown.ts
  • scripts/media-localizer.ts
  • scripts/package.json
  • scripts/paths.ts
  • scripts/referenced-tweets.ts
  • scripts/thread-markdown.ts
  • SKILL.md

Redistributed unmodified from JimLiu/baoyu-skills under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.