Loading...
Loading...
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.
npx skill4agent add jimliu/baoyu-skills baoyu-danger-x-to-markdownscripts/SKILL_DIR${SKILL_DIR}/scripts/main.ts# macOS
cat ~/Library/Application\ Support/baoyu-skills/x-to-markdown/consent.json
# Linux
cat ~/.local/share/baoyu-skills/x-to-markdown/consent.jsonaccepted: truedisclaimerVersion: "1.0"Warning: Using reverse-engineered X API. Accepted on: <acceptedAt>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?AskUserQuestion{
"version": 1,
"accepted": true,
"acceptedAt": "<ISO timestamp>",
"disclaimerVersion": "1.0"
}# 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"npx -y bun ${SKILL_DIR}/scripts/main.ts <url>
npx -y bun ${SKILL_DIR}/scripts/main.ts <url> -o output.md
npx -y bun ${SKILL_DIR}/scripts/main.ts <url> --json| Option | Description |
|---|---|
| Tweet or article URL |
| Output path |
| JSON output |
| Refresh cookies only |
https://x.com/<user>/status/<id>https://twitter.com/<user>/status/<id>https://x.com/i/article/<id>---
url: https://x.com/user/status/123
author: "Name (@user)"
tweet_count: 3
---
Content...x-to-markdown/{username}/{tweet-id}.mdX_AUTH_TOKENX_CT0