Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
freestylefly avatar

Canghe Post To X

  • 459 installs
  • 424 repo stars
  • Updated June 8, 2026
  • freestylefly/canghe-skills

canghe-post-to-x is an agent skill that composes and publishes tweets or threads to X.com from an agent workflow for developers who need social distribution and brand updates without leaving the coding environment.

About

canghe-post-to-x is a Canghe agent skill for composing and publishing tweets or multi-post threads to X.com directly from an agent workflow. The skill enables social distribution, product announcements, and engagement updates without switching to a separate social client. Developers reach for canghe-post-to-x after shipping features or drafting release notes they want to broadcast on X. It automates the compose-and-publish step for X.com rather than building in-app UI or SEO pages. Use it when agent-driven workflows should post finished copy to X as part of a launch or growth routine.

  • X.com tweet publishing from agents
  • Thread and single-post composition
  • Social distribution automation
  • Brand voice and engagement workflows
  • Integrates with growth content pipelines

Canghe Post To X by the numbers

  • 459 all-time installs (skills.sh)
  • Ranked #784 of 1,879 Marketing & SEO skills by installs in the Skillselion catalog
  • Data as of Jul 31, 2026 (Skillselion catalog sync)
npx skills add https://github.com/freestylefly/canghe-skills --skill canghe-post-to-x

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs459
repo stars424
Last updatedJune 8, 2026
Repositoryfreestylefly/canghe-skills

How do you post tweets from an agent workflow?

Compose and publish tweets or threads to X.com from an agent workflow, enabling social distribution, brand updates, and engagement without leaving the coding environment.

Who is it for?

Developers who publish product updates and threads to X.com from agent workflows after content is ready.

Skip if: Developers who need LinkedIn scheduling, in-app social features, or long-form blog SEO instead of X.com posting.

When should I use this skill?

The user asks to compose, schedule, or publish a tweet or thread to X.com from an agent session.

What you get

Published X.com tweets or threads and drafted social copy ready for distribution

  • published X.com posts
  • thread copy

Files

SKILL.mdMarkdownGitHub ↗

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:

ScriptPurpose
scripts/x-browser.tsRegular posts (text + images)
scripts/x-video.tsVideo posts (text + video)
scripts/x-quote.tsQuote tweet with comment
scripts/x-article.tsLong-form article publishing (Markdown)
scripts/md-to-html.tsMarkdown → HTML conversion
scripts/copy-to-clipboard.tsCopy content to clipboard
scripts/paste-from-clipboard.tsSend real paste keystroke
scripts/check-paste-permissions.tsVerify environment & permissions

Preferences (EXTEND.md)

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

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

# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL)
test -f "$HOME/.canghe-skills/canghe-post-to-x/EXTEND.md" && echo "user"

┌──────────────────────────────────────────────────┬───────────────────┐ │ Path │ Location │ ├──────────────────────────────────────────────────┼───────────────────┤ │ .canghe-skills/canghe-post-to-x/EXTEND.md │ Project directory │ ├──────────────────────────────────────────────────┼───────────────────┤ │ $HOME/.canghe-skills/canghe-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:

CheckFix
ChromeInstall Chrome or set X_BROWSER_CHROME_PATH env var
Profile dirEnsure ~/.local/share/x-browser-profile is writable
Bun runtime`curl -fsSL https://bun.sh/install \
Accessibility (macOS)System Settings → Privacy & Security → Accessibility → enable terminal app
Clipboard copyEnsure 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:

ParameterDescription
<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:

ParameterDescription
<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:

ParameterDescription
<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:

ParameterDescription
<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.

Related skills

How it compares

Pick canghe-post-to-x over SEO skills when the channel is X.com social posting, not on-page metadata or search ranking work.

FAQ

What does canghe-post-to-x publish?

canghe-post-to-x composes and publishes tweets or multi-post threads to X.com from agent workflows, supporting product announcements, brand updates, and social distribution without a separate client.

When should developers use canghe-post-to-x?

Developers should use canghe-post-to-x when release copy or updates are ready and need posting to X.com as part of an agent-driven launch or growth workflow.

Marketing & SEOdistributioncontent

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.