🎯

baoyu-danger-x-to-markdown

🎯Skill

from yelban/baoyu-skills.tw

VibeIndex|
What it does

Converts X (Twitter) tweets and threads to markdown with YAML front matter, requiring user consent for API usage.

πŸ“¦

Part of

yelban/baoyu-skills.tw(16 items)

baoyu-danger-x-to-markdown

Installation

npxRun with npx
npx -y bun ${SKILL_DIR}/scripts/main.ts <url>
npxRun with npx
npx -y bun ${SKILL_DIR}/scripts/main.ts <url> -o output.md
npxRun with npx
npx -y bun ${SKILL_DIR}/scripts/main.ts <url> --json
πŸ“– Extracted from docs: yelban/baoyu-skills.tw
4Installs
-
AddedFeb 4, 2026

Skill Details

SKILL.md

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.

Overview

# X to Markdown

Converts X content to markdown:

  • Tweets/threads β†’ Markdown with YAML front matter
  • X Articles β†’ Full content extraction

Script Directory

Scripts located in scripts/ subdirectory.

Path Resolution:

  1. SKILL_DIR = this SKILL.md's directory
  2. Script path = ${SKILL_DIR}/scripts/main.ts

Consent Requirement

Before any conversion, check and obtain consent.

Consent Flow

Step 1: Check consent file

```bash

# macOS

cat ~/Library/Application\ Support/baoyu-skills/x-to-markdown/consent.json

# Linux

cat ~/.local/share/baoyu-skills/x-to-markdown/consent.json

```

Step 2: If accepted: true and disclaimerVersion: "1.0" β†’ print warning and proceed:

```

Warning: Using reverse-engineered X API. Accepted on:

```

Step 3: If missing or version mismatch β†’ display disclaimer:

```

DISCLAIMER

This tool uses a reverse-engineered X API, NOT official.

Risks:

  • May break if X changes API
  • No guarantees or support
  • Possible account restrictions
  • Use at your own risk

Accept terms and continue?

```

Use AskUserQuestion with options: "Yes, I accept" | "No, I decline"

Step 4: On accept β†’ create consent file:

```json

{

"version": 1,

"accepted": true,

"acceptedAt": "",

"disclaimerVersion": "1.0"

}

```

Step 5: On decline β†’ output "User declined. Exiting." and stop.

Preferences (EXTEND.md)

Use Bash to check EXTEND.md existence (priority order):

```bash

# Check project-level first

test -f .baoyu-skills/baoyu-danger-x-to-markdown/EXTEND.md && echo "project"

# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL)

test -f "$HOME/.baoyu-skills/baoyu-danger-x-to-markdown/EXTEND.md" && echo "user"

```

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”

β”‚ Path β”‚ Location β”‚

β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€

β”‚ .baoyu-skills/baoyu-danger-x-to-markdown/EXTEND.md β”‚ Project directory β”‚

β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€

β”‚ $HOME/.baoyu-skills/baoyu-danger-x-to-markdown/EXTEND.md β”‚ User home β”‚

β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”

β”‚ Result β”‚ Action β”‚

β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€

β”‚ Found β”‚ Read, parse, apply settings β”‚

β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€

β”‚ Not found β”‚ Use defaults β”‚

β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

EXTEND.md Supports: Default output directory | Output format preferences

Usage

```bash

npx -y bun ${SKILL_DIR}/scripts/main.ts

npx -y bun ${SKILL_DIR}/scripts/main.ts -o output.md

npx -y bun ${SKILL_DIR}/scripts/main.ts --json

```

Options

| Option | Description |

|--------|-------------|

| | Tweet or article URL |

| -o | Output path |

| --json | JSON output |

| --login | Refresh cookies only |

Supported URLs

  • https://x.com//status/
  • https://twitter.com//status/
  • https://x.com/i/article/

Output

```markdown

---

url: https://x.com/user/status/123

author: "Name (@user)"

tweet_count: 3

---

Content...

```

File structure: x-to-markdown/{username}/{tweet-id}.md

Authentication

  1. Environment variables (preferred): X_AUTH_TOKEN, X_CT0
  2. Chrome login (fallback): Auto-opens Chrome, caches cookies locally

Extension Support

Custom configurations via EXTEND.md. See Preferences section for paths and supported options.

More from this repository10

🎯
baoyu-compress-image🎯Skill

Automatically compresses and optimizes images using the best available tool, converting to WebP or other formats with quality control.

🎯
baoyu-post-to-wechat🎯Skill

Automatically posts blog articles to WeChat Official Account platform via API integration.

🎯
baoyu-xhs-images🎯Skill

Generates and manages Xiaohongshu (Red) style images with customizable AI-driven design parameters.

🎯
baoyu-slide-deck🎯Skill

Generates professional slide deck images from content, creating stylized presentations with customizable options for audience, style, and language.

🎯
baoyu-post-to-x🎯Skill

I apologize, but I cannot generate a description without seeing the actual content or context of the "baoyu-post-to-x" skill. Could you provide more details about what this specific skill does? Wit...

🎯
baoyu-article-illustrator🎯Skill

Generates AI-powered illustrations for articles using Midjourney, tailored to match the content and style of the text.

🎯
baoyu-danger-gemini-web🎯Skill

Generates images and text via reverse-engineered Gemini Web API, supporting text, image, and vision-based AI generation.

🎯
release-skills🎯Skill

Automatically detects and updates version files and multilingual changelogs across various project types with intelligent version bumping and release workflows.

🎯
baoyu-cover-image🎯Skill

Generates customizable article cover images with 5-dimensional design options, supporting multiple styles, palettes, and aspect ratios.

🎯
baoyu-comic🎯Skill

I apologize, but I cannot generate a description without seeing the actual content or context of the "baoyu-comic" skill. Could you provide more details about what this skill does, its functionalit...