agentleFS
imMamdouhaboammarimMamdouhaboammar/x-post/SKILL.md

x-post

Skill1 starsChanged 3 months agoMITView on GitHub

Publish content, images, videos, quote tweets, long-form Markdown articles, and translated video workflows to X (Twitter) using real Chrome via Chrome DevTools Protocol (CDP) to bypass bot detection. Use when the user asks to post a tweet, publish an update to X, attach images or videos to a tweet, quote-tweet a link, publish a Markdown article to X Articles, or translate and republish a video with subtitles — even if they don't explicitly say "x-post" or "Twitter automation". Do NOT use for scraping tweets, reading feeds, or managing account settings.

13 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Before executing any script, verify environment dependencies → references/runtime-setup.md.

    line 20
  2. Very specific:

    Always Preview First: Run commands without --submit during development or manual review.

    line 141
  3. Very specific:

    Persistent Profile: All scripts share ~/.local/share/x-browser-profile so authentication is required only once.

    line 142

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

X Post

Automated, anti-bot-resilient publishing toolchain for X (Twitter) leveraging real Chrome instances controlled via Chrome DevTools Protocol (CDP).

Runtime Requirements (Pre-flight)

Before executing any script, verify environment dependencies → references/runtime-setup.md.

Essential Checklist:

  • Bun runtime installed (bun --version)
  • Google Chrome or Chromium installed (or X_BROWSER_CHROME_PATH set)
  • First-time run: authenticate into X in the opened Chrome window (session saved to ~/.local/share/x-browser-profile)
  • For video translation: yt-dlp, ffmpeg, and whisper-cli installed

If any required tool is missing, stop and inform the user immediately.


Capabilities & Navigation Map

Choose the workflow appropriate for the publishing task:

Content TypeScript PathDetails & Reference
Text & Imagesscripts/x-browser.tsSingle/multi-image posts & thread chains → references/regular-posts.md
Video Postsscripts/x-video.tsVideo uploads with transcode monitoring → references/video-posts.md
Quote Tweetsscripts/x-quote.tsQuote existing tweets with commentary → references/quote-tweets.md
Long-Form Articlesscripts/x-article.tsMarkdown articles with inline images → references/articles.md
Video Translationscripts/x-translate-video.tsSubtitle extraction, translation & burning → references/video-translation.md
Universal Distributionbin/x-post.jsClaude, Marketplace, npx, Skills.sh & all agents → references/distribution.md
TroubleshootingN/ASolutions for common errors → references/troubleshooting.md

1. Regular Posts (Text, Images & Threads)

Publish standard tweets with up to 4 images and thread replies.

# Preview mode (verifies compose box and keeps window open for 30s)
bun scripts/x-browser.ts "Exploring agentic automation with Antigravity!" --image ./screenshot.png

# Publish with images and thread reply
bun scripts/x-browser.ts "Announcing our new open-source release!" \
  --image ./banner.png \
  --reply "Check out the repo here: https://github.com/org/repo" \
  --submit
  • Details, image specs, and multi-thread chaining → references/regular-posts.md

2. Video Posts

Publish videos (MP4, MOV, WebM) with automatic upload and transcode polling.

# Preview video upload
bun scripts/x-video.ts --video ./demo.mp4 "Watch the complete architecture walkthrough"

# Publish video with source citation in reply thread
bun scripts/x-video.ts --video ./demo.mp4 \
  "Autonomous coding loop benchmark" \
  --reply "Benchmarked on SWE-bench verified dataset." \
  --submit
  • Duration limits, formats, and upload states → references/video-posts.md

3. Quote Tweets

Quote an existing public tweet with custom commentary while preserving source attribution.

# Preview quote tweet
bun scripts/x-quote.ts https://x.com/username/status/1234567890 "Important perspective on LLM agents!"

# Publish quote tweet directly
bun scripts/x-quote.ts https://x.com/username/status/1234567890 "Strongly agree with this analysis." --submit
  • URL normalization and menu selectors → references/quote-tweets.md

4. Long-Form X Articles (Markdown)

Convert Markdown documents with headings, lists, blockquotes, cover images, and inline images into X Articles (requires X Premium).

# Preview formatted article draft
bun scripts/x-article.ts ./article.md --cover ./cover.png

# Publish article directly
bun scripts/x-article.ts ./article.md --submit
  • Frontmatter syntax and image placeholder mechanics → references/articles.md

5. Video Translation & Subtitle Workflow

Download foreign-language video tweets, transcribe audio via Whisper, generate editable translation files, burn styled subtitles, and publish with source attribution.

# Step 1: Ingest URL and create translation draft (/tmp/x-translate/<id>/translation.md)
bun scripts/x-translate-video.ts https://x.com/username/status/1234567890 --target-lang English

# Step 2: Edit /tmp/x-translate/<id>/translation.md with translated copy & SRT

# Step 3: Burn subtitles and preview
bun scripts/x-translate-video.ts --confirm /tmp/x-translate/<id>/translation.md

# Step 4: Burn subtitles and publish
bun scripts/x-translate-video.ts --confirm /tmp/x-translate/<id>/translation.md --submit
  • Full pipeline and FFmpeg subtitle styling → references/video-translation.md

Execution Principles & Safety

  1. Always Preview First: Run commands without --submit during development or manual review.
  2. Persistent Profile: All scripts share ~/.local/share/x-browser-profile so authentication is required only once.
  3. Native Keystroke Dispatch: Media assets use hardware-level paste simulation (copy-to-clipboard.ts + paste-from-clipboard.ts) to avoid CDP synthetic event blocks.
  4. Issue Resolution: For login timeouts, clipboard permissions, or CDP connection errors → references/troubleshooting.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.