营销与写作

baoyu-danger-x-to-markdown

jimliu/baoyu-skills

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.

  • 2.8万 次安装
  • 2.7万 星标
  • 收录于

安装命令

npx skills add https://github.com/jimliu/baoyu-skills --skill baoyu-danger-x-to-markdown

要点

Convert X tweets and articles to markdown with YAML front matter using reverse-engineered API.

  • Extracts tweets, threads, and X articles to markdown with metadata (author, URL, cover image, thread count)
  • Requires explicit user consent before first use; displays disclaimer about reverse-engineered API and potential account risks
  • Supports media download to local imgs/ and videos/ directories with automatic link rewriting, configurable per-conversion or via preferences
  • Authenticates via environment variables (X_AUTH_TOKEN, X_CT0) or Chrome login with cached cookies; includes --login flag to refresh credentials

SKILL.md

X to Markdown

Converts X content to markdown:

  • Tweets/threads → Markdown with YAML front matter
  • X Articles → Full content extraction

User Input Tools

When this skill prompts the user, follow this tool-selection rule (priority order):

  1. Prefer built-in user-input tools exposed by the current agent runtime — e.g., AskUserQuestion, request_user_input, clarify, ask_user, or any equivalent.
  2. 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.
  3. 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

Scripts located in scripts/ subdirectory.