baoyu-post-to-x
Post to X (Twitter)
Post content, images, and long-form articles to X using real Chrome browser (bypasses anti-bot detection).
Script Directory
Important: All scripts are located in the scripts/ subdirectory of this skill.
Agent Execution Instructions:
- Determine this SKILL.md file's directory path as
SKILL_DIR - Script path =
${SKILL_DIR}/scripts/<script-name>.ts - Replace all
${SKILL_DIR}in this document with the actual path
Script Reference:
| Script | Purpose |
|---|---|
scripts/x-browser.ts |
Regular posts (text + images) |
scripts/x-article.ts |
Long-form article publishing (Markdown) |
scripts/md-to-html.ts |
Markdown → HTML conversion |
scripts/copy-to-clipboard.ts |
Copy content to clipboard |
scripts/paste-from-clipboard.ts |
Send real paste keystroke |
Prerequisites
- Google Chrome or Chromium installed
buninstalled (for running scripts)- First run: log in to X in the opened browser window
References
- Regular Posts: See
references/regular-posts.mdfor manual workflow, troubleshooting, and technical details - X Articles: See
references/articles.mdfor long-form article publishing guide
Regular Posts
Text + up to 4 images.
# Preview mode (doesn't post)
npx -y bun ${SKILL_DIR}/scripts/x-browser.ts "Hello from Claude!" --image ./screenshot.png
# Actually post
npx -y bun ${SKILL_DIR}/scripts/x-browser.ts "Hello!" --image ./photo.png --submit
Note:
${SKILL_DIR}represents this skill's installation directory. Agent replaces with actual path at runtime.
Parameters:
| Parameter | Description |
|---|---|
<text> |
Post content (positional argument) |
--image <path> |
Image file path (can be repeated, max 4) |
--submit |
Actually post (default: preview only) |
--profile <dir> |
Custom Chrome profile directory |
X Articles
Long-form Markdown articles (requires X Premium).
# Preview mode
npx -y bun ${SKILL_DIR}/scripts/x-article.ts article.md
# With cover image
npx -y bun ${SKILL_DIR}/scripts/x-article.ts article.md --cover ./cover.jpg
# Publish
npx -y bun ${SKILL_DIR}/scripts/x-article.ts article.md --submit
Parameters:
| Parameter | Description |
|---|---|
<markdown> |
Markdown file path (positional argument) |
--cover <path> |
Cover image path |
--title <text> |
Override article title |
--submit |
Actually publish (default: preview only) |
Frontmatter (optional):
---
title: My Article Title
cover_image: /path/to/cover.jpg
---
Notes
- First run requires manual login (session is saved)
- Always preview before using
--submit - Browser closes automatically after operation
- Supports macOS, Linux, and Windows
Extension Support
Custom configurations via EXTEND.md.
Check paths (priority order):
.baoyu-skills/baoyu-post-to-x/EXTEND.md(project)~/.baoyu-skills/baoyu-post-to-x/EXTEND.md(user)
If found, load before workflow. Extension content overrides defaults.
More from xuanxuan1983/baoyu-xuanyi-skills
baoyu-slide-deck
Generate professional slide deck images from content. Creates comprehensive outlines with style instructions, then generates individual slide images. Use when user asks to "create slides", "make a presentation", "generate deck", or "slide deck".
5baoyu-xhs-images
Xiaohongshu (Little Red Book) infographic series generator with multiple style options. Breaks down content into 1-10 cartoon-style infographics. Use when user asks to create "小红书图片", "XHS images", or "RedNote infographics".
5release-skills
Release workflow for baoyu-skills plugin. This skill should be used when the user wants to create a new release version. It analyzes changes since the last version tag, updates changelogs (EN/CN), bumps the version in marketplace.json, commits changes, and creates a version tag. Supports dry-run mode and breaking change detection.
4baoyu-comic
Knowledge comic creator supporting multiple styles (Logicomix/Ligne Claire, Ohmsha manga guide). Creates original educational comics with detailed panel layouts and sequential image generation. Use when user asks to create "知识漫画", "教育漫画", "biography comic", "tutorial comic", or "Logicomix-style comic".
4baoyu-post-to-wechat
Post content to WeChat Official Account (微信公众号). Supports both article posting (文章) and image-text posting (图文).
4baoyu-danger-gemini-web
Image generation skill using Gemini Web. Generates images from text prompts via Google Gemini. Also supports text generation. Use as the image generation backend for other skills like cover-image, xhs-images, article-illustrator.
4