
X Article Publisher
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-codeInstalls 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
- macOS:
- 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