Skip to main content
skill Claude Code CX Codex Cursor

recsys-pipeline-architect — Claude Code skill: install

Designs recommendation, ranking, and feed pipelines with six explicit stages. Use it when a system must choose the top K items for a user and context.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add wshobson/agents
/plugin install machine-learning-ops@claude-code-workflows
Open on GitHub

What recsys-pipeline-architect does

recsys-pipeline-architect helps design and scaffold pipelines for recommendations, search ranking, feeds, RAG reranking, task prioritization, and notification triage. It uses six stages: Source fetches candidates, Hydrator adds metadata, Filter removes ineligible items, Scorer assigns scores, Selector returns the top K, and SideEffect runs follow-up actions asynchronously.

The skill walks through eight steps, from clarifying the use case and finding candidate sources to defining hydrations, filters, scorer chains, selection, and side effects. It surfaces the choice between single-score and multi-action prediction, isolated and joint scoring, plus online, offline, and hybrid execution. The final step generates a runnable scaffold in the user’s stack.

It supports Claude Code, Codex, and Cursor. The project still needs its own language, runtime, and stack dependencies. Install this skill when you need a clear ranking pipeline design; it is too much structure for a plain sort with no candidate sources or filtering.

What it helps with

  • design a top K recommendation pipeline
  • combine several candidate sources into a feed
  • rerank RAG results after vector retrieval
  • tune multi-action scores with serving-time weights
  • keep filtering and side effects outside the scorer

Example prompts for the agent

  • Design a ranking pipeline for the top K tasks for this user and walk through the eight steps.
  • Build a RAG reranker that filters retrieved candidates, applies a scorer chain, and returns the top K.
  • Compare single-score and multi-action prediction for this feed, then generate a runnable scaffold.

How to install recsys-pipeline-architect

1Plugin marketplace

/plugin marketplace add wshobson/agents
/plugin install machine-learning-ops@claude-code-workflows

This installs the whole machine-learning-ops plugin with all its skills

2Skills CLI (Vercel)

npx skills add wshobson/agents --skill recsys-pipeline-architect -a claude-code

3Manually: put the files in place

~/.claude/skills/recsys-pipeline-architect/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/recsys-pipeline-architect/

From the same set213

The whole set →
typescript-advanced-types Seth Hobson Guides an agent through advanced TypeScript types, from generics to conditional and mapped types. Use it for typed libraries, API clients, or strict configuration objects. Claude Code CX Codex Cursor 92,169installs tailwind-design-system Seth Hobson Helps build design systems with Tailwind CSS v4, from theme tokens to component variants. Use it when a project needs shared UI patterns. Claude Code CX Codex Cursor 70,180installs brand-landingpage Travis D. Elliott This skill interviews you about the product and its visual direction, then builds a landing page through Stitch. Use it when there’s no established design yet. Claude Code CX Codex Cursor 39,476installs python-testing-patterns Seth Hobson This skill guides Python testing with pytest, fixtures and mocks. Use it when building a test suite or tracking down failing checks. Claude Code CX Codex Cursor 36,943installs python-performance-optimization Seth Hobson This skill profiles Python code to locate CPU and memory bottlenecks. Use it when an application responds slowly or consumes too many resources. Claude Code CX Codex Cursor 35,675installs nextjs-app-router-patterns Seth Hobson This skill covers Next.js App Router patterns for rendering, routing, and data fetching. Use it when starting an App Router project or moving from Pages Router. Claude Code CX Codex Cursor 32,529installs api-design-principles Seth Hobson Use this skill to plan or review REST and GraphQL APIs. It helps when writing a specification or setting API conventions for a team. Claude Code CX Codex Cursor 30,348installs code-review-excellence Seth Hobson This skill guides pull request reviews, catches logic and security issues, and helps teams give specific feedback. Use it for review standards or developer mentoring. Claude Code CX Codex Cursor 30,193installs

Similar

secops-cases official Google LLC Manage Google Security Operations SOAR cases, from queue review and alert grouping to investigation notes, status changes, and closure. Claude Code Gemini CLI CX Codex 1,900installs microsoft-agent-framework official github Guides GitHub Copilot through building, updating, reviewing, and explaining Microsoft Agent Framework applications. It also covers migrations from Semantic Kernel and AutoGen. GitHub Copilot 1,900installs semantic-kernel official github This skill helps build and inspect Semantic Kernel applications using current documentation. Use it for projects involving plugins, function calling, or AI integrations. GitHub Copilot 1,700installs gtm-ai-gtm official Smit Patel (https://linkedin.com/in/smitkpatel) This skill helps take AI products to market by choosing positioning, handling failure-ownership objections, and shaping pricing for variable usage. GitHub Copilot 1,600installs azure-architecture-autopilot official github Design Azure infrastructure from a prompt or inspect existing resources, then work through diagrams, Bicep generation and deployment. Use it for a new build or changes to an existing setup. GitHub Copilot 1,500installs agent-owasp-compliance official github Checks an AI agent codebase against the 10 OWASP ASI risks. Use it before production deployment, for security review, or when preparing an audit report. GitHub Copilot 1,500installs skill-creator official anthropics Creates and refines skills, then tests them with prompts, evaluations, and performance checks. Claude Code Claude.ai 414,180installs writing-for-agents Matt Pocock Guidance for writing skills and agent-facing documents. Use it when editing AGENTS.md, CLAUDE.md, or reference files reached from them. Claude Code 466,719installs

Questions about recsys-pipeline-architect

How do I install recsys-pipeline-architect in Claude Code?

Run npx skills add wshobson/agents --skill recsys-pipeline-architect -a claude-code. The skill file is placed at ~/.claude/skills/recsys-pipeline-architect/SKILL.md.

What does recsys-pipeline-architect do?

It designs recommendation, ranking, and feed pipelines with Source, Hydrator, Filter, Scorer, Selector, and SideEffect stages. It also guides the generation of a runnable scaffold.

Which platforms support recsys-pipeline-architect?

The skill supports Claude Code, Codex, and Cursor. Each platform has its own install command and skill-file path in the package instructions.

Source text

SKILL.md · MIT
---
name: recsys-pipeline-architect
description: 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.
---

# 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](https://github.com/xai-org/x-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

| # | Stage | Job | Parallel? |
|---|---|---|---|
| 1 | **Source** | Fetch candidates from one or more origins | Yes — multiple sources run in parallel |
| 2 | **Hydrator** | Enrich candidates with metadata needed for filtering and scoring | Yes — independent hydrators run in parallel |
| 3 | **Filter** | Drop ineligible candidates (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, log, emit events, update served-history | Async — 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`

© Seth Hobson · MIT · wshobson/agents

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor