baoyu-danger-x-to-markdown
하는 일
이 스킬은 트윗, 스레드, X 아티클을 읽기 쉬운 마크다운 파일로 바꿉니다. X의 게시물을 보관하거나 기록하려는 사람을 위한 것입니다.
사용하는 경우
- ✓트윗이나 스레드를 마크다운 파일로 저장하고 싶을 때.
- ✓읽기 쉬운 텍스트로 남기고 싶은 X 아티클이 있을 때.
- ✓변환하고 싶은 x.com이나 twitter.com 링크가 있을 때.
스킬 링크
https://github.com/JimLiu/baoyu-skills/blob/main/skills/baoyu-danger-x-to-markdown/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 트윗 스레드를 날짜와 작성자가 머리글에 있는 마크다운 파일로 저장해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 동의 약관을 수락했는지 확인하고, 역공학된 연결로 게시물을 가져온 뒤, 머리글과 함께 마크다운 파일로 씁니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
X to Markdown
Tweets/threads → markdown with YAML front matter; X Articles → full content.
User Input Tools
When this skill prompts the user, follow this tool-selection rule (priority order):
- Prefer built-in user-input tools exposed by the current agent runtime — e.g.,
AskUserQuestion,request_user_input,clarify,ask_user, or any equivalent. - Fallback: if no such tool exists, emit a numbered plain-text message and ask the user to reply with the chosen number/answer for each question.
- Batching: if the tool supports multiple questions per call, combine all applicable questions into a single call; if only single-question, ask them one at a time in priority order.
Concrete AskUserQuestion references below are examples — substitute the local equivalent in other runtimes.
Script Directory
{baseDir}= this SKILL.md's directory; script ={baseDir}/scripts/main.ts${BUN_X}=bunif installed; elsenpx -y bunifnpxavailable; else suggest installing bun
Consent Requirement (before any conversion)
- Read the consent file:
- macOS:
~/Library/Application\ Support/baoyu-skills/x-to-markdown/consent.json - Linux:
~/.local/share/baoyu-skills/x-to-markdown/consent.json
- macOS:
accepted: trueanddisclaimerVersion: "1.0"→ printWarning: Using reverse-engineered X API. Accepted on: <acceptedAt>and proceed.- Missing or version mismatch → show this disclaimer and ask "Yes, I accept" | "No, I decline":
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? - Accept → write the consent file:
{ "version": 1, "accepted": true, "acceptedAt": "<ISO timestamp>", "disclaimerVersion": "1.0" } - Decline → output "User declined. Exiting." and stop.
Preferences (EXTEND.md)
First one found wins:
| Priority | Path | Scope |
|---|---|---|
| 1 | .baoyu-skills/baoyu-danger-x-to-markdown/EXTEND.md |
Project |
| 2 | ${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-danger-x-to-markdown/EXTEND.md |
XDG |
| 3 | $HOME/.baoyu-skills/baoyu-danger-x-to-markdown/EXTEND.md |
User home |
Found → read and apply. Not found → BLOCKING first-time setup: ask the questions in references/config/first-time-setup.md (Media, Output, Save — all in one call) before any conversion, write EXTEND.md at the chosen location, confirm "Preferences saved to [path]", then continue. Never create EXTEND.md with defaults without asking.
| Key | Default | Values |
|---|---|---|
download_media |
ask |
ask (prompt each time) / 1 (always) / 0 (never) |
default_output_dir |
empty (= ./x-to-markdown/) |
path or empty |
Value priority: CLI arguments (--download-media, -o) → EXTEND.md → skill defaults.
Usage
${BUN_X} {baseDir}/scripts/main.ts <url>
${BUN_X} {baseDir}/scripts/main.ts <url> -o output.md
${BUN_X} {baseDir}/scripts/main.ts <url> --download-media
${BUN_X} {baseDir}/scripts/main.ts <url> --json
| Option | Description |
|---|---|
<url> |
Tweet or article URL |
-o <path> |
Output path |
--json |
JSON output |
--download-media |
Download images/videos to local imgs/ and videos/ next to the markdown, rewrite links to local relative paths |
--login |
Refresh cookies only |
Supported URLs: https://x.com/<user>/status/<id>, https://twitter.com/<user>/status/<id>, https://x.com/i/article/<id>
Output
---
url: "https://x.com/user/status/123"
author: "Name (@user)"
tweetCount: 3
coverImage: "https://pbs.twimg.com/media/example.jpg"
---
Content...
File structure: x-to-markdown/{username}/{tweet-id}/{content-slug}.md
Media Download
By EXTEND.md download_media: 1 → run with --download-media; 0 → run without; ask (default):
- Run without
--download-media→ markdown saved - Check it for remote media (
https://image/video links); none → done, no prompt - Otherwise ask (header "Media", question "Download N images/videos to local files?"): "Yes" — download to local directories / "No" — keep remote URLs
- Yes → rerun with
--download-media(overwrites markdown with localized links)
Authentication
- Environment variables (preferred): `X_AUTH_TOKE
자주 묻는 질문
왜 동의가 필요한가요?
이 스킬은 역공학된 X 연결을 사용하므로, 처음 쓸 때 약관에 동의하도록 요청한다고 설명합니다.
파일에는 무엇이 들어가나요?
맨 위에 게시물에 관한 세부 정보가 담긴 YAML 프런트 매터가 있고, 그 뒤에 내용이 이어집니다.
X 아티클 전체를 저장할 수 있나요?
네. 트윗과 스레드뿐 아니라 X 아티클도 전체 내용으로 변환합니다.
상세 정보
작성자의 원본 설명
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.
repo: JimLiu/baoyu-skills
인기도
- GitHub 스타
- 27k
- 순위
- #9953
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
release-skills
27k버전 올리기, 변경 로그 업데이트, GitHub 릴리스나 태그 게시까지, 모든 프로젝트의 릴리스 과정을 에이전트가 안내하도록 합니다.
baoyu-article-illustrator
27k독자에게 도움이 되는 위치를 찾아 글에 삽화를 넣고, 같은 스타일로 그림을 만들도록 에이전트를 돕습니다.
baoyu-comic
27k주제를 설명하는 패널, 그림 스타일, 톤을 갖춘 교육용 만화를 만드는 방법을 에이전트에게 보여 줍니다. 전기나 튜토리얼 같은 형식이 가능합니다.
baoyu-compress-image
27k이미지를 WebP나 PNG로 바꿔 파일 크기를 줄이고, 도구를 자동으로 골라 더 빠르게 불러오도록 에이전트를 돕습니다.