wshobson/agents

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 X For You algorithm. Use when building any system that picks "the top K items for a (user, context)" — content feeds, search ranking, RAG rerankers, task prioritizers, notification triage, ad selection.

86CollectingNetwork access
See how to use itView GitHub source
npx skills add https://github.com/wshobson/agents --skill "plugins/machine-learning-ops/skills/recsys-pipeline-architect"
Automated source guide

Source checked Jul 28, 2026·Refresh due Oct 26, 2026

Reorganized from the pinned upstream SKILL.md

Turn recsys-pipeline-architect's source instructions into a guide you can follow

According to the pinned SKILL.md from wshobson/agents: A spec-and-scaffold skill for building composable recommendation, ranking, and feed pipelines. Encodes the six-stage pattern popularized by xAI's open-sourced For You algorithm (Apache 2.0) and applies it to any "top K for (user, context)" problem.

npx skills add https://github.com/wshobson/agents --skill "plugins/machine-learning-ops/skills/recsys-pipeline-architect"
Check the pinned source

Best fit

  • Building any system that returns "the top K items for a user/context"
  • Designing or refactoring a personalized feed (content, search results, notifications)
  • Wrapping an LLM/ML scorer in proper pipeline plumbing (sources, hydration, filters, side effects)

Bring this context

  • A concrete task that matches the documented purpose of recsys-pipeline-architect.
  • The files, examples, or context the task depends on.
  • Your constraints, target environment, and definition of done.

Expected outputs

  • A result that follows the pinned recsys-pipeline-architect instructions.
  • A concise record of assumptions, inputs used, and unresolved questions.
  • A final check against the source workflow and relevant permission signals.

Key source sections

Read recsys-pipeline-architect through these 5 source sections

Sections are extracted automatically from the pinned SKILL.md and link back to the source.

01

The Six-Stage Framework

Sources before hydration: know what candidates exist before paying to enrich

SKILL.md · The Six-Stage Framework
Sources before hydration: know what candidates exist before paying to enrichHydration before filtering: many filters need metadata the source didn't provideFiltering before scoring: scoring is the expensive stage — drop the ineligible first
02

Workflow When Invoked

Walk the user through eight steps:

SKILL.md · Workflow When Invoked
Clarify the use case (one round, three questions only if missing): items being ranked, input context, language/runtimeIdentify the candidate sources (usually in-network + out-of-network, but single-source also valid)List required hydrations — for each filter and scorer, what data does it need that the source didn't provide?
03

When to Use This Skill

Building any system that returns "the top K items for a user/context"

SKILL.md · When to Use This Skill
Building any system that returns "the top K items for a user/context"Designing or refactoring a personalized feed (content, search results, notifications)Wrapping an LLM/ML scorer in proper pipeline plumbing (sources, hydration, filters, side effects)
04

Why this exact order

Sources before hydration: know what candidates exist before paying to enrich

SKILL.md · Why this exact order
Sources before hydration: know what candidates exist before paying to enrichHydration before filtering: many filters need metadata the source didn't provideFiltering before scoring: scoring is the expensive stage — drop the ineligible first
05

Key Trade-offs to Surface

Never default silently on these — they are product decisions disguised as technical ones.

SKILL.md · Key Trade-offs to Surface
Single score: train one model to predict relevance. To change behavior → retrain.Multi-action: predict P(action) for many actions (P(read), P(like), P(share), P(skip), P(report)), combine with weights at serving time. To change behavior → change weights. No retraining.Isolated: each candidate scored independently. Deterministic, cacheable.

SkillSignal prompt templates

Provide the task, context, and acceptance criteria

These prompts were written by SkillSignal from the source structure; they are not upstream text.

Task-start prompt

Confirm source fit, inputs, and outputs before acting.

Use recsys-pipeline-architect to help me with: [specific task]. Context: [files, data, or background]. Constraints: [environment, scope, and prohibited actions]. Before acting, check the pinned SKILL.md and explain which sections apply, what inputs are still missing, and what you will deliver.

Source-guided execution

Make the Agent explicitly follow the key extracted sections.

