This automates publishing Markdown articles to X's Premium Plus article editor while preserving rich text formatting. It converts your Markdown to HTML, handles image uploads through the clipboard, and positions everything correctly using block indices. The workflow is designed around X's quirky editor limitations: tables and Mermaid diagrams get converted to PNGs first, dividers have to be inserted manually through a menu because HTML hr tags don't work, and there's a specific order you follow (text first, then images, then dividers). It uses Playwright for browser automation and includes Python scripts for clipboard handling across macOS and Windows. Saves as draft by default, never auto-publishes.

skills.sh installs
324
GitHub stars
874
last updated
Aug 21, 2026

Install

$ npx -y skills add wshuyi/x-article-publisher-skill --skill x-article-publisher --agent claude-code

Installs into .claude/skills of the current project.

Files

X Article Publisher

Publish Markdown content to X (Twitter) Articles editor, preserving formatting with rich text conversion.

Prerequisites

  • Playwright MCP for browser automation
  • User logged into X with Premium Plus subscription
  • Python 3.9+ with dependencies:
    • macOS: pip install Pillow pyobjc-framework-Cocoa
    • Windows: pip install Pillow pywin32 clip-util
  • For Mermaid diagrams: npm install -g @mermaid-js/mermaid-cli

Scripts

Located in ~/.claude/skills/x-article-publisher/scripts/:

parse_markdown.py

Parse Markdown and extract structured data:

python parse_markdown.py <markdown_file> [--output json|html] [--html-only]

Returns JSON with: title, cover_image, content_images, dividers (with block_index for positioning), html, total_blocks

copy_to_clipboard.py

Copy image or HTML to system clipboard (cross-platform):

# Copy image (with optional compression)
python copy_to_clipboard.py image /path/to/image.jpg [--quality 80]

# Copy HTML for rich text paste
python copy_to_clipboard.py html --file /path/to/content.html

Sponsors

Details

Repository
github.com/wshuyi/x-article-publisher-skill
Category
Release Management
First seen
Jun 3, 2026
1epinvest516-web avatarmt5-tradingepinvest516-web/openclaw-skillsAutomated trading system management using Python and MetaTrader 5 API. V6.6 Predator Version with Infinite RR, Self-Evolution, and Triple-Resonance.323skills.sh installs
2sanky369 avatartweet-writersanky369/vibe-building-skillsWrite high-engagement tweets and X/Twitter threads, grounded in live research of what's currently working in the user's niche: researches viral examples via web322skills.sh installs
3jezweb avatarstreamlit-snowflakejezweb/claude-skillsBuild and deploy Streamlit apps natively in Snowflake. Covers snowflake.yml scaffolding, Snowpark sessions, multi-page structure, Marketplace publishing as Nati320skills.sh installs
4ndpvt-web avatarlatex-documentndpvt-web/latex-document-skillUniversal LaTeX document skill: create, compile, and convert any document to professional PDF with PNG previews. Supports resumes, reports, cover letters, invoi317skills.sh installs
5sattva2020 avatardokploy-api-mcpsattva2020/skillsDeploy and manage applications on Dokploy (self-hosted PaaS). Use when deploying apps, managing Docker Compose services, databases (PostgreSQL, MySQL, MariaDB, 312skills.sh installs
6incept5 avatareve-troubleshootingincept5/eve-skillpacksTroubleshoot common Eve deploy and job failures using CLI-first diagnostics.310skills.sh installs