freestylefly avatar

Canghe Danger X To Markdown

This converts X posts and articles to markdown files with YAML front matter, saving them locally with a clean file structure organized by username and tweet ID. It uses a reverse-engineered API, so there's a consent flow before first use that warns about potential breakage and account risks. The interesting part is the media handling: you can configure it to always download images and videos locally, never download them, or ask each time. Authentication pulls from environment variables or falls back to opening Chrome to grab cookies. It includes a first-time setup that asks where you want to save preferences and how to handle media by default. Useful when you want to archive threads or articles from X without dealing with the official API.

skills.sh installs
489
GitHub stars
474
last updated
Aug 21, 2026

Install

$ npx -y skills add freestylefly/canghe-skills --skill canghe-danger-x-to-markdown --agent claude-code

Installs into .claude/skills of the current project.

Files

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

# macOS
cat ~/Library/Application\ Support/canghe-skills/x-to-markdown/consent.json

# Linux
cat ~/.local/share/canghe-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: <acceptedAt>

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"

Sponsors

Details

Repository
github.com/freestylefly/canghe-skills
Categories
Backend & APIs, Marketing & SEO
First seen
Jun 3, 2026

More from freestylefly/canghe-skills

All 29
1openclaudia avatarkeyword-researchopenclaudia/openclaudia-skillsPerform keyword research using the SemRush API. Use when the user says "find keywords", "keyword research", "what should I rank for", "keyword ideas", "search v489skills.sh installs
2parcadei avatarmorph-applyparcadei/continuous-claude-v3Fast file editing via Morph Apply API (10,500 tokens/sec, 98% accuracy)489skills.sh installs
3aj-geddes avatarfrontend-state-managementaj-geddes/useful-ai-promptsManage application state using Redux, MobX, Zustand, and Context API. Use when centralizing state for complex applications with multiple components.485skills.sh installs
4irangareddy avataropenclaw-cliirangareddy/openclaw-essentialsMaster the OpenClaw CLI - gateway, agents, channels, skills, hooks, and automation485skills.sh installs
5auth0 avatarauth0-androidauth0/agent-skillsUse when adding Auth0 login, logout, or credential management to an Android app in Kotlin or Java. Covers Web Auth, biometric-protected CredentialsManager, and 482skills.sh installs
6sanjay3290 avatargoogle-sheetssanjay3290/ai-skillsRead and write Google Sheets spreadsheets - get content, update cells, append rows, fetch specific ranges, search for spreadsheets, and view metadata. Use when 479skills.sh installs