baoyu-post-to-x

jimliu/baoyu-skills · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/jimliu/baoyu-skills --skill baoyu-post-to-x
0 commentsdiscussion
summary

Post text, images, videos, and long-form articles to X via real Chrome browser automation.

  • Supports four post types: regular posts with images, video posts, quote tweets, and long-form Markdown articles (X Premium required)
  • Uses real Chrome with Chrome DevTools Protocol to bypass anti-bot detection; session persists after first manual login
  • Scripts fill content into the browser compose window; user reviews and publishes manually
  • Requires bun runtime and Google Chrome or Chromium;
skill.md

Post to X (Twitter)

Posts text, images, videos, and long-form articles to X via real Chrome browser (bypasses anti-bot detection).

Script Directory

Important: All scripts are located in the scripts/ subdirectory of this skill.

Agent Execution Instructions:

  1. Determine this SKILL.md file's directory path as {baseDir}
  2. Script path = {baseDir}/scripts/<script-name>.ts
  3. Replace all {baseDir} in this document with the actual path
  4. Resolve ${BUN_X} runtime: if bun installed → bun; if npx available → npx -y bun; else suggest installing bun

Script Reference:

Script Purpose
scripts/x-browser.ts Regular posts (text + images)
scripts/x-video.ts Video posts (text + video)
scripts/x-quote.ts Quote tweet with comment
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
scripts/check-paste-permissions.ts Verify environment & permissions

Preferences (EXTEND.md)

Check EXTEND.md existence (priority order):

# macOS, Linux, WSL, Git Bash
test -f .baoyu-skills/baoyu-post-to-x/EXTEND.md && echo "project"
test -f "${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-post-to-x/EXTEND.md" && echo "xdg"
test -f "$HOME/.baoyu-skills/baoyu-post-to-x/EXTEND.md" && echo "user"
# PowerShell (Windows)
if (Test-Path .baoyu-skills/baoyu-post-to-x/EXTEND.md) { "project" }
$xdg = if ($env:XDG_CONFIG_HOME) { $env:XDG_CONFIG_HOME } else { "$HOME/.config" }
if (Test-Path "$xdg/baoyu-skills/baoyu-post-to-x/EXTEND.md") { "xdg" }
if (Test-Path "$HOME/.baoyu-skills/baoyu-post-to-x/EXTEND.md") { "user" }

┌──────────────────────────────────────────────────┬───────────────────┐ │ Path │ Location │ ├──────────────────────────────────────────────────┼───────────────────┤ │ .baoyu-skills/baoyu-post-to-x/EXTEND.md │ Project directory │ ├──────────────────────────────────────────────────┼───────────────────┤ │ $HOME/.baoyu-skills/baoyu-post-to-x/EXTEND.md │ User home │ └──────────────────────────────────────────────────┴───────────────────┘

┌───────────┬───────────────────────────────────────────────────────────────────────────┐ │ Result │ Action │ ├───────────┼───────────────────────────────────────────────────────────────────────────┤ │ Found │ Read, parse, apply settings │ ├───────────┼───────────────────────────────────────────────────────────────────────────┤ │ Not found │ Use defaults │ └───────────┴───────────────────────────────────────────────────────────────────────────┘

EXTEND.md Supports: Default Chrome profile

Prerequisites

  • Google Chrome or Chromium
  • bun runtime
  • First run: log in to X manually (session saved)

Pre-flight Check (Optional)

Before first use, suggest running the environment check. User can skip if they prefer.

${BUN_X} {baseDir}/scripts/check-paste-permissions.ts

Checks: Chrome, profile isolation, Bun, Accessibility, clipboard, paste keystroke, Chrome conflicts.

If any check fails, provide fix guidance per item:

Check Fix
Chrome Install Chrome or set X_BROWSER_CHROME_PATH env var
Profile dir Shared profile at baoyu-skills/chrome-profile (see CLAUDE.md Chrome Profile section)
Bun runtime brew install oven-sh/bun/bun (macOS) or npm install -g bun
Accessibility (macOS) System Settings → Privacy & Security → Accessibility → enable terminal app
Clipboard copy Ensure Swift/AppKit available (macOS Xcode CLI tools: xcode-select --install)
Paste keystroke (macOS) Same as Accessibility fix above
Paste keystroke (Linux) Install xdotool (X11) or ydotool (Wayland)