Apply the pinned recsys-pipeline-architect source to [task]. Pay particular attention to these source sections: “The Six-Stage Framework”, “Workflow When Invoked”, “When to Use This Skill”, “Why this exact order”, “Key Trade-offs to Surface”. Preserve the important decision at each step. Mark facts not covered by the source as “needs confirmation” instead of inventing them. Then verify the result against my acceptance criteria: [criteria].

Result-review prompt

Check omissions, permissions, and source drift before delivery.

Review the current recsys-pipeline-architect result: (1) does it satisfy the original task; (2) were any applicable steps or limits in the pinned SKILL.md missed; (3) did it perform any unauthorized file, command, network, or data action; and (4) which conclusions remain unverified? List issues first, then fix only what the source or user authorization supports.

Output checklist

Verify each item before delivery

The task matches the purpose documented in the SKILL.md.

The source section “The Six-Stage Framework” has been checked.

The source section “Workflow When Invoked” has been checked.

The source section “When to Use This Skill” has been checked.

The source section “Why this exact order” has been checked.

Inputs, constraints, and acceptance criteria are explicit.

Unverified facts, compatibility, and outcome claims are clearly marked.

Any file, command, network, or data action has been reviewed.

Choose a different workflow

When another Skill is the better fit

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.

A separate implementation from affaan-m/ECC; compare its source, maintenance signals, and permission requirements.

Open source detail

design-review

Use when the user says "review the design", "check the UI", or wants a comprehensive UI/UX review. Uses a 7-phase methodology covering interaction, responsiveness, accessibility, and more.

A separate implementation from event4u-app/agent-config; compare its source, maintenance signals, and permission requirements.

Open source detail

higgsfield-generate

Use when the user wants to generate an image or video via Higgsfield AI. Covers 30+ models: Soul V2, Seedance 2.0, Kling 3.0, Veo 3.1, GPT Image 2, Nano Banana 2. Also covers Marketing Studio — branded ad video/image with avatars and products. Use whenever: "generate an image", "make a video", "animate this photo", "image-to-video", "img2vid", "edit this image with AI", "produce a clip", "create an ad", "make a UGC video", "marketing video", "brand video", "TV spot", "import product from URL", "

A separate implementation from MoizIbnYousaf/marketing-cli; compare its source, maintenance signals, and permission requirements.

Open source detail

FAQ

What does recsys-pipeline-architect do?

A spec-and-scaffold skill for building composable recommendation, ranking, and feed pipelines. Encodes the six-stage pattern popularized by xAI's open-sourced For You algorithm (Apache 2.0) and applies it to any "top K for (user, context)" problem.

How do I start using recsys-pipeline-architect?

The catalog detected this source-specific install command: npx skills add https://github.com/wshobson/agents --skill "plugins/machine-learning-ops/skills/recsys-pipeline-architect". Inspect the command and pinned source before running it.

Which Agent platforms does it declare?

No dedicated Agent platform is declared in the pinned source record.

Repository stars
38,313
Repository forks
4,098
Quality
86/100
Source repository last pushed

Quality breakdown

Based on traceable docs and repository signals; stars are not treated as quality.

86/100
Documentation24/30
Specificity25/25
Maintenance18/20
Trust signals19/25

Compare before choosing

Related Agent Skills and source variants

These links are selected from shared tasks, functions, stacks, platforms, and same-name variants. Compare the source owner, documentation, permissions, and maintenance signals.

recsys-pipeline-architect by affaan-m

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.

design-review by event4u-app

Use when the user says "review the design", "check the UI", or wants a comprehensive UI/UX review. Uses a 7-phase methodology covering interaction, responsiveness, accessibility, and more.

higgsfield-generate by MoizIbnYousaf

Use when the user wants to generate an image or video via Higgsfield AI. Covers 30+ models: Soul V2, Seedance 2.0, Kling 3.0, Veo 3.1, GPT Image 2, Nano Banana 2. Also covers Marketing Studio — branded ad video/image with avatars and products. Use whenever: "generate an image", "make a video", "animate this photo", "image-to-video", "img2vid", "edit this image with AI", "produce a clip", "create an ad", "make a UGC video", "marketing video", "brand video", "TV spot", "import product from URL", "

