x-algo-skills

内容来源:README.md(说明文档) · 原始地址 · 查看安装指南

原始内容

X Algorithm Skills for AI Coding Agents

AI-powered skills that help you understand and leverage the X (Twitter) recommendation algorithm. Add these to your coding agent (Claude Code, Cursor, etc.) to analyze posts, understand ranking, and optimize your X presence.

What You Can Do

Ask your AI assistant questions like:

  • "Why did my post get low engagement?"
  • "What engagement signals does X track?"
  • "How does the X algorithm rank posts?"
  • "Why was my post filtered from the feed?"
  • "Analyze this post for X algorithm optimization"

Skills Included

Skill Command Use Case
Engagement /x-algo-engagement Understand the 18 engagement signals X tracks
Scoring /x-algo-scoring Learn how posts are scored and weighted
Filters /x-algo-filters Know why posts get filtered out
Pipeline /x-algo-pipeline Full overview of the recommendation system
ML Model /x-algo-ml Deep dive into the Phoenix transformer model

Installation

Claude Code

Copy skills to your project or global skills directory:

# Project-scoped (recommended)
cp -r x-algo-* /path/to/your/project/.claude/skills/

# Or global
cp -r x-algo-* ~/.claude/skills/

Cursor / Other Agents

Add the skill files to your agent's context or skills directory. Each skill is a standalone SKILL.md file with YAML frontmatter.

Example Interactions

Analyze a Post

You: Analyze this post for X algorithm optimization:
"Just shipped a new feature! Check it out at [link]"

AI: Based on the X algorithm scoring system:
- Low predicted engagement signals (no question, no visual)
- Link posts typically get lower reach due to X preferring native content
- Suggestions: Add an image, ask a question, remove external link...

Understand Filtering

You: Why might my post not appear in followers' feeds?

AI: The X algorithm has 12 filters. Your post could be filtered by:
- AgeFilter: Post is too old (>24-48h typically)
- DedupConversationFilter: Another post in the thread scored higher
- VFFilter: Safety/spam detection triggered
- ...

Learn the Algorithm

You: How does X decide which posts to show me?

AI: X uses an 8-stage pipeline:
1. Query Hydration - Load your preferences
2. Sources - Thunder (following) + Phoenix (For You)
3. Candidate Hydration - Fetch post data
4. Pre-Score Filtering - Remove ineligible posts
5. Scoring - ML predictions → weighted scores
6. Selection - Top K by score
7. Post-Score Filtering - Dedup, seen posts
8. Side Effects - Logging

Key Insights from the Algorithm

Engagement Weights

The algorithm predicts probability of 18 actions and combines them:

Positive signals (increase score):

  • Favorite (like)
  • Reply
  • Retweet
  • Quote tweet
  • Follow author
  • Share (DM, copy link)
  • Video quality view
  • Dwell time

Negative signals (decrease score):

  • Not interested
  • Block author
  • Mute author
  • Report

What Gets Filtered

Posts are removed if they:

  • Are too old (Snowflake ID age check)
  • Were already seen (Bloom filter)
  • Are from blocked/muted accounts
  • Contain muted keywords
  • Fail safety checks
  • Are duplicates or from same conversation

Source

These skills are based on the open-source X recommendation algorithm and internal documentation, adapted for practical use with AI coding agents.

Contributing

PRs welcome! Areas to improve:

  • Add more example queries
  • Update weights if X publishes changes
  • Add skills for specific use cases (video optimization, thread strategy)

License

MIT