References

  • Regular Posts: See references/regular-posts.md for manual workflow, troubleshooting, and technical details
  • X Articles: See references/articles.md for long-form article publishing guide

Post Type Selection

Unless the user explicitly specifies the post type:

  • Plain text + within 10,000 characters → Regular Post (Premium members support up to 10,000 characters, non-Premium: 280)
  • Markdown file (.md) → X Article

Regular Posts

${BUN_X} {baseDir}/scripts/x-browser.ts "Hello!" --image ./photo.png

Parameters:

Parameter Description
<text> Post content (positional)
--image <path> Image file (repeatable, max 4)
--profile <dir> Custom Chrome profile

Note: Script opens browser with content filled in. User reviews and publishes manually.


Video Posts

Text + video file.

${BUN_X} {baseDir}/scripts/x-video.ts "Check this out!" --video ./clip.mp4

Parameters:

Parameter Description
<text> Post content (positional)
--video <path> Video file (MP4, MOV, WebM)
--profile <dir> Custom Chrome profile

Note: Script opens browser with content filled in. User reviews and publishes manually.

Limits: Regular 140s max, Premium 60min. Processing: 30-60s.


Quote Tweets

Quote an existing tweet with comment.

${BUN_X} {baseDir}/scripts/x-quote.ts https://x.com/user/status/123 "Great insight!"

Parameters:

Parameter Description
<tweet-url> URL to quote (positional)
<comment> Comment text (positional, optional)
--profile <dir> Custom Chrome profile

Note: Script opens browser with content filled in. User reviews and publishes manually.


X Articles

Long-form Markdown articles (requires X Premium).

${BUN_X} {baseDir}/scripts/x-article.ts article.md
${BUN_X} {baseDir}/scripts/x-article.ts article.md --cover ./cover.jpg

Parameters:

Parameter Description
<markdown> Markdown file (positional)
--cover <path> Cover image
--title <text> Override title

Frontmatter: title, cover_image supported in YAML front matter.

Note: Script opens browser with article filled in. User reviews and publishes manually.

Post-Composition Check: The script automatically verifies after all images are inserted:

  • Remaining XIMGPH_ placeholders in editor content
  • Expected vs actual image count

If the check fails (warnings in output), alert the user with the specific issues before they publish.


Troubleshooting

Chrome debug port not ready

If a script fails with Chrome debug port not ready or Unable to connect, kill existing Chrome CDP instances first, then retry:

pkill -f "Chrome.*remote-debugging-port" 2>/dev/null; pkill -f "Chromium.*remote-debugging-port" 2>/dev/null; sleep 2

Important: This should be done automatically — when encountering this error, kill Chrome CDP instances and retry the command without asking the user.

Notes

  • First run: manual login required (session persists)
  • All scripts only fill content into the browser, user must review and publish manually
  • Cross-platform: macOS, Linux, Windows

Extension Support

Custom configurations via EXTEND.md. See Preferences section for paths and supported options.

how to use baoyu-post-to-x

How to use baoyu-post-to-x on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add baoyu-post-to-x
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/jimliu/baoyu-skills --skill baoyu-post-to-x

The skills CLI fetches baoyu-post-to-x from GitHub repository jimliu/baoyu-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/baoyu-post-to-x

Reload or restart Cursor to activate baoyu-post-to-x. Access the skill through slash commands (e.g., /baoyu-post-to-x) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.734 reviews
  • Emma Sethi· Dec 28, 2024

    We added baoyu-post-to-x from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Ganesh Mohane· Dec 16, 2024

    baoyu-post-to-x is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Shikha Mishra· Dec 12, 2024

    baoyu-post-to-x has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Li Harris· Dec 8, 2024

    Solid pick for teams standardizing on skills: baoyu-post-to-x is focused, and the summary matches what you get after install.

  • Evelyn Chen· Nov 27, 2024

    baoyu-post-to-x has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Aanya Perez· Nov 19, 2024

    Useful defaults in baoyu-post-to-x — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Aisha Diallo· Nov 7, 2024

    baoyu-post-to-x is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Yash Thakker· Nov 3, 2024

    Solid pick for teams standardizing on skills: baoyu-post-to-x is focused, and the summary matches what you get after install.

  • Hassan Huang· Oct 26, 2024

    baoyu-post-to-x fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Dhruvi Jain· Oct 22, 2024

    We added baoyu-post-to-x from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

showing 1-10 of 34

1 / 4