Back to Skills

recsys-pipeline-architect

Design composable recommendation, ranking, and feed pipelines using the six-stage Source→Hydrator→Filter→Scorer→Selector→SideEffect framework popularized by xAI's open-sourced For You algorithm. Use this skill whenever the user is building any system that picks "the top K items for a (user, context)" — social feeds, content CMSs, RAG rerankers, task prioritizers, notification triage, search reranking, ad ranking.

235,601stars35,879forksUpdated 7/30/2026

Security Assessment

Safe(95/100)
Security Score95/100

About recsys-pipeline-architect

recsys-pipeline-architect is a spec-and-scaffold skill for designing composable recommendation, ranking, and feed pipelines. It encodes a six-stage pattern -- Source, Hydrator, Filter, Scorer, Selector, and SideEffect -- popularized by xAI's open-sourced For You algorithm, and is explicitly an independent MIT reimplementation of that pattern with no code copied from the original. The problem it solves is the recurring plumbing challenge of any system that must pick "the top K items for a (user, context)": social feeds, content CMSs, RAG rerankers, task prioritizers, notification triage, search reranking, and ad ranking.

When invoked, it walks the user through an eight-step workflow: clarify the use case, identify candidate sources (in-network and out-of-network), list required hydrations, order the filters cheap-before-expensive, design a scorer chain (primary ML, combiner, diversity, business rules), define the selector, wire fire-and-forget side effects, and generate a runnable scaffold in the user's stack (TypeScript, Go, or Python). It deliberately surfaces key trade-offs rather than defaulting silently -- single score versus multi-action prediction, isolated versus joint candidate scoring, and online versus offline execution -- and enforces hard rules such as never inventing benchmark numbers, attributing the pattern correctly, avoiding trademark or "For You" branding, ensuring the generated scaffold actually runs, and never letting side effects block the response.

It is aimed at engineers building or migrating ranking and feed systems who already have (or plan to wrap) an ML or LLM scoring function and need the surrounding architecture. It explicitly excludes model architecture work, pure ML training pipelines, and operating a deployed pipeline. This is an architecture and code-generation helper, grounded entirely in a documented design pattern.

FAQ

What is the six-stage framework?

Source fetches candidates, Hydrator enriches them with metadata, Filter drops ineligible items, Scorer assigns one or more scores, Selector sorts and returns the top K, and SideEffect handles caching, impression logging, and events asynchronously so it never blocks the response.

Which languages does the generated scaffold support?

It generates runnable scaffolds in TypeScript, Go, or Python, matched to the user's stack. A hard rule is that the scaffold must actually run -- no pseudocode passing as code.

Is any code copied from xAI's For You algorithm?

No. The skill is an independent reimplementation of the pattern under MIT and copies no code from the original. It requires attributing the pattern as popularized by xAI's open-sourced For You algorithm and prohibits using the trademarked branding.

When should I not use this skill?

It is not for model architecture work (transformer design, two-tower retrieval, embedding training), pure ML training pipelines, or operating a deployed pipeline such as monitoring and autoscaling. It is the plumbing around a scoring function, not the model itself.

Does it recommend single-score or multi-action ranking?

It surfaces the trade-off rather than defaulting silently. Multi-action prediction (predicting probabilities for many actions and combining them with tunable weights at serving time) is recommended when the user expects to tune behavior frequently without retraining.

Install recsys-pipeline-architect

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill