Install
openclaw skills install x-algorithm-optimizationProvides actionable insights into X's For You feed algorithm to optimize content for engagement by predicting and maximizing key user interaction types.
openclaw skills install x-algorithm-optimizationThis skill provides deep insights into X's For You feed algorithm (based on the xai-org/x-algorithm repository) to help create content optimized for maximum reach and engagement. It translates technical ML mechanics into actionable content strategy.
Retrieval (Two-Tower Model): Finds relevant posts from millions of candidates
Ranking (Grok Transformer with Candidate Isolation): Scores and orders candidates
The model predicts probabilities for:
Final Score = Σ(weight_i × P(action_i)) + diversity_adjustment - negative_signals
Each engagement action has a learned weight in the final score calculation:
Implication: Content that predicts high probability of NEGATIVE actions gets pushed DOWN.
After weighted scoring, author diversity adjustment:
Implication: Don't spam the feed with multiple posts in a row from same author.
Video posts get an additional weight IF video duration > threshold (e.g., > 2 seconds) Implication: Short videos may not benefit from video-specific weighting.
Implication: Fresh, unique, non-spammy content only. Old posts get filtered out.
The algorithm predicts engagement probabilities. To maximize score:
Trigger REPLIES
Trigger QUOTES
Trigger RETWEETS
Trigger VIDEO VIEWS
Trigger PHOTO EXPANDS
Trigger DWELL TIME
Trigger PROFILE CLICKS
Trigger FOLLOWS
Negative actions HURT your future reach:
Prevent NOT INTERESTED
Prevent BLOCKS/MUTES
Prevent REPORTS
Watch Dwell Time: Very short dwell (<1s) might correlate with negative implicit signals (though not explicitly modeled).
Each post's score is computed independently in the same request batch. Implication: The algorithm doesn't compare your post against others in real-time; it's an absolute score based on user+post match.
Even if your content scores high, multiple posts from same author get attenuated within the same feed response. Implication:
Age filter removes posts older than threshold (likely 24-48 hours). Implication:
The model ingests the user's recent engagement sequence (likes, replies, retweets, etc.) to determine what they'll like. Implication:
Posts and authors are embedded via hash tables, not explicit categories. Implication:
Phoenix retrieval finds relevant posts from accounts the user doesn't follow. Implication:
Candidates cannot attend to each other during ranking, so your post's score isn't affected by which other posts are in the candidate set. Implication:
Many posts get filtered out before even reaching the ML model. Implication:
Query: "How do I make this post more likely to get replies?" → Answer: Frame it as a question, use controversial/discussion-worthy angle, tag relevant accounts.
Query: "Why did my video post underperform?" → Answer: Check if video duration > threshold, first 3 seconds hook, native upload, vertical format.
Query: "Should I post multiple times today?" → Answer: Author diversity decay means 2-4 hour spacing. High-quality spaced posts > spammy cluster.
Query: "What engagement type should I optimize for?" → Answer: Depends on goals. For reach: retweets/shares. For conversation: replies/quotes. For authority: dwell time/long threads.
Query: "How do I break out to new audiences?" → Answer: Optimize for broad appeal actions (retweet, share, video view). Ensure content has clear topic semantics for retrieval matching.
Query: "What's more important: likes or replies?" → Answer: Likely replies > likes (higher weight in scoring). But depends on model weights. Focus on engagement types that indicate deeper commitment.
Query: "Why is my reach dropping?" → Check: Negative signals up? Post frequency too high? Audience mismatch? Content quality?
Query: "Why did this flop while my last post succeeded?" → Compare: Topic alignment, format, hook strength, negative signals triggered.
The public repository omits:
Strategy implication: We must infer optimal practices from first principles and common patterns, not exact numbers.
When testing content strategies:
A social media manager can use this skill to:
This skill distills engineering knowledge into marketing strategy. Use it wisely.