A Claude skill that teaches Claude to write X (Twitter) posts engineered against the open-source For-You ranker.
X open-sourced its For-You feed algorithm three times: the legacy stack in March 2023, the Phoenix transformer in May 2026, and — on August 13 2026 — the actual production scoring weights, the visibility-filtering stack, and the labeling systems behind it.
That third release changes what this skill can tell you. xAI now runs cron scripts that sync production config values into home-mixer/params/param.rs, so the numbers are facts rather than inferences from 2023.
It also falsified most of what everyone "knew" about the algorithm — including four of this skill's own v1 rules. See What changed in v2.
When you ask Claude to write or review an X post, the skill:
- Drafts against 47 named policies derived from the published weights (e.g., P-21: "write something worth copying the link to —
share_via_copy_linkis 20.0, the highest weight in the system, 40× a like"). - Runs a 16-checkbox pre-flight scan before you post, citing the exact policy ID for any failure.
- Cites the algorithm directly — every recommendation is anchored to a code path (
home-mixer/scorers/ranking_scorer.rs) or a published production default, with confidence markers (🟢 published Aug 2026 / 🟠 reasoned / ⚫ retired). - Refuses to cite retired mechanics. TweepCred,
reply_engaged_by_author, and the 15-minute velocity cascade don't exist in the 2026 code. The skill names what replaced them instead of repeating folklore.
Examples:
- "Write me a launch post for [product]" → drafts → pre-flight scans → revises until every check passes → recommends timing + media plan.
- "Improve this tweet" → scores it against the algorithm → cites specific policy failures → proposes rewrites with magnitude estimates.
- "Should this be a thread?" → walks through the author-diversity math (
(1−0.25) × 0.5^position + 0.25— 5th tweet runs at ~30% of standalone score) and DedupConversationFilter behavior, defaults to "no" unless each tweet stands alone.
You: Write me an X post announcing a new open-source tool.
Claude (with x-algorithm-skill loaded):
Draft v1:
"Excited to announce our new open-source tool! It does X, Y, and Z. 🚀
Check it out: github.com/..."
[Pre-flight scan:]
✗ P-21 forwardable: nothing here a stranger would paste into a work chat
— forfeits share_via_copy_link (20.0), the highest weight in the system
✗ P-1 slop-vocab: "Excited to announce" is a high slop_score trigger
✗ P-5 quotable: no self-contained quotable line
✗ P-6 reply-bait: no disagreeable position
✗ P-2 concrete opener: first six words are generic
✓ P-4 original post (not a reply/repost)
...
Draft v2 (rewritten — sounds like a person, not a press release):
"built [Tool] because every existing option made me [do the annoying thing]
and I finally snapped.
it does [specific thing] using [specific approach] instead of [the obvious
default]. that one decision took [metric] from [X] to [Y], which I did not
expect to matter as much as it did.
works with [X], [Y] and [framework Z]. open source.
github.com/..."
[Pre-flight scan: all 16 pass — including the human-voice checks (15-16)]
[Weights targeted: share_via_copy_link 20.0 (the [X]→[Y] number is the
forwardable part), reply 5.0 / 20.0 from mutuals (the "obvious default"
claim invites pushback), follow_author 4.0]
[No timing advice offered — no published best hour exists. Local hour of
day is a learned model feature, but nothing says which hours it favours.
Post when your audience is awake.]
Note the rewrite has no em-dash bullet list and no "three things" triplet — those are AI-writing tells that trip the banger screen's literal
slop_score. Rule Zero is to sound like a human, not like optimized copy. A robotic-but-"optimized" post loses twice: it trips slop detection and nobody forwards it, which forfeits the 20.0 head.
The August 13 2026 release publishes the real production weights. That falsified four of this skill's five v1 rules, plus a lot of widely-repeated advice from elsewhere. Everything below is now marked ⚫ Retired in the docs rather than quietly deleted, so you can see what changed.
| v1 said | Reality in the Aug 2026 code |
|---|---|
| TweepCred ≥ 65 or only ~3 of your tweets distribute | tweepcred does not exist in the repo. Successor is user-cred-v2: score = clamp(165.2 + 7.07·ln(mass), 0, 100), with no published threshold |
reply_engaged_by_author = +75, "150× a like", the top lever |
The head does not exist. The published weight set is exhaustive and contains no author-reply signal |
| 10 replies in 15 minutes triggers an OON cascade | No velocity mechanism exists. Grep the repo for velocity: nothing |
report = −369 (≈738 likes) |
−234.0 — cancels 468 likes |
| Optimize for replies, dwell, and shares | DwellWeight = 0.0. Dwell earns nothing |
Video is the big under-used lever (vqv) |
vqv = 0.05, requires video >10s, and is gated on the viewer's follower count |
Banger screen quality_score >= 0.4 |
No such float. The screen emits a boolean isHighQuality — alongside a real slop_score |
| Blue Verified gets 4× / 2× | No verification multiplier exists in the published ranking path |
| MutualFollowJaccard lifts your ranking | The hydrator is disabled (EnableMutualFollowJaccardHydration = false) |
| 7 PTOS safety categories | 10 — adds ChildSafety, TerrorismOrViolentExtremism, CivicIntegrity |
And what's genuinely new:
share_via_copy_link= 20.0 — the highest weight in the system, and nothing in v1 targeted it- Bidirectional follow boost = +15 — mutual-follow originals get reply weight 20.0 instead of 5.0
- Author cold start — a published on-ramp for accounts under 1000 followers
- The 26 out-of-network-only drop rules — the actual "shadowban" mechanism, now enumerated
- Under the Hood (https://x.com/i/under_the_hood) — check your own labels instead of guessing
- Brand safety fails closed — an unscored post is
MediumRiskautomatically, and 🟠 replies most likely never get scored, so they fall through to it — a cost in ad adjacency, not reach CoordinatedSpamScorer— deep reciprocal reply chains under large accounts are modelled (it skips chains under two levels deep, and roots under 1000 followers, so a flat pod is out of scope)
Two examples had their core advice reversed, not just corrected:
05-account-warming.md (which told new accounts to spend weeks replying) and
03-reply-engagement.md (which was built entirely on the +75 head). Both carry a
banner explaining the change.
⚠️ Two steps. Both required. Don't skip step 1. Claude Code uses a marketplace-based plugin system; you must register this repo as a marketplace before you can install the plugin from it.
Step 1 — register this repo as a marketplace:
/plugin marketplace add ceoguy/x-algorithm-skill
Step 2 — install the plugin from the marketplace:
/plugin install x-algorithm@ceoguy-x-algorithm-skill
Then restart Claude Code so the new plugin loads. (Installing/updating a plugin requires a restart to apply — there is no live-reload command.)
Verifying the install worked:
/plugin marketplace list # should list "ceoguy-x-algorithm-skill"
/plugin list # should list the "x-algorithm" plugin
This plugin ships both a skill (auto-activated) and a slash command (explicit).
The skill is model-invoked: it loads automatically when you mention X posts, tweets, threads, the For-You feed, or distribution. Examples:
Write me an X post announcing my new open-source CLI.
Improve this tweet: "..."
Should this be a thread or one post?
Why isn't my last post getting any reach?
Claude detects the intent, loads the skill, and runs the policy workflow.
/x-algorithm write a launch post for my new app that does X
/x-algorithm review this draft: "Excited to announce..."
/x-algorithm # with no args, explains itself and asks what you need
The command takes either a draft (to review + rewrite) or a topic/goal (to write from scratch), runs the 16-checkbox pre-flight scan, and returns a post that passes every check.
/plugin marketplace update ceoguy-x-algorithm-skill # pull the latest version
/plugin update x-algorithm@ceoguy-x-algorithm-skill # apply it (then restart)
/plugin uninstall x-algorithm@ceoguy-x-algorithm-skill
/plugin marketplace remove ceoguy-x-algorithm-skill # optional — also drop the marketplace
| Error | Cause | Fix |
|---|---|---|
Marketplace "ceoguy/x-algorithm-skill" not found |
You ran step 2 without step 1 first. The argument to install is a plugin-in-a-marketplace, not a GitHub repo. |
Run step 1 first: /plugin marketplace add ceoguy/x-algorithm-skill |
Marketplace "ceoguy-x-algorithm-skill" not found (note the hyphen) |
Same cause — marketplace not yet registered. | Run step 1 first. |
/plugin install ceoguy/x-algorithm-skill doesn't work |
This isn't valid syntax in Claude Code v2.1+. The <owner>/<repo> form looks for a marketplace name, not a plugin source. |
Use the two-step sequence above. |
Failed to parse marketplace file ... owner: expected object OR Failed to install ... invalid manifest ... repository: expected string |
You added the marketplace while a cached copy had an older/broken manifest. | Refresh the cache: /plugin marketplace update ceoguy-x-algorithm-skill (or remove then add again), then install. |
| Skill / command doesn't appear after install | A restart is required to apply a new install. | Restart Claude Code, then check /plugin list. |
| Want to verify the manifests yourself | Clone the repo and run claude plugin validate <path-to-clone> — it should print ✔ Validation passed. |
Claude Code's plugin system is marketplace-based, not direct-from-git. A marketplace is a curated catalog of plugins, often hosting many in one repo. A single-plugin GitHub repo (like this one) acts as its own one-plugin marketplace via the .claude-plugin/marketplace.json file in the repo root.
This means:
- Step 1: register the marketplace (Claude Code fetches the repo, reads
marketplace.json, registers the marketplace under thenamefield — which for this repo isceoguy-x-algorithm-skill) - Step 2: install a specific plugin from that registered marketplace using
<plugin-name>@<marketplace-name>syntax (which for this skill isx-algorithm@ceoguy-x-algorithm-skill)
There is no one-step /plugin install github:... shortcut in v2.1+.
You don't need Claude Code at all. The docs/ folder is self-contained markdown. Read directly:
docs/algorithm-deep-dive.md— the full algorithm reference (~600 lines)docs/policies.md— 47 active policies (incl. P-21: write something worth forwarding, and P-20: sound human)docs/pre-flight-scan.md— 16-checkbox final review + the label-first reach diagnosisdocs/glossary.md— every term defined with sourcesdocs/published-weights.md— the complete Aug 2026 production parameter table (2023 values kept as a ⚫ Retired appendix)docs/seed-lists.md— how to build named-entity seed lists + find cluster-central accounts for your niche (the methodology behind P-10 and P-19)docs/related-repos.md— every related public X/xAI repo and what it's fordocs/further-reading.md— curated academic papers + independent analyses
You can also clone the repo and feed any of these into your LLM of choice as a reference document:
git clone https://github.com/ceoguy/x-algorithm-skill
# then load docs/ as context in your tool of choiceAll values are published production defaults from home-mixer/params/param.rs as of
Aug 13 2026.
| # | Rule | Why |
|---|---|---|
| 1 | Write something worth copying the link to | share_via_copy_link = 20.0, the highest weight in the system — 40× a like. It fires when someone copies your URL to paste into Slack, a DM, or a doc. That rewards posts that are useful out of context, not posts engineered to hold attention in-feed. |
| 2 | Mutual follows are worth 4× on replies | BidirectionalFollowReplyWeightBoost = 15.0 takes reply weight from 5.0 to 20.0 — but only for original posts, into feeds of people who follow you back. |
| 3 | Originals beat replies and reposts, everywhere | Replies get no Grox classification, no cold-start eligibility, no mutual-follow boost, take the 0.75× discount even in-network, and are removed entirely from non-followers' feeds by OONRetweetReplyFilter. |
| 4 | Never trigger report |
−234.0 cancels 468 likes. And watch mute_author at −58.8 — worse than a block (−31.2). Repetitive self-promotion costs more than being disagreeable. |
| 5 | Dwell is worth zero | DwellWeight = 0.0. Every "make them stop and read" tactic has no direct payoff. Optimize for shares, replies, quotes, and follows. |
Plus two mechanics worth knowing:
- Under 1000 followers? There's a published cold-start on-ramp — one original post per feed request, from an author ≤1000 followers with <1000 views, gets lifted toward the score at feed slot ~15 — reduced by the out-of-network discount, which multiplies after the lift.
- Reach collapsed for no reason? 26 visibility-filtering rules drop posts out-of-network only — fully visible to followers, invisible to everyone else. Check your actual labels at https://x.com/i/under_the_hood.
POST PUBLISHED
│
├─→ Grox content-understanding (skips REPLIES and PROTECTED accounts entirely):
│ ├─ Banger screen (Gemma VLM) — emits slop_score, isHighQuality, tags, topics
│ ├─ SafetyPtos (VLM) — 10-category policy detection
│ ├─ PostSafetyDeluxe — second-pass critical model
│ ├─ CoordinatedSpamScorer — walks deep reply chains (skips <2 deep)
│ └─ Multimodal embedder v5/v8.2 — text + image + transcript
│
↓
PER-VIEWER FOR-YOU REQUEST
│
├─→ Query hydration: follow list, blocks/mutes, muted keywords, seen+served
│ history, engagement action sequence (up to 1024)
│
├─→ Candidate sources (7 wired, each with an enable() condition):
│ ├─ ThunderSource — in-network, unless cache-served (1200)
│ ├─ PhoenixSource — OON retrieval, main feed (1000)
│ ├─ SimclustersSource — OON, needs viewer post signals
│ ├─ PhoenixTopicsSource — topic tabs only (replaces PhoenixSource there)
│ ├─ CachedPostsSource — when it fires, it's the ONLY source (3h TTL)
│ ├─ TweetMixerSource — OFF by default
│ └─ PhoenixMOESource — OFF by default
│
├─→ Hydration: bidirectional-follow flag (gates the +15 boost), engagement counts
│ incl. view_count (gates cold start), media info, author labels, quoted post
│
├─→ Pre-scoring filters (17): 48h age, duplicates, OON replies/reposts, blocked
│ and muted authors, muted keywords, previously seen/served, subscription
│
├─→ Scoring:
│ ├─ PhoenixScorer — transformer predicts P(action) per head, candidates
│ │ isolated (your score doesn't depend on the batch)
│ ├─ RankingScorer — Σ weight × P(action)
│ │ then author cold start (one post → slot ~15)
│ │ then author diversity 0.75 × 0.5^k + 0.25
│ │ then OON discount 0.75× (0.50× in topic feeds)
│ │ (OON multiplies the cold-start lift — a non-follower
│ │ sees slot-15 × diversity(k) × 0.75)
│ └─ VMRanker — DPP re-rank, θ=0.65, across the top 150
│
├─→ Selection: top-K + blender (posts + ads + Who-to-Follow + prompts)
│
└─→ Post-selection: VFFilter (26 OON-only drop rules + the base set),
AncillaryVFFilter (inherits parent/quoted/reposted drops),
DedupConversationFilter (ONE post survives per conversation)
│
↓
RANKED FEED
The skill loads this pipeline, every published weight, every confidence-tagged assumption, and 47 named policies derived from the code.
- 🟢
xai-org/x-algorithm— Aug 13 2026 release: production parameters, visibility filtering, labeling systems, Phoenix training code, SimClusters - ⚪
xai-org/x-algorithm— May 15 2026 release (superseded by the above) - ⚫
twitter/the-algorithm— March 2023. Historical only — its weights are superseded, and the skill marks them retired rather than using them as fallbacks - 🟢
twitter/communitynotes— Birdwatch bridging algorithm (drivesNSFA_COMMUNITY_NOTE, a MediumRisk label) - 🟡
igorbrigadir/awesome-twitter-algo— annotated 2023 release - 🟡 SimClusters paper (KDD 2020)
- 🟡 Birdwatch paper (2022)
- 🟠 Standard recsys literature on DPP (Chen et al. 2017), two-tower retrieval
x-algorithm-skill/
├── README.md # this file
├── LICENSE # MIT
├── CONTRIBUTING.md # how to contribute updates / new sources
├── CHANGELOG.md
├── .claude-plugin/
│ ├── marketplace.json # makes the repo act as its own marketplace
│ └── plugin.json # Claude Code plugin manifest
├── skills/
│ └── x-algorithm/
│ └── SKILL.md # the skill Claude loads on trigger (auto-activated)
├── commands/
│ └── x-algorithm.md # the /x-algorithm slash command (explicit)
├── docs/
│ ├── algorithm-deep-dive.md # the full algorithm reference (~600 lines)
│ ├── policies.md # 47 active policies, sorted by leverage
│ ├── pre-flight-scan.md # 16-checkbox review + label-first reach diagnosis
│ ├── glossary.md # every term defined with sources
│ ├── published-weights.md # the Aug 2026 production parameter table
│ ├── related-repos.md # every related public X/xAI repo + what it's for
│ └── further-reading.md # curated academic papers + independent analyses
└── examples/
├── 01-launch-post-rewrite.md # before/after with every policy cited
├── 02-thread-vs-single.md # why one banger > 10-tweet thread (with math)
├── 03-reply-engagement.md # engineering for the highest-weighted actions
├── 04-low-reach-diagnosis.md # 10-step debug sequence for underperforming posts
├── 05-account-warming.md # the small-account playbook (cold-start on-ramp)
├── 06-edge-cases-faq.md # hashtags, mentions, polls, quote tweets, links, etc.
└── 07-sound-human-not-ai.md # the most important rewrite: kill the AI tells
- Writes like a human, not like AI. Rule Zero (policy P-20) bans the AI-writing tells — em-dash bullet lists, staccato fragments, parallel triplets, "Here's the thing:" cadence — because the banger classifier's
slop_scorecatches them and real people don't engage with content that reads as machine-written. Sounding human IS the optimization, and it overrides every structural rule when they conflict. - Policy-driven, not vibe-driven. Every recommendation cites a code path and a policy ID. No "X likes engagement" hand-waving.
- Confidence markers throughout. You know what's 🟢 published in the Aug 2026 release vs 🟡 published in an earlier release and structurally intact vs 🟠 reasoned inference vs ⚫ retired (contradicted by current code).
- Multi-round researched. The wiki the skill is built from went through 5 deep-read rounds covering the entire
xai-org/x-algorithmrepo + the 2023 release + public analyses + Community Notes. - Covers the full distribution stack, not just the ranker: SimClusters candidate generation, Phoenix retrieval, the Grox content-understanding pipeline (banger screen, 10-category safety PTOS, coordinated-spam detection, reply ranking), the brand-safety verdict computation (4 levels, 15 Medium-Risk labels including
DO_NOT_AMPLIFY, and a fail-closed branch under which 🟠 replies most likely never get scored, costing ad adjacency), ads-adjacency dynamics, and Community Notes bridging. - Vertical-agnostic. Examples cover product launches, takes, threads, and engagement bait without assuming a niche.
- Honest about unknowns. When a value isn't public (production ranker weights, exact DPP theta, Phoenix production dimensions, classifier prompt bodies), the skill says so and cites the closest public anchor.
It isn't — it's not an ML model. It's:
- A long-form domain prompt (
skills/x-algorithm/SKILL.md) that Claude reads when activated, defining workflow + hard rules. - A reference corpus (
docs/) that Claude pulls from when answering specific questions or running the pre-flight scan. - Worked examples (
examples/) that demonstrate the workflow on concrete posts.
This is the standard Claude Code Skill format — natural-language instructions + documents Claude can load on demand.
The "training" is the research that went into deriving the policies from the open-source code. The skill is just the distillation. You can re-derive it from the public sources listed above.
- Add a
/x-pre-flight <post>slash command for one-shot scanning - Vertical-specific seed-list packs (DeFi, AI/dev, gaming, B2B SaaS, indie hacker, news)
- Under the Hood label-report parser (paste your report, get a mapped diagnosis)
- Hooks for Claude to fetch a draft's predicted Phoenix scores from a community endpoint (if one exists)
- Re-clone xai-org/x-algorithm quarterly and diff for structural changes
- Optional Python utility to score draft posts against the policies programmatically
PRs welcome, especially:
- New policy additions when xAI publishes algorithm changes
- Counter-examples that show the policies in action (or where they're wrong)
- Vertical-specific examples (one-shot launches, thread examples, reply-game examples)
- Translations of the SKILL.md to other languages
- Constants updates when better-sourced numerical values appear publicly
Open an issue first for substantial changes. For policy edits, cite the source code path or the public source.
Q: Does this skill guarantee my posts will go viral? A: No. The algorithm is probabilistic and continuously trained. This skill maximizes the probability of distribution by satisfying the policies the public algorithm code reveals. Beyond that, content quality and account reputation matter.
Q: Will this work for accounts with low follower counts?
A: Yes — and as of the Aug 2026 release there's a published mechanism aimed squarely at you. Accounts with ≤1000 followers get a cold-start slot: one original post per feed request, with under 1000 views, gets lifted toward the score at feed slot ~15 — author diversity and the out-of-network discount both apply after the lift, so a non-follower sees it below that. It only fires on originals, which is why the skill pushes small accounts toward posting rather than replying. See examples/05-account-warming.md — note that this example's advice reversed in v2.0, because it was previously built on TweepCred.
Q: How is this different from generic "Twitter growth" tips? A: Generic tips like "post consistently" or "use hashtags" don't cite the algorithm. This skill grounds every recommendation in a code path or a published weight. Where a published number doesn't exist, it's tagged 🟠 (reasoned assumption from standard recsys practice) so you know.
Q: Does this work for X Premium / Blue Verified accounts differently?
A: No. The widely-repeated "4× in-network / 2× OON verification multiplier" is a 2023 number, and no verification-based score multiplier exists in the Aug 2026 published ranking path. Verification is present as a model feature in eight files — including UserSafetyInfo.isBlueVerified in Phoenix's serving proto and a badge-colour field in the v8.2 embedding renderer — but nowhere as a multiplier. Premium still unlocks subscriber-only posting and the longer character limit. Judge it on those.
Q: Why doesn't the skill cover ads?
A: This is for organic distribution. Paid promotion is a separate system (the open-source home-mixer/ads/ blender code is covered briefly in docs/algorithm-deep-dive.md for context on how ads compete with organic posts for monetization-zone density, but not for buying placements).
Q: Will the skill stay accurate as X updates the algorithm?
A: The structure is stable (open-source code shows it). Specific numeric weights drift continuously (they're learned, not configured in production). Re-clone xai-org/x-algorithm quarterly. Significant releases will require a skill update.
Q: Can I fork and customize for my niche? A: Yes — that's encouraged. Fork, add a vertical-specific seed-list pack, and contribute back.
Q: Does this leak any insider information? A: No. Everything is derived from the public open-source releases + public analyses. Nothing in this skill comes from inside X or any company that uses X.
MIT. See LICENSE.
This skill exists because xAI and (pre-acquisition) Twitter chose to open-source their feed ranker. Both 2023 and 2026 releases. That transparency is rare and valuable.
Built from:
- The full source code of
xai-org/x-algorithm - The full source code of
twitter/the-algorithm - The active
twitter/communitynotesrepo - Igor Brigadir's annotated mirror
- Published analyses by Tanay Jaipuria, Knight First Amendment Institute, Sumit's Diary, Sol Messing, the Birdwatch paper, and 2026's Quality-Sensitive Matrix Factorization for Community Notes
- Academic recsys literature on DPP, SimClusters (KDD 2020), and two-tower retrieval
If you find an error, open an issue. If you find a new public source that should be incorporated, send a PR.
Built for Claude. Released under MIT. Sourced entirely from public materials.