All skills
jimliu avatar

/baoyu-danger-x-to-markdown

@0114060 official
by Jim Liu 宝玉jimliu/baoyu-skills26k stars
2,896

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.

Use this Skill: https://skilld.dev/gh/jimliu/baoyu-skills/baoyu-danger-x-to-markdown

This session only. Nothing lands on disk.

referencesconfigfirst-time-setup.md

≈623 tokens on demand. Your agent reads this file only when SKILL.md points to it.

First-Time Setup

Overview

When no EXTEND.md is found, guide user through preference setup.

BLOCKING OPERATION: This setup MUST complete before ANY other workflow steps. Do NOT:

  • Start converting tweets or articles
  • Ask about URLs or output paths
  • Proceed to any conversion

ONLY ask the questions in this setup flow, save EXTEND.md, then continue.

Setup Flow

No EXTEND.md found
        |
        v
+---------------------+
| AskUserQuestion     |
| (all questions)     |
+---------------------+
        |
        v
+---------------------+
| Create EXTEND.md    |
+---------------------+
        |
        v
    Continue conversion

Questions

Language: Use user's input language or saved language preference.

Use AskUserQuestion with ALL questions in ONE call:

Question 1: Download Media

header: "Media"
question: "How to handle images and videos in tweets?"
options:
  - label: "Ask each time (Recommended)"
    description: "After saving markdown, ask whether to download media"
  - label: "Always download"
    description: "Always download media to local imgs/ and videos/ directories"
  - label: "Never download"
    description: "Keep original remote URLs in markdown"

Question 2: Default Output Directory

header: "Output"
question: "Default output directory?"
options:
  - label: "x-to-markdown (Recommended)"
    description: "Save to ./x-to-markdown/{username}/{tweet-id}.md"

Note: User will likely choose "Other" to type a custom path.

Question 3: Save Location

header: "Save"
question: "Where to save preferences?"
options:
  - label: "User (Recommended)"
    description: "~/.baoyu-skills/ (all projects)"
  - label: "Project"
    description: ".baoyu-skills/ (this project only)"

Save Locations

Choice Path Scope
User ~/.baoyu-skills/baoyu-danger-x-to-markdown/EXTEND.md All projects
Project .baoyu-skills/baoyu-danger-x-to-markdown/EXTEND.md Current project

After Setup

  1. Create directory if needed
  2. Write EXTEND.md
  3. Confirm: "Preferences saved to [path]"
  4. Continue with conversion using saved preferences

EXTEND.md Template

download_media: [ask/1/0]
default_output_dir: [path or empty]

Modifying Preferences Later

Users can edit EXTEND.md directly or delete it to trigger setup again.

Source: SKILL.md on GitHub

1 alert16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The skill converts X (Twitter) content to markdown using a reverse-engineered API. It extracts and stores session cookies from the user's browser to authenticate with X's GraphQL endpoints. While it handles sensitive authentication data and executes shell commands for environment setup, these actions are performed transparently with user consent and are consistent with the skill's primary purpose.

  • Socket16d

    2 alerts: gptSecurity, gptAnomaly

  • Snyk16d

    Risk: HIGH · 3 issues

  • Runlayer6mo

    7/21 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 0114060. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 4 months ago
version
1.117.3
Other metadata
metadata
{
  "openclaw": {
    "homepage": "https://github.com/JimLiu/baoyu-skills#baoyu-danger-x-to-markdown",
    "requires": {
      "anyBins": [
        "bun",
        "npx"
      ]
    }
  }
}
  • twitter
  • x
  • markdown
  • conversion
  • scraping
  • yaml-frontmatter
  • content-extraction
  • bun

README badge

README badge for jimliu/baoyu-skills/baoyu-danger-x-to-markdown

Converts X (Twitter) tweets and articles to markdown with YAML front matter, requiring user consent for the reverse-engineered API. Handles single tweets, threads, and X Articles, with optional local media download and configurable output directories.

Generated from the current SKILL.md.

Does this use the official X API?
No. This skill uses a reverse-engineered X API and is not official. It may break if X changes their API and carries risks including possible account restrictions.
What authentication methods are supported?
The skill accepts X_AUTH_TOKEN and X_CT0 environment variables, or falls back to auto-opening Chrome to cache cookies locally.
Can this download media from tweets?
Yes. You can configure it to always download, never download, or be prompted each time. Downloaded images and videos are saved to local dirs/ next to the markdown and links are rewritten as relative paths.
What URL formats does this support?
It supports x.com and twitter.com tweet URLs (format: /user/status/id), and X Articles (format: /i/article/id).
Does this require user consent before running?
Yes. On first use, the skill displays a disclaimer about the reverse-engineered API and requires explicit acceptance before conversion. Consent is cached locally.

Generated from the current SKILL.md. These answers refresh after source changes.