baoyu-danger-x-to-markdown

Converts X tweets, threads, and articles into markdown files with YAML front matter.

2|Updated May 30, 2026
One-click install
npx skills add https://github.com/virahitvin8/crafty-gis --skill baoyu-danger-x-to-markdown-virahitvin8
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: baoyu-danger-x-to-markdown
Source: https://github.com/virahitvin8/crafty-gis/tree/main/GIT_STAR/assignment-generator/antigravity-skills-main/antigravity-skills-main/skills/baoyu-danger-x-to-markdown
Command: npx skills add https://github.com/virahitvin8/crafty-gis --skill baoyu-danger-x-to-markdown-virahitvin8

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires baoyu-chrome-cdp, and includes scripts (resource) and references (resource) components.

What problem does it solve? Saving X (Twitter) content for offline reading or archiving is difficult because tweets, threads, and long-form articles cannot be cleanly exported. This Skill converts X URLs into structured markdown files with YAML front matter, preserving text, media links, and metadata. ## Core Features & Use Cases - Tweet and Thread Conversion: Fetches tweets and full threads via the X GraphQL API and writes them as markdown with author, URL, and tweet count front matter. - X Article Extraction: Extracts full long-form X Articles, including headings, lists, code blocks, embedded tweets, and media. - Media Localization: Optionally downloads images and videos to local imgs/ and videos/ directories and rewrites markdown links to relative paths. - Use Case: A researcher archiving a viral thread can run the script on the tweet URL and receive a local markdown file with all media downloaded for citation and offline reference. ## Quick Start Convert this X post to markdown and save it locally: https://x.com/username/status/1234567890.

Frequently Asked Questions about baoyu-danger-x-to-markdown

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert a tweet to markdown?

Run the main.ts script with the tweet URL using bun or npx bun. The script fetches the tweet via the X GraphQL API and writes a markdown file with YAML front matter containing the URL, author, and tweet count.

How to save X articles as markdown files?

Pass an x.com/i/article/<id> URL to the script. It extracts the full article content including headings, lists, code blocks, embedded tweets, and media, then formats everything as structured markdown.

Does this tool require X login credentials?

Yes, it requires auth_token and ct0 cookies. You can provide them via X_AUTH_TOKEN and X_CT0 environment variables, or let the script open Chrome via DevTools Protocol to capture cookies after you log in.

Can I download images and videos from tweets locally?

Yes, use the --download-media flag or set download_media in EXTEND.md. Images are saved to an imgs/ directory and videos to videos/ next to the markdown file, with links rewritten to local relative paths.

Why does the script show a disclaimer before converting?

The tool uses a reverse-engineered X API rather than an official one, which may break or risk account restrictions. It requires one-time consent, stored in a consent.json file, before any conversion proceeds.

What URL formats are supported for conversion?

Supported formats are x.com/<user>/status/<id>, twitter.com/<user>/status/<id>, and x.com/i/article/<id>. Other X URLs such as profiles or search pages are not supported.