ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

X Algorithm Feed

Skill by adisinghstudent

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/adisinghstudent/x-algorithm-feed
Or
---
name: x-algorithm-feed
description: Rust implementation of X's For You feed ranking algorithm by xai-org
triggers:
  - implement x for you feed algorithm
  - twitter recommendation algorithm rust
  - x feed ranking system
  - build social media feed ranking
  - xai recommendation algorithm
  - for you feed implementation
  - x algorithm ranking rust
  - social feed personalization algorithm
---

# X Algorithm (For You Feed)

> Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection.

The X Algorithm (`xai-org/x-algorithm`) is the open-source Rust implementation powering the "For You" feed on X (formerly Twitter). It provides candidate sourcing, feature extraction, scoring, and ranking logic for personalizing social media feeds at scale.

---

## What It Does

- **Candidate sourcing**: Fetches tweet candidates from multiple sources (social graph, interest graph, trending)
- **Feature extraction**: Extracts user, tweet, and engagement features
- **Scoring & ranking**: Scores candidates using ML models and heuristics
- **Filtering**: Applies safety, diversity, and relevance filters
- **Serving**: Exposes ranked feed results via a gRPC/REST API

---

## Installation & Setup

### Prerequisites

- Rust 1.75+ (`rustup install stable`)
- Cargo
- (Optional) Docker for containerized deployment

### Clone & Build

```bash
git clone https://github.com/xai-org/x-algorithm.git
cd x-algorithm
cargo build --release

Run Tests

cargo test
cargo test --lib          # unit tests only
cargo test --integration  # integration tests

Run the Service

cargo run --release -- --config config/default.toml

Configuration

The algorithm is configured via TOML files and environment variables.

config/default.toml (example structure)

[server]
host = "0.0.0.0"
port = 8080
workers = 8

[ranking]
max_candidates = 1500
final_feed_size = 150
diversity_factor = 0.3
recency_weight = 0.25

[scoring]
model_path = "./models/ranker_v1.bin"
engagement_weight = 0.4
relevance_weight = 0.35
recency_weight = 0.25

[sources]
social_graph_weight = 0.5
interest_graph_weight = 0.3
trending_weight = 0.2

[filters]
safe_search = true
min_quality_score = 0.1
max_age_hours = 48

Environment Variables

export X_ALGO_CONFIG_PATH=/etc/x-algorithm/config.toml
export X_ALGO_MODEL_PATH=/models/ranker_v1.bin
export X_ALGO_LOG_LEVEL=info
export X_ALGO_METRICS_PORT=9090
export X_ALGO_REDIS_URL=redis://localhost:6379
export X_ALGO_DB_URL=postgres://user:pass@localhost/xalgo

Key Modules & API

Core Data Types

use x_algorithm::types::{Tweet, User, FeedRequest, FeedResponse, CandidateScore};

Metadata

Stars3809
Views0
Updated2026-04-05
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-adisinghstudent-x-algorithm-feed": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.