skills/recsys-pipeline-architect/SKILL.md
A spec-and-scaffold skill for building composable recommendation, ranking, and feed pipelines. It encodes the six-stage pattern — Source → Hydrator → Filter → Scorer → Selector → SideEffect — popularized by xAI's open-sourced For You algorithm (Apache 2.0). This skill is an independent reimplementation of the pattern (MIT) — no code copied from the original.
Upstream: https://github.com/mturac/recsys-pipeline-architect
| # | Stage | Job | Parallel? |
|---|---|---|---|
| 1 | Source | Fetch candidates from one or more origins | Yes — multiple sources run in parallel |
| 2 | Hydrator | Enrich each candidate with metadata needed for filtering and scoring | Yes — independent hydrators run in parallel |
| 3 | Filter | Drop candidates that should never be shown (blocked, expired, duplicate, ineligible) | Sequential — each filter sees fewer items |
| 4 | Scorer | Assign each surviving candidate one or more scores | Sequential — later scorers see earlier scores |
| 5 | Selector | Sort by final score, return top K | Single op |
| 6 | SideEffect | Cache served IDs, log impressions, emit events, update counters | Async — must never block the response |
Walk the user through these eight steps:
P(action) for many actions (read, like, share, skip, report), combine with weights at serving time. To change behavior → change weights. No retraining.The X For You system uses multi-action with both positive and negative weights. Recommend multi-action when the user expects to tune frequently.
Default to isolation. Joint only when there's a specific reason (e.g., explicit batch-aware diversity).
github.com/xai-org/x-algorithm (Apache 2.0).The upstream repository at https://github.com/mturac/recsys-pipeline-architect ships:
SKILL.md with the complete 8-step workflowInstall via skills.sh: npx skills add mturac/recsys-pipeline-architect