Prepares content for X (Twitter) and copies it to the clipboard. Supports regular posts, quote comments, video posts, and X Articles. Uses local filenames as media placeholders so the user can paste text first and insert files manually.
Prepare post drafts for X and copy them to the clipboard. This skill no longer automates X itself; any local Playwright usage is limited to rendering Markdown tables into local PNG files.
Use it when the user wants help drafting something for X and then plans to paste the text manually.
All scripts are in the scripts/ subdirectory of this skill.
Resolve the runtime as ${BUN_X}:
bun exists, use bunnpx exists, use npx -y bunTable rendering requirement:
playwright screenshot command to render tables into PNG files before insertion.| Script | Purpose |
|---|---|
scripts/x-browser.ts | Regular post draft: text plus image placeholders |
scripts/x-video.ts | Video post draft: text plus a video placeholder |
scripts/x-quote.ts | Quote-tweet comment copied to clipboard |
scripts/x-article.ts | X Article body copied to the clipboard with filename placeholders |
scripts/x-article-image.ts | Copy the next article image to the clipboard in insertion order |
scripts/md-to-html.ts | Parse Markdown article and cache remote images locally when needed |
scripts/copy-to-clipboard.ts | Clipboard helper for text, HTML, and images |
Unless the user says otherwise:
${BUN_X} {baseDir}/scripts/x-browser.ts "Hello!" --image ./photo.png
Behavior:
[Image: photo.png]Parameters:
<text>: post content--image <path>: local image file, repeatable, max 4${BUN_X} {baseDir}/scripts/x-video.ts --video ./clip.mp4 "Check this out!"
Behavior:
[Video: clip.mp4]Parameters:
<text>: post content--video <path>: required local video file${BUN_X} {baseDir}/scripts/x-quote.ts https://x.com/user/status/123 "Great insight!"
Behavior:
Parameters:
<tweet-url>: target tweet URL<comment>: optional quote comment${BUN_X} {baseDir}/scripts/x-article.ts article.md
${BUN_X} {baseDir}/scripts/x-article.ts article.md --cover ./cover.jpg
Behavior:
[Image: chart.png]x-article-image.ts can copy the next image for insertion./xa-next and ./xa-coverImage helper:
${BUN_X} {baseDir}/scripts/x-article-image.ts article.md --next
${BUN_X} {baseDir}/scripts/x-article-image.ts article.md --copy-cover
cd /path/to/article-dir && ./xa-next
cd /path/to/article-dir && ./xa-cover
Behavior:
--copy-cover--peek, --prev, --status, --reset, --index <n>, and --open-folderParameters:
<markdown>: Markdown file--cover <path>: override cover image with a local file--title <text>: override titleFrontmatter supported:
titlecover_imagecoverimage.buhuaguo-post-x-assets/ cache next to the Markdown file before generating placeholders.--submit and --profile may still appear in old habits; scripts should ignore them with a warning instead of automating anythingreferences/regular-posts.md for the manual posting workflowreferences/articles.md for the Markdown article workflow