ray-x-article

Write verified long-form articles and 5:2 covers into X Articles drafts via browser control.

160|18|Updated Jul 13, 2026
One-click install
npx skills add https://github.com/imraywang/rayskills --skill ray-x-article-imraywang
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ray-x-article
Source: https://github.com/imraywang/rayskills/tree/main/skills/ray-x-article
Command: npx skills add https://github.com/imraywang/rayskills --skill ray-x-article-imraywang

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Pillow, and includes scripts (resource) and references (resource) components.

What problem does it solve? Publishing long-form content to X Articles has no public draft API, so getting a finished Markdown article and cover image into the X Articles backend requires fragile manual browser work that often produces duplicate drafts, broken formatting, double-numbered lists, or accidental publishing. ## Core Features & Use Cases - Checked Delivery Package: Converts a local Markdown article into editor-ready HTML and plain text, validating title length, chapter headings, bold anchors, blank-line runs, 5:2 cover ratio, and translation attribution before any browser action. - Browser-Driven Draft Writing: Uses the host's browser or computer-control capability to create or update a draft in the logged-in X Articles editor, upload the cover through the file input element, paste rich text, and insert images at computed block positions. - Verification and Recovery: Compares Draft.js block counts, h1/h2 counts, bold counts, and start/end anchors against the delivery package, records the draft URL and content fingerprint back into the article frontmatter, and supports draft-needs-cover recovery without creating duplicates. - Use Case: After finishing a Chinese long-form article and generating its 5:2 cover, ask the agent to save it as an X Articles draft; it deduplicates against existing drafts, writes and verifies the content, and stops before Publish. ## Quick Start Use ray-x-article to save my finished article and its 5:2 cover as a verified X Articles draft without publishing it.

Frequently Asked Questions about ray-x-article

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I save a long article as an X Articles draft?▼

Run the prepare script on your Markdown article and 5:2 cover to build a checked delivery package, then let the browser-control capability open the X Articles editor, fill the title, paste the rich-text body, upload the cover, and verify the saved draft. The draft URL is written back to the article frontmatter.

Can I create an X Articles draft with the X API or xurl?▼

No. X has no public API for Article drafts, so the ordinary Post endpoint cannot create one. This Skill operates the logged-in X Articles web editor through browser or computer control instead, and stops at the draft stage.

What happens if a draft with the same title already exists?▼

The Skill first checks the locally recorded draft URL and then the Drafts list for a same-titled article. If one exists, it opens and updates that draft instead of creating a duplicate; only confirmed empty blank drafts may be deleted after failures.

Why does cover upload fail with a permission or Not allowed error?▼

Browser upload actions only accept file paths shared with the current session, and knowledge-base covers are usually outside that whitelist. Record the draft as draft-needs-cover, share the cover's folder with the session, then reopen the same draft URL and upload only the cover.

Does this Skill publish the article to X?▼

No. Its fixed endpoint is a verified draft; it never clicks Publish or opens the publish confirmation dialog. Public publishing is a separate explicit task, and a local automation pipeline can later detect the published Article and update the frontmatter status.

What article formatting is required before writing to X Articles?▼

Articles over 2000 characters need at least three chapter headings and three bold key statements, no consecutive blank-line runs, and a title under 120 characters. Translated or reposted pieces additionally require granted permission and visible source attribution in the body.