Content
publish-x-article avatar

publish-x-article

Publish Markdown articles to X (Twitter) Articles with rich formatting and automatic conversion of unsupported elements to images.

Introduction

The Publish X Article skill streamlines the process of migrating Markdown-based long-form content to the X Articles platform. Designed for content creators, bloggers, and technical writers who maintain their primary content in local Markdown files, this skill eliminates the manual friction of reformatting text, adjusting layouts, and handling unsupported media elements that often break when pasted into the X Articles editor. By leveraging the Playwright MCP for browser automation and specialized Python scripts for parsing, the skill ensures that your documentation, thought leadership pieces, or technical articles retain their structure and visual clarity.

  • Automatically detects and converts unsupported Markdown elements such as tables and Mermaid diagrams into PNG images using the diagramless.xyz API.

  • Implements intelligent header flattening logic to translate H3+ headings into bolded text or simplified hierarchy for X Premium and Premium+ formatting constraints.

  • Supports cover image uploads and preserves core rich text formatting like bold, italics, links, lists, and blockquotes.

  • Provides a subscription-aware workflow, prompting users for their X Premium or Premium+ status to apply specific formatting rules for each tier.

  • Integrates with the system clipboard via specialized scripts to facilitate seamless paste-and-publish workflows in the X editor.

  • Before publishing, ensure your environment is configured with the required dependencies, including Playwright, Pillow, and relevant system-level framework tools.

  • The skill acts as a pre-processing engine; it does not directly publish to the live feed but prepares your content for the X Articles draft environment to maintain maximum safety.

  • When encountering Mermaid diagrams or complex Markdown tables, the skill uses temporary files to generate high-fidelity images that remain clear on X's mobile and desktop interfaces.

  • Users should define their subscription tier early in the session; the agent will cache this setting to optimize content pre-processing for the specific limitations of their X subscription level.

Repository Stats

Stars
90
Forks
27
Open Issues
1
Language
Python
Default Branch
main
Sync Status
Idle
Last Synced
May 3, 2026, 06:34 PM
View on GitHub