sanjeevrg89/kaushal/ml-system-design

Claude Code and agent skill by sanjeevrg89/kaushal

Trust tier 1
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

End-to-end ML system design for production and interviews — problem, metrics, data, features, model, eval, serving, monitoring, with archetypes (recsys, search, ads, fraud, RAG). Use when asked to design or scope an ML system.

Install

npx vskill@latest install sanjeevrg89/kaushal/ml-system-design

SKILL.md

The same SKILL.md was published earlier as sanjeevrg89/kaushal/ml-system-design.

ML System Design

Apply the judgment of a staff ML systems architect who has shipped and operated large-scale ML and LLM systems for years — and who has run the design interview from both sides of the table. The job is not to name a model. It is to translate a fuzzy business need into a system: an objective, the data and pipelines that feed it, an evaluation that proves it works, a serving path that meets a latency and cost budget, and a monitoring + iteration loop that keeps it working as the world drifts.

Scope and triggers

World-class playbook for designing end-to-end ML systems — the "tie it all together" architect skill, covering both real-world production architecture and the ML-system-design interview. Use when asked to design an ML/AI system, scope an ML feature, do an ML system design interview, or reason about a recommendation/ranking, search/retrieval, feed, ads/CTR, classification, fraud/anomaly, or LLM/RAG/agent system end to end. Provides a repeatable framework (clarify problem & business metric → ML objective → data/labels & the third pipeline → features → model → training pipeline → offline+online evaluation → serving (online/batch/streaming, latency budget) → monitoring & iteration), the canonical problem archetypes, the key design axes/tradeoffs (online vs batch, latency vs throughput vs cost, candidate generation→ranking→re-ranking funnels, freshness, training-serving skew, cold start, feedback loops, scale & failure modes), how to choose and defend business/ML/guardrail metrics, and the anti-patterns.

How to use this skill

  1. Read `ml-system-design-guide.md` in this directory — the full framework, the problem archetypes,

the design axes and tradeoffs, the metric hierarchy, the scale/estimation math, and the anti-patterns. Apply it to the design at hand.

  1. For a complete worked design walked through the framework end to end (with the tradeoffs called out),

read `examples.md`.

  1. Whether the task is a real architecture or an interview: scope first, never jump to the model.

State the business metric and the ML objective before drawing a single box. Match the surrounding codebase/platform conventions; apply the framework rigor regardless.

The essentials (full detail in ml-system-design-guide.md)

  • Clarify before you design. Pin the business metric you're moving and any constraints (scale, QPS,

latency budget, cost, privacy) before proposing anything. A model you can't tie to a moveable KPI is a red flag.

  • Translate to a crisp ML problem and ML objective. Name the task (binary/multiclass classification,

regression, ranking/learning-to-rank, retrieval, generation) and the exact thing you optimize. The business KPI, the ML metric, and the proxy label are three different things — say how they relate.

  • ML systems have a third pipeline beyond train and serve: the data/feature pipeline that produces

labels and features for both. Most production failures live here (training-serving skew, label leakage, stale features). Design it explicitly. See [[data-engineering-feature-stores]].

  • Evaluation is offline + online, and they disagree. Offline metrics (AUC, NDCG, recall@k, calibration)

gate launch; online A/B against business + guardrail metrics decides it. Expect an offline/online gap and plan the experiment. See [[ml-evaluation-evals]].

  • Serving path follows the latency budget. Online (per-request, ms budget) vs batch (precompute) vs

streaming (near-real-time). Large/expensive models go behind a candidate generation → ranking → re-ranking funnel: cheap recall first, expensive precision last. See [[serving-frameworks]].

  • Name the design axes out loud: online vs batch, latency vs throughput vs cost, model complexity vs

maintainability, build vs buy vs API, freshness vs staleness. Every choice is a tradeoff — defend it.

  • Plan for cold start, feedback loops, and failure modes. New users/items, the model shaping its own

future training data, and what happens when the model server is down (fallback to a heuristic/cached ranking — degrade, don't fail).

  • Estimate scale early: QPS, data volume, feature/embedding size, index size, p99 latency, $/query.

Back-of-envelope numbers drive every architecture decision (sharding, caching, replication, async).

  • Monitoring and iteration are part of the design, not an afterthought. Track input drift, prediction

drift, online metrics, and data quality; have a retraining trigger and a rollback. See [[mlops-lifecycle]] and [[ml-observability-monitoring]].

  • Modern LLM/RAG/agent systems use the same framework with new boxes: retrieval + vector index, prompt
  • context assembly, the generation model (API vs self-hosted), evals as the new offline metric, and

cost/latency dominated by tokens. See [[rag-vector-databases]] and [[llm-app-agent-frameworks]].

  • Avoid the anti-patterns: jumping to a model before the metric, ignoring data/serving, no

monitoring/iteration story, over-engineering a v1, and optimizing a metric you can't actually move.

Related skills

  • [[recsys-ranking]] — the recommendation/ranking archetype in depth (candidate gen, LTR, two-tower).
  • [[mlops-lifecycle]] — the lifecycle around the system: CI/CD, retraining, registries, rollout.
  • [[ml-evaluation-evals]] — offline metrics, A/B testing, and LLM evals to gate and decide launches.
  • [[data-engineering-feature-stores]] — the third pipeline: feature stores, freshness, training-serving skew.
  • [[rag-vector-databases]] — retrieval, embeddings, and vector indexes for the LLM/RAG archetype.
  • [[llm-app-agent-frameworks]] — orchestrating LLM apps, tools, and agents.
  • [[serving-frameworks]] — vLLM/Triton/KServe/Ray Serve for the serving box.
  • [[aiml-on-kubernetes]] — running training and serving at scale on Kubernetes/GKE.
  • [[ml-observability-monitoring]] — drift, data quality, and production monitoring.

Security

  • Security scanPassed, 0 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/sanjeevrg89/kaushal/ml-system-design/badge)](https://verified-skill.com/skills/sanjeevrg89/kaushal/ml-system-design)

Something wrong with this skill or its page? Tell us.