The skill that knows
how X's algorithm actually works
No generic social media advice. Every recommendation traces to real algorithm behavior from X's open-sourced codebase. Know exactly which signals drive reach.
Installation
Install the X Algorithm Skill for Claude Code with a single command.
npx x-algorithm-skill init Requires Claude Code. The skill will be added to your Claude Code skills directory.
Usage
Use the skill in Claude Code to get algorithm-backed guidance for your posts.
Get Writing Guidance
View the full algorithm overview and writing guidance.
/x-algorithm Review a Draft
Get algorithm-backed feedback on your draft with specific improvements.
/x-algorithm review
Here's my draft: [your draft] Rewrite for Maximum Virality
Get an algorithm-optimized rewrite of your post with maximum engagement potential.
/x-algorithm rewrite
Here's my post: [your post] Scoring Signals
The algorithm predicts 19 engagement probabilities and combines them into a weighted score. Understanding what drives each signal is key to virality.
final_score = Σ(probability_i × weight_i) + offset ↑ High-Value Signals
Maximize these for maximum reach.
| Signal | What It Measures | How to Trigger |
|---|---|---|
| Reply | Genuine conversation | Ask questions, invite perspectives |
| DM Share | Private sharing | Insider info, niche value |
| Copy Link Share | External sharing | Reference-worthy content |
| Dwell Time | Time spent reading | Depth, formatting, intrigue |
| Follow | New follower conversion | Demonstrate ongoing value |
| Quote | Amplification with commentary | Hot takes worth responding to |
→ Medium Signals
Good to have, but lower weight.
| Signal | What It Measures |
|---|---|
| Like | Basic approval |
| Repost | Amplification |
| Click | Link/media engagement |
| Profile Click | Author interest |
| Photo Expand | Image engagement |
| Video Quality View | Video completion |
↓ Negative Signals
Avoid at all costs.
| Signal | What It Causes |
|---|---|
| Not Interested | Score penalty |
| Mute Author | Score penalty |
| Block Author | Severe penalty |
| Report | Severe penalty |
Key Insight
The algorithm doesn't care about "engagement" generically. It cares about specific actions: replies, shares, dwell time. A post that gets 100 likes but no replies scores worse than a post with 50 likes and 20 replies.
Discovery & Retrieval
Before posts can be ranked, they must be retrieved. The algorithm uses a two-tower neural network to efficiently find relevant posts from millions of candidates.
┌─────────────────┐ ┌─────────────────┐
│ USER TOWER │ │ CANDIDATE TOWER │
│ │ │ │
│ User Features │ │ Post Content │
│ + │ │ + │
│ Engagement │ │ Author Info │
│ History │ │ │
│ ↓ │ │ ↓ │
│ Transformer │ │ MLP │
│ ↓ │ │ ↓ │
│ L2 Normalize │ │ L2 Normalize │
└────────┬────────┘ └────────┬────────┘
│ │
└──────────┬─────────────────┘
│
Dot Product Similarity
↓
Top-K Retrieval User Tower (Your Audience)
Encodes who a user is based on their features and engagement history. The algorithm looks at up to 128 recent interactions.
- Which posts they engaged with
- Which authors they engaged with
- What actions they took (like, reply, share)
- Where they interacted (feed, notifications, search)
Candidate Tower (Your Post)
Encodes each post as a point in high-dimensional space. Posts cluster by topic, style, and author.
- Post content embeddings
- Author embeddings and characteristics
- Processed through 2-layer MLP
- L2-normalized to unit sphere
In-Network vs Out-of-Network
In-Network (Thunder)
Posts from accounts the user follows. Sub-millisecond lookup from in-memory store. No retrieval penalty.
Out-of-Network (Phoenix)
Posts from accounts the user doesn't follow. Uses two-tower similarity search. Gets a penalty factor applied.
Practical Takeaways
- 1. Build consistent engagement patterns. Post consistently in your niche to build a strong author embedding.
- 2. Earn in-network status. Converting followers is crucial—they see you without the OON penalty.
- 3. Respect diversity. Don't post 20 times a day. Multiple posts get exponentially discounted.
- 4. Stay fresh. Posts older than the threshold are filtered out entirely. Timing matters.
Viral Patterns
Proven templates that trigger high-value engagement signals. Each pattern is optimized for specific algorithm behaviors.
The Insight Thread
Dwell time, Follows, Quote tweets
Non-obvious observation as hook, followed by numbered insights and a closing CTA for follow.
View example
I reviewed 200 failed startups for Y Combinator. Here's what most people get wrong: 1. They pivoted too late, not too early 2. The cofounder conflicts started before the idea 3. "Running out of money" was the symptom, not the cause 4. The winners had customers before they had product The real lesson: Speed of learning beats everything else.
The Contrarian Take
Replies, Quote tweets, Profile clicks
Bold claim that challenges consensus. Brief explanation without over-explaining.
View example
"Work-life balance" is a trap. The best founders I know don't balance anything. They integrate. Work is life. Life is work. The separation is the problem.
The Resource Post
Copy Link Share, DM Share, Saves
Clear promise of value with comprehensive but scannable content.
View example
Complete cold email checklist: □ Subject line < 6 words □ First line personalized to them □ One clear ask □ Under 100 words total □ No attachments □ Send Tuesday-Thursday 9-11am □ Follow up exactly once at day 3 Save this. Send it to your sales team.
The Curiosity Gap
Dwell time, Click-through, Replies
Create specific curiosity, delay payoff just enough, deliver satisfying answer.
View example
The #1 product at Amazon isn't what you think. Not AWS. Not Prime. Not Alexa. It's the internal document culture. Every major decision starts with a 6-page narrative memo. That's why they move fast—everyone actually understands the decision.
The Personal Story
Follows, Dwell time, Emotional resonance
Start mid-action (not 'So I was...'), quick context, turning point, and lesson.
View example
"We're shutting down the company." Hardest email I ever sent. 47 employees. Families. Dreams. But here's what I didn't expect: Every single person replied thanking me. Not for the job. For being honest. Transparency isn't just ethical. It's the only way to leave with your reputation intact.
The Direct Value
Shares, Replies, Practical engagement
Immediate actionable content with no preamble.
View example
Write better emails: 1. Start with the ask 2. Max 5 sentences 3. One action per email That's it. Stop overthinking.
So You Don't Have To
Share, Follow, Dwell
Establish effort, distill key findings, save them time.
View example
I read 50 books on negotiation so you don't have to. Here are the 3 things that actually matter: 1. The person who cares less has more power 2. "No" is the start, not the end 3. Silence is your best friend Everything else is noise.
The Prediction
Quote tweets, Replies, Expert engagement
Specific prediction with timeframe, brief reasoning, optional stake.
View example
Prediction: 50% of SaaS companies will be AI-wrapper businesses by 2026. Here's why: - Foundation models are commoditizing - UX is the only moat - Infrastructure costs favor thin layers Bookmark this. Check back in 2 years.
Signal Targeting Summary
| Pattern | Primary Signals |
|---|---|
| Insight Thread | Dwell, Follow, Quote |
| Contrarian Take | Reply, Quote, Profile Click |
| Resource Post | Copy Link Share, DM Share |
| Curiosity Gap | Dwell, Click |
| Personal Story | Follow, Dwell |
| Direct Value | Share, Reply |
| "So You Don't Have To" | Share, Follow, Dwell |
| Prediction | Quote, Reply |
Anti-Patterns: What Gets Penalized
The algorithm has explicit negative signals that reduce your score. Understanding what triggers them is as important as understanding what drives positive engagement.
The Engagement Farmer
Triggers: Not Interested- Explicit calls to like/RT/follow
- "Engagement pods" or coordinated liking
- Growth hacking tactics
Why suppressed: These signals are learned as inauthentic. The model predicts "not interested" responses.
The Reply Guy
Triggers: Mute- Commenting on every viral post
- Self-promotional replies
- First-to-respond gaming
Why suppressed: Low-quality engagement patterns lead to mutes.
The Thread Maximalist
Triggers: Algorithm Penalty- Every thought becomes a 20-tweet thread
- Padding threads with unnecessary posts
- "1/" on content that doesn't need threading
Why suppressed: Author diversity penalty kicks in. Later posts in thread get discounted.
The Controversy Farmer
Triggers: Block, Mute- Intentionally inflammatory takes
- Punching down for engagement
- Rage bait framing
Why suppressed: Short-term replies, long-term blocks and mutes.
The Copy-Paste Recycler
Triggers: Filtered Out- Same content reposted weekly
- Slight variations of the same post
- Cross-posting without adaptation
Why suppressed: Deduplication and previously-seen filters catch this.
Red Flags Checklist
Before posting, check:
- Am I explicitly asking for engagement? (remove it)
- Would I be annoyed seeing this from someone else? (reconsider)
- Is this the 5th+ post today? (wait)
- Am I being hostile to anyone? (reframe)
- Have I posted something similar recently? (don't)
- Does this deliver on its hook? (must)
- Would someone unfollow over this? (pause)
Writing Like a Human, Not a Bot
New in v1.2Algorithm optimization means nothing if your posts scream "AI wrote this." Users can smell inauthenticity. The skill now includes comprehensive humanization rules to help you write posts that are both algorithm-optimized AND authentically human.
AI Vocabulary Blacklist
Words that instantly signal AI writing:
Structural Tells
- Always listing exactly 3 things
- "Not just X, but Y" constructions
- Em dash overuse for dramatic pauses
- "Here's the thing:" formulaic transitions
- Perfectly clean structure with no imperfections
Adding Soul
- Use contractions naturally (don't, it's, can't)
- Vary list lengths (2, 4, or 7 items—not always 3)
- Include specific details over vague claims
- Allow imperfection—tangents, casual asides
- Write like you'd talk to a friend
The full skill includes before/after examples, a complete AI vocabulary blacklist, and a humanization test added to the 6-point audit framework.
Iteration Framework
A systematic approach to improving drafts before posting. Run every draft through this checklist to optimize for the algorithm.
Signals
- Reply: Question or debate-worthy claim?
- Share: Reference-worthy value?
- Dwell: Rewarding structure?
- Follow: Unique expertise shown?
- Negative: Nothing triggering?
Hook
- Specific, not vague?
- Creates curiosity?
- Works standalone?
Structure
- Proper line breaks?
- Length matches goal?
- Passes visual scan?
Final Check
- Would I screenshot this?
- Would I share this?
- Would I follow someone who posted this?
If any answer is no, iterate.
Hook Types Ranked by Signal Strength
| Hook Type | Best For | Example Start |
|---|---|---|
| Question | Replies | "Why do..." |
| Contrarian | Quotes, Replies | "[Common belief] is wrong." |
| Insight | Dwell, Follow | "I discovered..." |
| Story | Dwell, Follow | "[Dialogue]" or "[Action]" |
| Resource | Share | "Complete guide to..." |
| Prediction | Quote, Reply | "Prediction:" |
Length Guidelines
| Goal | Optimal Length |
|---|---|
| Maximum reach | 71-100 characters |
| Engagement depth | 200-280 characters |
| Authority building | 500-1000 characters |
| Threads | 5-15 posts |