mugpeng/oh-my-skills-diy/peng-post-to-x-thread

Claude Code and agent skill by mugpeng/oh-my-skills-diy

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Publishes X/Twitter threads from Markdown. Splits a Markdown file by --- separators into a chain of connected tweets, each replying to the previous one. Supports images per tweet, character validation, preview mode, and configurable delay between posts. Use when user asks to "post thread", "tweet thread", "X thread", "Twitter thread", or provides a markdown file for thread publishing.

Install

npx vskill@latest install mugpeng/oh-my-skills-diy/peng-post-to-x-thread

SKILL.md

The same SKILL.md was published earlier as mugpeng/oh-my-skills-diy/peng-post-to-x-thread.

Post to X Thread

Publish a Markdown file as an X/Twitter thread — a chain of connected tweets where each replies to the previous one. Threads get more visibility than long-form articles because each tweet appears individually in timelines.

Script Directory

{baseDir} = this SKILL.md's directory. Resolve ${BUN_X}: prefer bun; else npx -y bun; else suggest brew install oven-sh/bun/bun.

ScriptPurpose
scripts/x-thread.tsPost a markdown file as a thread
scripts/md-to-thread.tsParse and preview thread structure

Preferences (EXTEND.md)

Check these paths in order; first hit wins:

PathScope
.peng-skills/peng-post-to-x-thread/EXTEND.mdProject
${XDG_CONFIG_HOME:-$HOME/.config}/peng-skills/peng-post-to-x-thread/EXTEND.mdXDG
$HOME/.peng-skills/peng-post-to-x-thread/EXTEND.mdUser home

Found -> read, parse, apply. Not found -> use defaults.

Supported keys:

KeyDefaultDescription
default_delay_ms2000Delay between tweets (ms)
auto_submitfalsetrue = post automatically; false = preview first tweet
default_profile(auto)Chrome profile directory

Value priority: CLI args -> frontmatter -> EXTEND.md -> skill defaults.

Prerequisites

  • Google Chrome or Chromium installed
  • bun runtime (brew install oven-sh/bun/bun)
  • Chrome must be closed before running (the script launches Chrome with your profile)

Markdown Format

Use --- on its own line to separate tweets. Use ![alt](./path.png) for images.

markdown
---
delay_ms: 2000
---
First tweet. The hook that grabs attention.
---
Second tweet, elaborating.
![diagram](./img.png)
---
Final tweet with a call to action.

See references/thread-format.md for full spec.

Preview Thread Structure

Before posting, preview how the markdown will be split:

bash
${BUN_X} {baseDir}/scripts/md-to-thread.ts <file.md>

Output shows each tweet's text, character count, and image count.

Post a Thread

Preview mode (default)
bash
${BUN_X} {baseDir}/scripts/x-thread.ts <file.md>

Opens Chrome, fills the first tweet only. You review and can manually submit. Remaining tweets are not posted.

Auto-post full thread
bash
${BUN_X} {baseDir}/scripts/x-thread.ts <file.md> --submit

Posts all tweets in sequence. Each reply chains to the previous tweet.

With options
bash
${BUN_X} {baseDir}/scripts/x-thread.ts <file.md> --submit --delay 3000
${BUN_X} {baseDir}/scripts/x-thread.ts <file.md> --submit --profile ~/my-chrome-profile

Parameters

ParameterDescription
<file.md>Markdown file (required)
--submitPost all tweets (default: preview first only)
--delay <ms>Delay between tweets (default: frontmatter or 2000)
`--profile <dir\mode>`local (default, your Chrome profile), isolated, or a custom directory path
--chrome <path>Chrome executable path

Workflow

1. Parse markdown: split by --- into tweets
2. Validate: each tweet <= 280 chars, max 4 images per tweet
3. Launch Chrome with CDP (persistent profile)
4. Post first tweet -> capture tweet URL
5. For each remaining tweet:
a. Navigate to previous tweet URL
b. Click reply button
c. Fill text + paste images
d. Submit -> capture new tweet URL
e. Wait delay_ms
6. Report completion

Troubleshooting

IssueFix
Chrome debug port not readyKill stale Chrome: pkill -f "Chrome.*remote-debugging-port"
Editor not foundLog in to X manually in the browser window
Reply button not foundTweet may not have loaded. Increase timeout or retry
Tweet over 280 charsSplit the tweet in your markdown file
Images not pastingRun the pre-flight check (see below)
bun not foundbrew install oven-sh/bun/bun or npm install -g bun

Pre-flight Check (Optional)

Before first use, verify the environment:

bash
${BUN_X} {baseDir}/../baoyu-post-to-x/scripts/check-paste-permissions.ts 2>/dev/null || echo "Check not available — verify Chrome and bun are installed"

Checks: Chrome, profile, bun, Accessibility (macOS), clipboard, paste keystroke.

Notes

  • Default uses your local Chrome profile (already logged in to X). Close Chrome before running.
  • Use --profile isolated if you want to run without closing Chrome (requires manual X login on first use)
  • All scripts only fill content into the browser; user reviews before posting
  • Threads with 5+ tweets: consider --delay 3000 or higher to avoid rate limits
  • Cross-platform: macOS, Linux, Windows

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/mugpeng/oh-my-skills-diy/peng-post-to-x-thread/badge)](https://verified-skill.com/skills/mugpeng/oh-my-skills-diy/peng-post-to-x-thread)

Something wrong with this skill or its page? Tell us.