Agent SkillsECNU-ICALK/AutoSkill › baoyu-post-to-x

baoyu-post-to-x

GitHub

通过真实Chrome浏览器向X(Twitter)发布文本、媒体或长文,支持绕过反自动化检测。适用于用户要求发帖、推文或分享内容的场景。

SkillBank/Common/baoyu-skills/baoyu-post-to-x/SKILL.md ECNU-ICALK/AutoSkill

Trigger Scenarios

post to X tweet publish to Twitter share on X

Install

npx skills add ECNU-ICALK/AutoSkill --skill baoyu-post-to-x -g -y
More Options

Non-standard path

npx skills add https://github.com/ECNU-ICALK/AutoSkill/tree/main/SkillBank/Common/baoyu-skills/baoyu-post-to-x -g -y

Use without installing

npx skills use ECNU-ICALK/AutoSkill@baoyu-post-to-x

指定 Agent (Claude Code)

npx skills add ECNU-ICALK/AutoSkill --skill baoyu-post-to-x -a claude-code -g -y

安装 repo 全部 skill

npx skills add ECNU-ICALK/AutoSkill --all -g -y

预览 repo 内 skill

npx skills add ECNU-ICALK/AutoSkill --list

SKILL.md

Frontmatter
{
    "id": "3ce4f208-e308-5017-b05b-6a6ac08218aa",
    "name": "baoyu-post-to-x",
    "description": "Posts content and articles to X (Twitter). Supports regular posts with images\/videos and X Articles (long-form Markdown). Uses real Chrome with CDP to bypass anti-automation. Use when user asks to \"post to X\", \"tweet\", \"publish to Twitter\", or \"share on X\"."
}

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 SKILL_DIR
  2. Script path = ${SKILL_DIR}/scripts/<script-name>.ts
  3. 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-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)

Use Bash to check EXTEND.md existence (priority order):

# Check project-level first
test -f .baoyu-skills/baoyu-post-to-x/EXTEND.md && echo "project"

# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL)
test -f "$HOME/.baoyu-skills/baoyu-post-to-x/EXTEND.md" && echo "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.

npx -y bun ${SKILL_DIR}/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 Ensure ~/.local/share/x-browser-profile is writable
Bun runtime curl -fsSL https://bun.sh/install | bash
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

Regular Posts

Text + up to 4 images.

npx -y bun ${SKILL_DIR}/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.

npx -y bun ${SKILL_DIR}/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.

npx -y bun ${SKILL_DIR}/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).

npx -y bun ${SKILL_DIR}/scripts/x-article.ts article.md
npx -y bun ${SKILL_DIR}/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.


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.

Version History

  • 94c47ca Current 2026-07-24 12:34

Same Skill Collection

SkillBank/Common/anthropics-skill/algorithmic-art/SKILL.md
SkillBank/Common/anthropics-skill/brand-guidelines/SKILL.md
SkillBank/Common/anthropics-skill/canvas-design/SKILL.md
SkillBank/Common/anthropics-skill/doc-coauthoring/SKILL.md
SkillBank/Common/anthropics-skill/frontend-design/SKILL.md
SkillBank/Common/anthropics-skill/internal-comms/SKILL.md
SkillBank/Common/anthropics-skill/mcp-builder/SKILL.md
SkillBank/Common/anthropics-skill/pdf/SKILL.md
SkillBank/Common/anthropics-skill/skill-creator/SKILL.md
SkillBank/Common/anthropics-skill/slack-gif-creator/SKILL.md
SkillBank/Common/anthropics-skill/theme-factory/SKILL.md
SkillBank/Common/anthropics-skill/web-artifacts-builder/SKILL.md
SkillBank/Common/anthropics-skill/webapp-testing/SKILL.md
SkillBank/Common/AwesomeClaudeSkills/artifacts-builder/SKILL.md
SkillBank/Common/AwesomeClaudeSkills/brand-guidelines/SKILL.md
SkillBank/Common/AwesomeClaudeSkills/canvas-design/SKILL.md
SkillBank/Common/AwesomeClaudeSkills/changelog-generator/SKILL.md
SkillBank/Common/AwesomeClaudeSkills/competitive-ads-extractor/SKILL.md
SkillBank/Common/AwesomeClaudeSkills/connect-apps/SKILL.md
SkillBank/Common/AwesomeClaudeSkills/connect/SKILL.md
SkillBank/Common/AwesomeClaudeSkills/content-research-writer/SKILL.md
SkillBank/Common/AwesomeClaudeSkills/developer-growth-analysis/SKILL.md
SkillBank/Common/AwesomeClaudeSkills/domain-name-brainstormer/SKILL.md
SkillBank/Common/AwesomeClaudeSkills/file-organizer/SKILL.md
SkillBank/Common/AwesomeClaudeSkills/image-enhancer/SKILL.md
SkillBank/Common/AwesomeClaudeSkills/internal-comms/SKILL.md
SkillBank/Common/AwesomeClaudeSkills/invoice-organizer/SKILL.md
SkillBank/Common/AwesomeClaudeSkills/lead-research-assistant/SKILL.md
SkillBank/Common/AwesomeClaudeSkills/mcp-builder/SKILL.md
SkillBank/Common/AwesomeClaudeSkills/meeting-insights-analyzer/SKILL.md
SkillBank/Common/AwesomeClaudeSkills/raffle-winner-picker/SKILL.md
SkillBank/Common/AwesomeClaudeSkills/slack-gif-creator/SKILL.md
SkillBank/Common/AwesomeClaudeSkills/tailored-resume-generator/SKILL.md
SkillBank/Common/AwesomeClaudeSkills/theme-factory/SKILL.md
SkillBank/Common/AwesomeClaudeSkills/twitter-algorithm-optimizer/SKILL.md
SkillBank/Common/AwesomeClaudeSkills/webapp-testing/SKILL.md
SkillBank/Common/AwesomeClaudeSkills/youtube-downloader/SKILL.md
SkillBank/Common/baoyu-skills/baoyu-article-illustrator/SKILL.md
SkillBank/Common/baoyu-skills/baoyu-comic/SKILL.md
SkillBank/Common/baoyu-skills/baoyu-compress-image/SKILL.md
SkillBank/Common/baoyu-skills/baoyu-cover-image/SKILL.md
SkillBank/Common/baoyu-skills/baoyu-danger-gemini-web/SKILL.md
SkillBank/Common/baoyu-skills/baoyu-danger-x-to-markdown/SKILL.md
SkillBank/Common/baoyu-skills/baoyu-format-markdown/SKILL.md
SkillBank/Common/baoyu-skills/baoyu-image-gen/SKILL.md
SkillBank/Common/baoyu-skills/baoyu-infographic/SKILL.md
SkillBank/Common/baoyu-skills/baoyu-markdown-to-html/SKILL.md
SkillBank/Common/baoyu-skills/baoyu-post-to-wechat/SKILL.md
SkillBank/Common/baoyu-skills/baoyu-slide-deck/SKILL.md

Metadata

Files
0
Version
94c47ca
Hash
822b6776
Indexed
2026-07-24 12:34

trang chủ - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-04 05:01
浙ICP备14020137号-1 $bản đồ khách truy cập$