Automation
x-publish avatar

x-publish

Automate drafting tweets and threads on X (Twitter) using browser automation. Ensures content is saved to drafts for manual review.

Introduction

x-publish is a specialized agent skill designed to bridge the gap between creative content generation and social media publishing. It leverages Playwright browser automation to interact directly with the X (Twitter) interface, allowing users to move content seamlessly from local production environments or AI generation outputs into the X composer. The skill is intentionally designed with a 'Draft-First' architecture, meaning it will never execute an auto-publish command. Instead, it systematically navigates the user's session to the compose window, handles text input through clipboard operations to bypass input limitations, and saves the final result into the drafts folder. This workflow provides an essential buffer for creators to perform final qualitative checks, verify formatting, and ensure brand alignment before the content goes live.

  • Automated navigation to X compose URL and draft management screens.

  • Support for single tweets and complex thread structures (up to 10-tweet chains).

  • Clipboard-based injection method ensuring compatibility with complex character sets and formatting.

  • Built-in session detection that prompts for manual login if the authenticated state is missing.

  • Error handling for character limits, network timeouts, and element interaction failures.

  • Machine-readable output via JSON blocks for integration into persistent state tracking loops.

  • Users should ensure their browser environment is pre-configured with the required Playwright MCP dependencies.

  • It is highly recommended to pair this skill with x-create to maintain a consistent feedback loop and post-creation workflow.

  • Input content should be pre-formatted for optimal thread structure to ensure correct parsing by the automation scripts.

  • The tool is designed for Python 3.9+ environments on macOS and Windows, utilizing OS-native clipboard libraries for stable performance.

  • Always review the terminal report output to confirm the draft location and verify the number of tweets captured in the draft session.

Repository Stats

Stars
240
Forks
40
Open Issues
2
Language
Python
Default Branch
main
Sync Status
Idle
Last Synced
May 1, 2026, 08:40 AM
View on GitHub