Marketplace baoyu-post-to-x
Post content and articles to X (Twitter). Supports regular posts with images and X Articles (long-form Markdown). Uses real Chrome with CDP to bypass anti-automation.
install
source · Clone the upstream repo
git clone https://github.com/aiskillstore/marketplace
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/aiskillstore/marketplace "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/jimliu/baoyu-post-to-x" ~/.claude/skills/aiskillstore-marketplace-baoyu-post-to-x && rm -rf "$T"
manifest:
skills/jimliu/baoyu-post-to-x/SKILL.mdsource content
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
in this document with the actual path${SKILL_DIR}
Script Reference:
| Script | Purpose |
|---|---|
| Regular posts (text + images) |
| Long-form article publishing (Markdown) |
| Markdown → HTML conversion |
| Copy content to clipboard |
| Send real paste keystroke |
Prerequisites
- Google Chrome or Chromium installed
installed (for running scripts)bun- First run: log in to X in the opened browser window
References
- Regular Posts: See
for manual workflow, troubleshooting, and technical detailsreferences/regular-posts.md - X Articles: See
for long-form article publishing guidereferences/articles.md
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:
represents this skill's installation directory. Agent replaces with actual path at runtime.${SKILL_DIR}
Parameters:
| Parameter | Description |
|---|---|
| Post content (positional argument) |
| Image file path (can be repeated, max 4) |
| Actually post (default: preview only) |
| 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 file path (positional argument) |
| Cover image path |
| Override article title |
| 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