Reverse-engineered from X's actual codebase. Not guesses. Not theories. The real mechanics.
X abandoned hashtag matching and follower counts. The new system is fully neural:
Translation: The algorithm literally reads your posts with an LLM and predicts exactly how users will engage. Gaming hashtags is dead. Alignment is everything.
Every post gets a score. Here's the formula:
Good post:
P(reply)=0.15, P(like)=0.08, P(repost)=0.02, P(block)=0.001
Score = (15×0.15) + (1×0.08) + (12×0.02) + (-1000×0.001) = +1.57 ✓
Rage-bait post:
P(reply)=0.25, P(like)=0.05, P(repost)=0.03, P(block)=0.02
Score = (15×0.25) + (1×0.05) + (12×0.03) + (-1000×0.02) = -15.84 ✗
The rage-bait got MORE engagement but scored WORSE. The 2% block rate destroyed it.
┌────────────────────────────────────────────────────────────────────────┐
│ THE SEVEN ALPHA MECHANICS │
├────────────────────────────────────────────────────────────────────────┤
│ │
│ 1. CANDIDATE ISOLATION Posts scored independently, not curved │
│ 2. AUTHOR DIVERSITY PENALTY 0.3-0.7x penalty per consecutive post │
│ 3. NEGATIVE SIGNAL ASYMMETRY Blocks weighted 1000x vs likes │
│ 4. MULTIMODAL BONUS Media adds probability terms │
│ 5. GROK SEMANTIC READING LLM detects spam, mismatch, tone │
│ 6. TWO-TOWER RETRIEVAL User×Item vectors for discovery │
│ 7. TIME DECAY Exponential decay after 24-48h │
│ │
└────────────────────────────────────────────────────────────────────────┘
Text version (click to expand)
- Maximize P(reply): Questions, fill-blanks, "hot take + nuance"
- Always include media: Adds P(video_view) + P(photo_expand) to your score
- Space posts 4-6+ hours: Author diversity penalty compounds
- Post when audience is active: Time decay is exponential
- Build a concentrated niche: Strengthens your User Tower embedding
- Irrelevant hashtags: Grok detects semantic mismatch → spam signal
- Rage-bait: High blocks destroy score even with high engagement
- Link-only posts: Zero media probability terms
- Posting sprees: 3rd post in an hour = ~10% reach of 1st
- Engagement pods: Grok detects coordination patterns
< 0.5% block rate. Above 1% = systematic demotion.
These patterns maximize the highest-weighted engagement signal:
| Pattern | Example | Why It Works |
|---|---|---|
| Open question | "What's your biggest [X] failure?" | Demands specific experience |
| Fill-in-the-blank | "The most underrated skill is ___" | Low friction to complete |
| Intentional incompleteness | List with obvious gap | People can't resist adding |
| Nuanced controversy | "Hot take: [X]. But here's the nuance..." | Invites debate, reduces blocks |
| Correctability | Slightly wrong statement | Experts will correct you |
Anti-patterns: Rhetorical questions, perfect statements, closed conclusions
┌─────────────────┐
│ What's your │
│ goal? │
└────────┬────────┘
│
┌──────────┬───────────┼───────────┬──────────┐
▼ ▼ ▼ ▼ ▼
┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐
│ Max │ │Engage- │ │Follower│ │ Safe │
│ Reach │ │ment │ │Growth │ │Growth │
└───┬────┘ └───┬────┘ └───┬────┘ └───┬────┘
│ │ │ │
│ Optimize for: │ │
│ P(repost) P(reply) P(profile) Low P(block)
│ │ │ │
└──────────┴──────────┴──────────┘
│
▼
┌─────────────────┐
│ Apply reply │
│ optimization │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Add media │
│ (image/video) │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Negative signal │
│ scan (<0.5% │
│ block rate?) │
└────────┬────────┘
│
┌──────────┴──────────┐
▼ ▼
┌────────┐ ┌────────┐
│ POST │ │ Revise │
└────────┘ └───┬────┘
│
└──► (back to scan)
| Element | Optimal | Why |
|---|---|---|
| Characters | 71-100 (max 280) | No "Show more" friction |
| Hashtags | 0-1, semantically matched | Grok detects mismatch |
| Images | 1200×675px or vertical | Full preview; vertical forces expand |
| Video | <2:20, hook in 3s, captioned | Autoplay; 80% watch muted |
| Media source | Native upload only | Links don't trigger media P() |
This is a Claude Code skill that gives Claude deep knowledge of X's algorithm mechanics.
# Clone the repo
git clone https://github.com/themattberman/x-algo-skill.git
# Symlink to Claude Code skills directory
ln -s $(pwd)/x-algo-skill ~/.claude/skills/x-algorithm-optimizerOnce installed, Claude will automatically use this skill when you ask about:
- X/Twitter optimization
- Post performance debugging
- Algorithm mechanics
- Content strategy for reach
Or invoke directly: /x-algorithm-optimizer
x-algo-skill/
├── SKILL.md # Main skill file
├── README.md # You're reading it
├── references/
│ ├── phoenix-architecture.md # Deep dive: Two-Tower, Grok, embeddings
│ ├── weighted-scorer.md # Complete weight math + examples
│ └── post-templates.md # 12+ proven formats
└── scripts/
└── analyze_x_post.py # Score posts against the algorithm
Old paradigm: Game the algorithm (hashtags, timing, pods)
New paradigm: Align with the neural network's objective function
The algorithm optimizes for:
- Conversation — P(reply) weighted highest
- Network extension — P(repost), P(quote)
- User satisfaction — Negative signals weighted catastrophically
- Semantic relevance — Grok reads everything
Your strategy: Create content that genuinely maximizes these. The era of manipulation is over. The era of alignment has begun.
Created by @themattberman on X.
I write about AI, tech, and business at Big Players — a newsletter for people building the future.
Need help with AI strategy? Emerald Digital — we help companies leverage AI to grow.
MIT — Use it, share it, build on it.
Star this repo if it helped you.
Follow @themattberman for more