arize-evaluator by github

Handles LLM-as-judge evaluation workflows on Arize including creating/updating evaluators, running evaluations on spans or experiments, managing tasks, trigger-run operations, column mapping, and continuous monitoring. Use when the user mentions create evaluator, LLM judge, hallucination, faithfulness, correctness, relevance, run eval, score spans, score experiment, trigger-run, column mapping, continuous monitoring, or improve evaluator prompt.

neuropixels-analysis by k-dense-ai

Analyze Neuropixels extracellular recordings end-to-end with SpikeInterface. Covers loading SpikeGLX/Open Ephys/NWB data, preprocessing, drift/motion correction, Kilosort4 (and CPU) spike sorting, quality metrics, and unit curation (threshold-based, model-based UnitRefine, and AI-assisted visual review). Use when working with Neuropixels 1.0/2.0 recordings, spike sorting, or extracellular electrophysiology analysis.

View original Skill.mdThis page is parsed directly from the repository SKILL.md without editorial rewriting. Collected: Jul 28, 2026 · about 6 min

Recsys Pipeline Architect

A spec-and-scaffold skill for building composable recommendation, ranking, and feed pipelines. Encodes the six-stage pattern popularized by xAI's open-sourced For You algorithm (Apache 2.0) and applies it to any "top K for (user, context)" problem.

Overview

Most "recommendation systems" in production aren't exotic ML — they're pipelines: fetch candidates from one or more sources, enrich them with metadata, drop the ineligible, score the rest, sort and pick the top K, then fire async side effects. The pattern is universal. The scoring function and the items change; the pipeline shape doesn't.

This skill is an independent reimplementation of the pattern (MIT) — no code copied from the original.

When to Use This Skill

  • Building any system that returns "the top K items for a user/context"
  • Designing or refactoring a personalized feed (content, search results, notifications)
  • Wrapping an LLM/ML scorer in proper pipeline plumbing (sources, hydration, filters, side effects)
  • Adding multi-action prediction with tunable weights (instead of a single relevance score)
  • Building a RAG retrieval reranker (cheap retrieval → expensive rerank)
  • Designing a task prioritizer or alert triage system

The Six-Stage Framework

#StageJobParallel?
1SourceFetch candidates from one or more originsYes — multiple sources run in parallel
2HydratorEnrich candidates with metadata needed for filtering and scoringYes — independent hydrators run in parallel
3FilterDrop ineligible candidates (blocked, expired, duplicate, ineligible)Sequential — each filter sees fewer items
4ScorerAssign each surviving candidate one or more scoresSequential — later scorers see earlier scores
5SelectorSort by final score, return top KSingle op
6SideEffectCache, log, emit events, update served-historyAsync — must never block the response

Why this exact order

  • Sources before hydration: know what candidates exist before paying to enrich
  • Hydration before filtering: many filters need metadata the source didn't provide
  • Filtering before scoring: scoring is the expensive stage — drop the ineligible first
  • Scorer chain (not single scorer): real systems compose ML scoring + diversity reranking + business rules
  • Selector after scoring: keeps scoring deterministic and cacheable
  • SideEffects last and async: side effects must never block the user response

Workflow When Invoked

Walk the user through eight steps:

  1. Clarify the use case (one round, three questions only if missing): items being ranked, input context, language/runtime
  2. Identify the candidate sources (usually in-network + out-of-network, but single-source also valid)
  3. List required hydrations — for each filter and scorer, what data does it need that the source didn't provide?
  4. List the filters — cheap before expensive, universal before user-specific (duplicate, self, age, block/mute, previously-served, eligibility)
  5. Design the scorer chain — primary ML/heuristic → combiner (multi-action with weights) → diversity → business rules
  6. Selector — sort descending by final score, take top K (or stratified mix)
  7. SideEffects — cache served IDs, emit impression events, update counters, log analytics; all fire-and-forget
  8. Generate the scaffold in the user's stack

