ai-ml-engineering
Skill2 starsChanged 6 months agoMITView on GitHub
Build ML systems with disciplined training, evaluation, deployment, and safety practices
In this repository38 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- accessibility-engineeringSkill
- agent-orchestrationSkill
- api-and-interface-designSkill
- architecture-designSkill
- backend-engineeringSkill
- ci-cd-and-automationSkill
- code-review-and-qualitySkill
- code-simplificationSkill
- context-engineeringSkill
- database-designSkill
- data-pipeline-engineeringSkill
- debugging-and-error-recoverySkill
- deployment-strategySkill
- documentation-and-adrsSkill
- doubt-driven-developmentSkill
- frontend-engineeringSkill
- git-workflow-and-versioningSkill
- idea-refineSkill
- incident-responseSkill
- incremental-implementationSkill
- infrastructure-as-codeSkill
- llm-evaluationSkill
- microservices-designSkill
- mobile-developmentSkill
- observability-and-monitoringSkill
- performance-optimizationSkill
- planning-and-task-breakdownSkill
- prompt-engineeringSkill
- rag-system-designSkill
- requirements-analysisSkill
- risk-assessmentSkill
- security-and-hardeningSkill
- source-driven-developmentSkill
- spec-driven-developmentSkill
- test-driven-developmentSkill
- using-agent-skillsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. About 0 are common, 18 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈18
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Before training or fine-tuning a model
- Distinctive: line 15
Before deploying a model to production
- Distinctive: line 16
When integrating a third-party LLM API
- Distinctive: line 17
When evaluating model quality
- Distinctive: line 18
When debugging unexpected model behavior
- Distinctive: line 23
Before any code: what is the exact prediction task?
- Distinctive: line 29
Check for data leakage (test set information in training set)
- Distinctive: line 30
Check for label quality (sample 100 examples manually)
- Distinctive: line 31
Check for demographic skew (does the dataset represent production distribution?)
- Distinctive: line 32
Check for PII that should not be in training data
- Distinctive: line 33
Document the data provenance and version
- Distinctive: line 43
Write your evaluation pipeline before training.
- Distinctive: line 57
Test for prompt injection
- Distinctive: line 58
Test for jailbreak attempts
- Distinctive: line 59
Test for harmful output generation
- Distinctive: line 60
Test for PII leakage in outputs
- Distinctive: line 61
Test for hallucination in factual claims
- Distinctive: line 90
No monitoring for distribution shift
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
Overview
ML engineering failures are silent and delayed. A model that scores well on the benchmark can fail badly in production. This skill enforces the practices that catch these failures before they reach users: proper evaluation harnesses, data leakage detection, distribution shift monitoring, and safety checks.
When to Use
- Before training or fine-tuning a model
- Before deploying a model to production
- When integrating a third-party LLM API
- When evaluating model quality
- When debugging unexpected model behavior
Process
Step 1: Define the task and success metric precisely
Before any code: what is the exact prediction task? What metric proves the model is good enough? What metric proves it is safe enough? Document these as your evaluation contract.
Step 2: Establish the baseline
Compute a simple baseline (majority class, rule-based system, GPT-4 zero-shot). Your model must beat this baseline by a meaningful margin to justify the complexity.
Step 3: Audit the training data
- Check for data leakage (test set information in training set)
- Check for label quality (sample 100 examples manually)
- Check for demographic skew (does the dataset represent production distribution?)
- Check for PII that should not be in training data
- Document the data provenance and version
Step 4: Implement a reproducible training pipeline
- Pin all dependency versions
- Set all random seeds
- Version the dataset (not just the model)
- Store training hyperparameters with model artifacts
- Confirm: can you reproduce this exact model from scratch?
Step 5: Build the evaluation harness before training
Write your evaluation pipeline before training. Evaluations should be:
- Automatic (run in CI)
- Deterministic (same inputs → same scores)
- Multi-dimensional (accuracy, latency, cost, safety, fairness)
- Comprehensive (held-out test set + edge case suite)
Step 6: Train with monitoring
Track: training loss, validation loss, gradient norms. Flag: loss spikes, NaN gradients, overfitting (train loss << val loss), underfitting.
Step 7: Run the full evaluation suite
Compare against: baseline, previous model version, human performance (if applicable). Document every dimension. Declare the threshold required for deployment.
Step 8: Safety evaluation
For LLM applications:
- Test for prompt injection
- Test for jailbreak attempts
- Test for harmful output generation
- Test for PII leakage in outputs
- Test for hallucination in factual claims
Step 9: Production readiness
- Latency profiled at p50, p95, p99
- Cost per inference calculated
- Graceful degradation defined (what happens when the model is unavailable?)
- Output validation implemented (reject malformed outputs)
- Monitoring in place for distribution shift
- Feedback loop defined for collecting production labels
Step 10: Staged rollout
Deploy to 1% of traffic. Monitor key metrics for 24 hours. Roll out to 10%, then 100%. Have a rollback procedure.
Anti-Rationalizations
"The eval numbers look good" Eval numbers on a curated test set are necessary but not sufficient. Production distribution ≠ test distribution.
"We'll add safety checks after launch" Safety issues discovered after launch are incidents. Safety checks added before launch are requirements.
"The model improved so we should ship it" Improved on which metric? Under which conditions? Improvements in accuracy can come with regressions in latency, fairness, or safety.
Red Flags
- No baseline comparison
- Evaluation dataset overlaps with training data
- Evaluation written after training (to justify the result)
- No monitoring for distribution shift
- Model deployed without latency profiling
- No rollback procedure
Verification Requirements
- Task and success metric defined before training
- Baseline computed and documented
- Training data audited for leakage and PII
- Training is reproducible from version-pinned code + versioned dataset
- Evaluation harness built before training
- Safety evaluation completed
- Latency profiled at p95
- Staged rollout plan documented
- Distribution shift monitoring in place
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.

