Install
$ agentstack add skill-attainmentlabs-x-open-source-algorithm-skill-x-open-source-algorithm-skill ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
X Algorithm Optimizer
Optimize X/Twitter content using the actual January 2026 open source algorithm from xai-org/x-algorithm.
Source Material
This skill is built from three sources:
- The actual algorithm code (Jan 2026):
~/Documents/Work/Social Media Guides/Platform Guides/x-algorithm-2026/ - 2026 practical guide:
~/Documents/Work/David Brand/x-twitter-algorithm-2026.md - David Cyrus voice profile:
~/Documents/Work/David Brand/david-cyrus-voice-profile.md(for @mdavidcyrus posts)
Read references/phoenix-scoring.md for the full scoring model details. Read references/algorithm-signals.md for the practical engagement hierarchy and tactics.
How the Algorithm Actually Works (Jan 2026)
X's "For You" feed is powered by four components:
- Home Mixer (orchestration): assembles the feed through a pipeline of sources, hydrators, filters, scorers, and selectors
- Thunder (in-network): serves recent posts from accounts you follow via in-memory store
- Phoenix (ranking + retrieval): Grok-based transformer that predicts engagement probabilities
- Candidate Pipeline (framework): reusable pipeline stages that run in parallel
The critical path for content creators: Phoenix predicts 19 engagement probabilities for every post, and a Weighted Scorer combines them into a single ranking score.
The Phoenix Scoring Model
Phoenix predicts these engagement probabilities for every candidate post:
Positive signals (higher = more reach):
| Signal | What triggers it | Impact | |--------|-----------------|--------| | P(favorite) | Likes | Primary distribution signal | | P(reply) | Replies to the post | Triggers +75 author engagement bonus | | P(repost) | Retweets | Strong amplification signal | | P(quote) | Quote tweets | Engaged discussion signal | | P(click) | Link/content clicks | Interest signal | | P(profileclick) | Clicking author's profile | Curiosity/authority signal | | P(videoqualityview) | Watching video >50% | Only applies to video posts | | P(share) | Share button usage | High-intent distribution | | P(shareviadm) | Sharing via DM | Personal recommendation signal | | P(shareviacopylink) | Copying link to share | Off-platform sharing intent | | P(dwell) | Stopping to read/view | Attention signal | | P(dwelltime) | How long they stay (continuous) | Depth of engagement | | P(followauthor) | Following the author | Strongest authority signal |
Negative signals (higher = penalized):
| Signal | What triggers it | Impact | |--------|-----------------|--------| | P(notinterested) | "Not interested" button | Moderate penalty | | P(blockauthor) | Blocking the author | Severe penalty | | P(mute_author) | Muting the author | Significant penalty | | P(report) | Reporting the post | Most severe penalty |
The weighted score formula:
Final Score = sum(weight_i * P(action_i))
Positive actions have positive weights. Negative actions have negative weights.
The exact weight values are excluded from the open source release (in a private params module), but the 2026 practical data gives us the observed hierarchy:
- Likes: +30 points
- Retweets: +20 points
- Reply with author response: +75 bonus
- Reply alone: +13.5
How to Use This Skill
Step 1: Determine Format
Based on the 2026 algorithm data, content formats rank:
- X Articles (algorithm-boosted, $1M monthly prize, highest dwell time)
- Video thread (video + 3-5 tweets, 0.42% engagement rate)
- Video single post (5x text engagement)
- Image/GIF thread (150% more interactions than text)
- Text thread (3x single tweet engagement)
- Image/GIF single (0.08% engagement)
- Text single (0.1% engagement)
- Link post Premium (0.25%, heavily suppressed)
- Link post non-Premium (0% engagement, invisible)
Decision tree:
- Deep analysis, 1000+ words? -> X Article
- Punchy take, 5-10 points? -> Thread (7 tweets optimal)
- Quick insight, single idea? -> Single tweet with image/video
- Linking to external content? -> Native content first, link in reply only
Step 2: Analyze the Draft
For each draft post, evaluate against the Phoenix scoring signals:
Will this trigger positive signals?
- [ ] Likely to get likes? (favorite_score) -> clear value, quotable insight
- [ ] Likely to get replies? (reply_score) -> provocative question, contrarian take, reply hook
- [ ] Likely to get retweets? (retweet_score) -> shareable, makes the sharer look smart
- [ ] Likely to get clicks? (click_score) -> curiosity gap, "what happened next"
- [ ] Likely to increase dwell time? (dwell_score) -> thread format, visual content, depth
- [ ] Likely to trigger profile visits? (profileclickscore) -> establishing authority, unique perspective
- [ ] Likely to trigger follows? (followauthorscore) -> demonstrating ongoing value
Will this trigger negative signals?
- [ ] Could trigger "not interested"? -> off-topic for your audience, unclear value
- [ ] Could trigger mutes? -> posting too frequently, repetitive content
- [ ] Could trigger blocks? -> aggressive, offensive, spam-like behavior
Step 3: Optimize for the Algorithm
The 30-Minute Rule: The algorithm evaluates engagement velocity in the first 30 minutes. Front-load your best content.
Premium multipliers:
- In-network (followers): 4x visibility
- Out-of-network (non-followers): 2x visibility
- Overall: 10x reach advantage (Buffer analysis of 18.8M posts)
Thread optimization:
- First tweet: no number, use 🧵 emoji
- Start numbering from tweet 2: "2/7", "3/7"
- Each tweet under 200 characters (250 max)
- Line breaks between ideas
- 1-2 hashtags max, in final tweet only
- Links in final tweet or separate reply
- Optimal length: 7 tweets (5-10 range)
What kills reach:
- External links in main post (even Premium: 0.25% engagement)
- 3+ hashtags (engagement drops)
- No visual content (5x penalty vs video)
- Text-only posts (lowest format, 0.1%)
- Slow first-30-minute engagement
Step 4: Score the Post
Rate each draft on a simplified Phoenix-aligned scale:
| Category | Score 1-10 | Weight | |----------|-----------|--------| | Reply potential (will people respond?) | | 30% | | Repost potential (will people share?) | | 25% | | Dwell time (will people stop and read?) | | 20% | | Like potential (quick positive reaction?) | | 15% | | Negative risk (could this backfire?) | _ | 10% |
**Weighted Score = (Reply 0.3) + (Repost 0.25) + (Dwell 0.2) + (Like 0.15) - (Negative 0.1)*
Target: 7.0+ for posting. Below 6.0, rewrite.
Step 5: Rewrite Suggestions
When suggesting rewrites, explain which Phoenix signal you're targeting:
Example:
- Original: "Claude's 1M context window is now available."
- Problem: Low replyscore (no reason to respond), low dwellscore (nothing to read)
- Rewrite: "Anthropic just gave Claude a million-token context window. I turned mine off. Here's why. 🧵"
- Why: Opens curiosity gap (clickscore), demands engagement (replyscore), signals thread (dwell_score)
Voice Reference
For @mdavidcyrus posts, read ~/Documents/Work/David Brand/david-cyrus-voice-profile.md and apply:
- Direct, pragmatic, builder, contrarian
- Executive voice, not content creator
- Lead with insight, not story
- No em dashes, no AI-tell words
- No engagement bait ("Agree?", "Thoughts?")
- Statement energy, end on declarations
Anti-patterns (from the algorithm code)
The algorithm has explicit negative signal predictions. These actions cause the scoring model to suppress your content:
- P(not_interested) increases when: content is off-topic for your community (SimClusters mismatch), repetitive themes, unclear value proposition
- P(block_author) increases when: aggressive tone, spam-like posting frequency, controversial content without substance
- P(mute_author) increases when: over-posting (more than 5-7 daily), thread-bombing, excessive self-promotion
- P(report) increases when: misleading claims, harassment, harmful content
The Author Diversity Scorer also penalizes seeing the same author too many times in one feed session. Each subsequent post from the same author gets a decaying multiplier. Posting quality over quantity matters.
Output Format
When optimizing a post, provide:
- Format recommendation (article / thread / single + why)
- Phoenix signal analysis (which signals this will trigger, which it won't)
- Score (weighted 1-10 scale above)
- Specific rewrites (with signal rationale for each change)
- Posting strategy (timing, first-30-min plan, reply strategy)
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: attainmentlabs
- Source: attainmentlabs/x-open-source-algorithm-skill
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.