ml-system-design
Skill0 starsChanged 6 months agoMITView on GitHub
This skill should be used when the user asks to "design an ML system", "review this architecture", "design a training pipeline", "design a serving architecture", "write an ML design doc", "how should we architect" a model/feature/ranking/NLP system, or asks for trade-off analysis between ML infrastructure options (batch vs streaming features, real-time vs batch inference, embedding stores, model serving on EKS/ECS).
1 other project uses a version of this.
Adopted by
Most recently taken up by
- dathuynh1108/agent-skillstheir own version, first seen Jun 22, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- dathuynh1108/agent-skills★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository18 other files it gives its agents.
- experiment-designSkill
- llm-engineeringSkill
- ml-autoplanSkill
- ml-canarySkill
- ml-carefulSkill
- ml-code-reviewSkill
- ml-experiment-journalSkill
- ml-iterateSkill
- ml-learnSkill
- ml-office-hoursSkill
- ml-principlesSkill
- ml-production-debugSkill
- ml-red-teamSkill
- ml-retroSkill
- ml-setupSkill
- ml-shipSkill
- model-evaluationSkill
- tech-leadershipSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
Verify framework/service claims against docs before putting them in a design.
- Distinctive: line 27
Ask only what can't be inferred:
- Distinctive: line 63
Missing versioning: every prediction attributable to (model, feature snapshot, code) versions.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
ML system design
Principal-level ML architecture. Context: AWS, EKS/ECS-centric (not SageMaker), behavioral + NLP problems across transformers, LLMs, classical NLP, user modeling, embeddings, GBMs. Designs must survive a design review, not a survey.
The iron law
NO IMPLEMENTATION WITHOUT A VALIDATED PLAN. AN UNGROUNDED DESIGN IS A GUESS.Verify framework/service claims against docs before putting them in a design. Unverifiable → [unverified]. Every number shows its arithmetic.
Before designing — pin the shaping constraints
Ask only what can't be inferred:
- Service contract: p50/p99 latency, peak QPS, online/batch/async.
- Freshness: how stale before product metrics degrade? This number alone usually decides batch vs streaming.
- Data scale + label arrival delay (behavioral labels arrive hours-to-weeks late — design for it).
- Failure tolerance: model down/wrong → fallback heuristic, cached predictions, or hard dependency?
- Ops reality: who's on call, what infra exists. Undesirable truth: a design the team can't operate is a bad design.
State assumptions explicitly; multiple plausible readings of the ask → present them, don't pick silently.
Simplicity gate
Before any architecture: what does the simplest thing get? Heuristic → GBM → fine-tune → LLM, in that order of escalation; each rung must beat the previous on the eval, net of added cost. No streaming when batch freshness suffices. No feature store when log-and-wait works. No microservice fan-out when one container serves the QPS. Quantify the gap the complexity buys.
Design doc shape
- Problem & metrics — business metric, model proxy, and the assumed causal link (state it; it's the most common silent failure).
- Constraints — latency, freshness, cost ceiling, PII.
- Architecture — components, data flow, where state lives. Concrete AWS services.
- Alternatives — ≥2 real options with quantified reasons each loses. "Doesn't scale" without numbers is not a reason.
- Failure modes — per component: what breaks, blast radius, fallback.
- Rollout — shadow → canary → holdback → kill switch.
- Cost — order-of-magnitude with the dominant term flagged, arithmetic shown.
- Open questions — only decision-blocking ones, with owners.
- Success criteria — numeric, measurable, written before build: "p99 < Xms at Y QPS, online metric Z within W% of offline estimate".
Review mode
Tier every finding: Blocking / Should-fix / Consider. Phrase as failure scenarios ("when the feature pipeline lags, this serves stale scores silently"), not preferences.
Review-killers — check first:
- Train/serve skew by construction: feature logic existing twice (offline + online). Blocking. Fix: log-and-wait, shared library, or feature store.
- Label leakage in pipeline: feature windows overlapping label windows; joins on future state; aggregates containing the target event.
- Feedback loops: model output shaping its own training data (ranking especially). Require logged propensities or exploration traffic.
- Retrains without gates: automated retrain → offline gates + canary before promotion. Always.
- Missing versioning: every prediction attributable to (model, feature snapshot, code) versions.
AWS defaults (EKS/ECS)
Details + tables: references/aws-patterns.md. Headlines:
- Serving: containers on EKS, HPA on queue depth/in-flight (never CPU for GPU work). vLLM/Triton for transformers; FastAPI+ONNX for small models.
- Training: Argo Workflows or Step Functions → GPU node groups, Karpenter, spot + checkpointing.
- Features: S3+Iceberg offline; DynamoDB/ElastiCache online; Flink-on-Kinesis only when the freshness number demands it, with parity writes to S3 (non-negotiable — that's what kills skew).
- Retrieval: OpenSearch k-NN managed; Qdrant on EKS when tuning/cost matters; embedding model version pinned to the index, asserted at query time.
Behavioral & NLP specifics
- Delayed/censored labels: label maturation policy in the doc — it determines retrain cadence and eval validity.
- User-history features: explicit history cap + cold-start behavior.
- Tokenizer ships with the model artifact, pinned. Tokenizer mismatch = silent quality killer.
- LLM components → route through
llm-engineering's decision ladder; don't assume fine-tuning.
Output
A document pasteable into RFC tooling. Prose, few sections, quantified claims, "(assumption)" on everything unquantified. Diagram only when topology is non-obvious. Dense — no filler.
Pipeline integration
Read ml/PROBLEM.md (constraints, metrics, label reality) and ml/STACK.md (infra defaults) before asking the user anything — only ask for what they don't answer. Write the design to ml/DESIGN.md. On completed design or review, append design_reviewed to ml/gates.json. Surface ACTIVE dataset notes from ml/notes/datasets.md when the design touches noted data.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

