Content Creation / workflow case

I open-sourced a plugin that boosted my article publishing efficiency on X by 10x

Beginner to intermediate Set up once, then iterate continuously @punk2898
Result

X long-form post publishing time cut from ~15 minutes to 5 seconds | Markdown → Chrome extension → X Article one-click import workflow

For

People who frequently publish local Markdown articles to X and want to cut down on manual formatting and image uploading

Here's the bottom line: writing a long post takes 3 hours—but publishing it? That's another 15 minutes. This plugin turns those 15 minutes into 5 seconds.

*PS: This post is nearly 1,600 words. Save it first, read at your leisure 😘*

If you've ever posted a long thread on X, you know the feeling: "Finally done writing, but damn, publishing is gonna take forever 😂". This thing flattens that mountain.

Table of Contents:

📝 That 15 minutes after you finish writing is the real nightmare

🔧 I built something: a Chrome extension + a local script

📥 Three-step install, set it and forget it

How to use it? Publishing becomes a thrill

🔍 The principle in one sentence

🔗 Open source on GitHub—grab it and go

GitHub: https://github.com/punk2898/x-article-publisher

No more fluff—let's dive in 🙏

🧵🧵🧵

1. That 15 minutes after you finish writing is the real nightmare 😩

Image
Image

The real grunt work starts after you "finish writing"

You've written a Markdown article—thousands of words, with a cover image and a few screenshots in the body. Then what?

  • Step 1: Switch Markdown to preview mode
  • Step 2: Select all, copy
  • Step 3: Open X's article composer, click "New Article"
  • Step 4: Paste
  • Step 5: Format is completely wrecked. Headings not recognized, bold gone, links turned into plain text. You have to manually fix everything one by one
  • Step 6: Go back to your local folder, find the cover image, save it
  • Step 7: Go back to X, upload the cover
  • Step 8: Copy each inline image one by one, making sure the order doesn't shift
  • Step 9: Do a final review

The whole thing takes 10–15 minutes. Nothing complicated, but you have to repeat it every single time you publish—a huge mental drain.

That was my daily life for the past few months.

So I did something about it.

2. I built something: a Chrome extension + a local script 🔧

Image
Image

Under 1,000 lines of code combined, zero dependencies.

What it does is dead simple:

You finish your Markdown article. You type one command in your terminal. Chrome automatically opens X's article page. You click the 📥 Import Article button in the top-right corner—and the title, cover image, body, inline images, and formatting all load in perfectly. All you have to do is hit Publish.

In short: one-click import.

How? It directly manipulates X's internal React state, writing the article content into the Draft.js editor. No simulated keystrokes, no screenshot OCR—it goes straight through X's own data pipeline. So formatting is 100% perfect, images go through X's native uploader, and the title/cover are set using X's internal APIs.

The whole process takes 5 seconds. Then you grab a drink, review it, and hit Publish.

3. Three-step install, set it and forget it 📥

Image
Image

PS: If you have a local writing system like OpenClaw or Hermes, just tell it to install the Skill from https://github.com/punk2898/x-article-publisher and follow its instructions.

For everyone else ⬇️

Install once, use forever—three steps, under 2 minutes total.

Step 1: Clone the repo

No npm install, no Python virtual environment. The project uses only Node.js built-in modules—zero dependencies.

Step 2: Install the Chrome extension

Open chrome://extensions → enable "Developer mode" in the top right → click "Load unpacked" → select the extension/ folder in the project.

After installation, a blue 📥 button will appear in the top-right corner of X's page.

Step 3: Use it when you need it

That's it. Install once, never touch it again.

4. How to use it? Publishing becomes a thrill ⚡

Image
Image

Here's the full flow—you'll find publishing so satisfying it's addictive.

You wrote an article locally: 054-xchat-deep-analysis.md. It has a cover image and 3 screenshots in the body. Standard Markdown—# for headings, ** for bold, ![]() for images.

Now open your terminal:

bash publish-to-x.sh ~/Desktop/punk2898/reference/054-xchat-deep-analysis.md

Chrome automatically opens [x.com/compose/articles/new](//x.com/compose/articles/new).

You click "New Article" to enter the editor. The blue button appears in the top-right: 📥 Import Article.

Click it. A preview window pops up—showing the title, cover image, how many paragraphs, how many images. Looks good? Click ✅ Import to Editor.

5 seconds later: Title in place, cover in place, body in place, all three inline images in place, formatting 100% correct.

Scroll through to double-check, hit Publish. Done.

Not complicated—just genuinely satisfying. Because you're no longer wasting your life on copy-paste.

PS: I personally integrated this into my PunkStudio and just click 'Publish' there 😁

5. The principle in one sentence 🔍

Image
Image

Climb the React Fiber tree → find the Draft.js editor → write data directly into it.

Same technical approach as xPoster (MIT licensed). No X API—because X doesn't have a public API for articles. No Puppeteer automation—X's anti-bot measures would kill that approach instantly.

The Chrome extension runs in your real browser session. X won't block you, because you're you.

That's also why it achieves 100% format fidelity—it's not "emulating a paste"; it's writing directly into the editor's memory. Bold becomes Draft.js BOLD, links become Draft.js LINK, images go through X's native onFilesAdded upload callback.

And by the way—why does regular paste break? Because X's article editor has a bunch of quirks: it treats line breaks as paragraphs, doesn't understand Markdown syntax, and even misrenders dashes. Manual pasting is fighting against all those quirks. Writing directly into memory bypasses them all.

6. It's one piece of my writing system—but it works standalone 🔗

Image
Image

To be honest, this is just a small piece of my entire content workflow.

My writing pipeline: Voice notes → Claude generates article → Hermes automation → final step: this plugin publishes to X.

But the plugin itself doesn't depend on Hermes or any other tool. As long as you have a Markdown file and a Chrome browser, you can use it. So I extracted extension/ and xarticle-server.js into a standalone project.

If you write long-form posts on X—no matter what tool or workflow you use—this plugin will save you that 15-minute chore every single time.

GitHub: https://github.com/punk2898/x-article-publisher

MIT licensed—grab it and go. Open an issue if you have problems, submit a PR if you have ideas.

Just pushed a major update—now supports full automation and scheduled posting. Hit the little bell 🔔 for updates.

Related