I Turned the Open-Source Twitter/X Algorithm Into an Agent Skill

I Turned the Open-Source Twitter/X Algorithm Into an Agent Skill

X Updated the Ranker Yesterday. I Shipped a Skill Today.

Yesterday β€” May 15, 2026 β€” xai-org pushed an update to x-algorithm, the open-source Twitter/X recommendation ranker. The repo has been public since March 2023, but the May 2026 release is the first material change in over a year β€” and it shifts what actually wins in the feed.

So I built a skill on top of it. An Agent Skill β€” a single SKILL.md plus a references/ folder β€” that bakes the new scorer behavior into a writing workflow. It ships today: github.com/jnkindi/x-post-generator-skill.

Most "AI tweet generators" optimize for output volume and haven't read the source. This one optimizes for the May 2026 ranker specifically.

What Actually Drives Amplification

The Twitter/X ranker has 19 prediction heads. Six of them carry the heaviest positive weight in the final score: reply, quote, dwell, profile_click, repost, follow_author. Four carry the heaviest negative weight: block, mute, report, not_interested. Everything in between is noise compared to those ten.

That single fact, taken seriously, reframes the entire writing problem. A like is cheap. A reply triggers three positive heads at once (dwell + reply + profile_click) β€” the strongest amplification chain in the system. A report from a high-credibility account offsets hundreds of likes. "Engagement" isn't a metric; it's a weighted sum where the signs matter more than the magnitudes.

The Six Operating Principles

The skill compresses the ranker into six rules that apply at draft time:

  1. Specificity beats cleverness. Concrete numbers, file paths, direct quotes, percentages. The eye locks; the ranker sees dwell.
  2. Reply provocation > like provocation. End with a question, a forced choice, or a contrarian take. Replies cascade through three positive heads.
  3. Design for screenshot independence. The best post is one strangers screenshot into their own threads. That's virality that doesn't require your engagement.
  4. Pacing is a constraint, not a suggestion. The home-mixer's author-diversity scorer attenuates repeat authors in a feed. Your second post the same day gets penalized; the third gets crushed.
  5. Anti-bait. Sharp β‰  abrasive. Engagement-bait, rage-bait, hashtag spam, and mention spam all trip the negative heads.
  6. One owned channel. Every campaign includes a Substack or newsletter. Owned channels survive algorithm changes; the algorithm could change tomorrow.

A Skill, Not a Library

The interesting choice is the packaging. This isn't an npm module. It's a SKILL.md following the Agent Skills spec β€” plain markdown loaded into your agent's context window the moment the request matches ("write a tweet," "plan a launch campaign," "go viral about my paper").

That packaging matters. A skill runs inside whatever model you already pay for β€” Claude Code, Codex CLI, Cursor with a rules file, Gemini, any MCP-aware client. No API key to manage, no SaaS layer between you and the model, no telemetry. The skill is the prompt; the model is the engine you already own.

The Workflow It Actually Runs

The skill executes six phases in order. The first one is the only one that matters:

Phase 1 β€” Discovery. Before drafting anything, the agent reads the primary sources β€” the codebase, the paper, the README, the launch post β€” and produces an internal intelligence brief: the headline claim in one sentence, five to ten specific numbers with sources, three to five surprising design decisions, five to ten obvious gaps. Skipping this phase is the single largest predictor of generic, non-trending output. With the brief, every post writes itself. Without it, every post sounds like every other AI tweet generator.

Phases 2 through 6 mine angles, rank candidates by ranker fit (Tier S / A / B), compose a 7-to-14-day schedule that respects author-diversity, write Hacker News / Reddit / Substack variants for every Tier S post, and run an anti-bait pre-publish self-check.

Why Cross-Platform Is in the Skill

Twitter/X is the starting line, not the destination. Every Tier S draft ships with a Hacker News variant (different hook, different first line, no thread), a Reddit variant (subreddit-targeted, no link in body), and a Substack opener (1,500-word version of the best angle). Sequenced correctly, the same intelligence brief feeds four ranked feeds in one week. Ignored, it's a tweet that disappears in three hours.

What I'm Not Claiming

This won't make a bad post good. It won't manufacture an audience you don't have. The cited scorers track the May 15, 2026 xai-org/x-algorithm release; the ranker will keep evolving and the skill will need to keep up. And it doesn't post for you β€” the output is a plan, not a published thread. Pair it with whichever scheduler you already use.

Install

git clone https://github.com/jnkindi/x-post-generator-skill.git \
  ~/.claude/skills/x-post-generator-skill

Project-local installs, Codex CLI, and Cursor/Windsurf rules-file fallbacks are all in the README. MIT licensed, zero telemetry, no SaaS.

β†’ github.com/jnkindi/x-post-generator-skill

#OpenSource #AgenticAI #ContentStrategy