Key Trade-offs to Surface

Never default silently on these — they are product decisions disguised as technical ones.

1. Single score vs multi-action prediction

  • Single score: train one model to predict relevance. To change behavior → retrain.
  • Multi-action: predict P(action) for many actions (P(read), P(like), P(share), P(skip), P(report)), combine with weights at serving time. To change behavior → change weights. No retraining.

The X For You algorithm uses multi-action with both positive and negative weights. Recommend multi-action when the user expects to tune frequently.

2. Candidate isolation vs joint scoring

  • Isolated: each candidate scored independently. Deterministic, cacheable.
  • Joint: candidates attend to each other during scoring (e.g., transformer over the whole batch). More expressive but non-deterministic across batches.

Default to isolation. Joint only when there's a specific reason (e.g., explicit batch-aware diversity).

3. Online vs offline batch

  • Request-time (online): pipeline runs on each request. Latency budget: 100–300ms.
  • Pre-computed (offline batch): pipeline runs periodically, results cached. Lower latency, lower freshness.
  • Hybrid: candidate retrieval offline, ranking online.

Hard Rules

  1. Do not invent benchmark numbers. "How fast is this?" → "depends on workload, run it yourself."
  2. Attribution discipline. Attribute the pattern as "popularized by xAI's open-sourced For You algorithm" / github.com/xai-org/x-algorithm (Apache 2.0).
  3. No trademark use. Don't name the user's artifact "X-like" or use "For You" branding. Use neutral names: "candidate pipeline", "feed pipeline", "ranking pipeline".
  4. Surface trade-offs. Multi-action vs single, isolation vs joint, online vs offline — never default silently.
  5. The generated scaffold must run. No pseudocode passing as code.
  6. Filter order matters. Cheap before expensive. Universal before user-specific.
  7. Side effects never block. Wrap in fire-and-forget patterns (goroutines / promises without await / asyncio tasks).

Anti-Patterns

  • ❌ Scoring before filtering (wastes compute on candidates that will be dropped)
  • ❌ Synchronous side effects (cache writes / impression emits blocking the response)
  • ❌ A single "relevance" score when the product needs multi-objective tuning
  • ❌ Joint scoring as default (non-deterministic, uncacheable, doesn't compose with reranking)
  • ❌ Pseudocode "for illustration" — the scaffold must actually run

Common Use Cases

Content feed (Strapi v5 plugin, TypeScript)

User has a CMS with 50k articles, wants a personalized "for you" feed. Walk through 8 steps → generate a Strapi plugin scaffold with multi-action scoring, author diversity, standard filters, async side-effect lane.

RAG retrieval reranker (Python async)

User's RAG returns top-50 chunks from a vector DB, wants to rerank with a more expensive scorer and return top-5. Single-source pipeline with a scorer chain (cheap retrieval + expensive rerank).

Task prioritizer (FastAPI service)

User has a queue of incoming task suggestions, wants to rank by "what should this user work on next" considering their past patterns. Items reversed (tasks instead of content), same shape applies.

Notification triage (offline-batch job)

User wants a daily digest that picks the top 10 from the last 24h queue. Offline-batch pipeline. Source = queue, filters = age/dedup/eligibility, scorer = urgency × user-affinity, selector = top 10, side effect = email send (still async).

Upstream

This skill is a single-file adapter for the upstream repository, which ships 5 load-on-demand reference docs and 3 runnable example scaffolds (Strapi v5 / Go / Python — every one green on its test suite, 9/9 tests total).

  • Upstream: https://github.com/mturac/recsys-pipeline-architect
  • Release: v0.1.0 (MIT)
  • References: interfaces in 4 languages (TS/Go/Python/Rust), multi-action scoring, candidate isolation, filter cookbook (12 patterns), scorer cookbook
  • Cross-platform install: npx skills add mturac/recsys-pipeline-architect
Source repo
wshobson/agents
Skill path
plugins/machine-learning-ops/skills/recsys-pipeline-architect/SKILL.md
Commit SHA
c4b82b0ad771
Repository license
MIT
Data collected