ai-engineering
Skill8 starsChanged 2 months agoMITView on GitHub
Design, train, optimize, deploy, and evaluate production machine learning and LLM systems. Use when building ML models, training classifiers, fine-tuning LLMs with LoRA/PEFT, deploying low-latency inference endpoints, architecting vector RAG pipelines, or evaluating model bias and data leakage — even if they don't explicitly say \"AI engineering\". Do NOT use for standard backend CRUD development, basic SQL queries without ML, or simple UI styling.
We split this skill into the rules it gives an agent
3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
3
Distinctive
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 20
Mandatory Baseline Before Complexity: Always benchmark against a naive baseline (majority class/mean) and simple linear model before …
- Distinctive: line 21
Demographic Parity & Bias Auditing: Every production candidate must pass four-fifths disparate impact testing across demographic slices …
- Distinctive: line 58
Key Point: Check for temporal dependencies.
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AI & Machine Learning Engineering
Design, train, optimize, deploy, and monitor production machine learning models and intelligent agent systems with rigorous validation, latency engineering, and ethical guardrails.
Core Principle
Every ML solution must beat a naive baseline, guarantee train-test isolation, and meet strict production latency and fairness budgets.
Core Invariants
- Strict Train-Test Isolation: Preprocessing scalers, encoders, and tokenizers must be fit strictly on training folds inside isolated pipelines to eliminate data leakage.
- Sub-100ms Inference Budget: Synchronous user-facing endpoints must achieve $p99 < 80\text{ms}$ through quantization (ONNX/TensorRT/GGUF), engine optimization, or continuous batching.
- Mandatory Baseline Before Complexity: Always benchmark against a naive baseline (majority class/mean) and simple linear model before advancing to deep networks or complex ensembles.
- Demographic Parity & Bias Auditing: Every production candidate must pass four-fifths disparate impact testing across demographic slices ($\text{ratio} \ge 0.80$).
- Continuous Drift Observability: Production models must emit data drift metrics (KS-test / Population Stability Index) and concept drift alerts to trigger automated retraining.
Architecture & Map of Content (MOC)
Problem Framing & Data Assessment
│
▼
┌───────────────────────────────────────┐
│ 1. Data Prep & Leakage-Free Pipeline │ (Cross-Validation, Feature Isolation)
└──────────────────┬────────────────────┘
│
▼
┌───────────────────────────────────────┐
│ 2. Model Training & Fine-Tuning │ (Baselines, LoRA / QLoRA, Tree Ensembles)
└──────────────────┬────────────────────┘
│
▼
┌───────────────────────────────────────┐
│ 3. Bias, Fairness & Ethics Audit │ (Disparate Impact, SHAP Attributions)
└──────────────────┬────────────────────┘
│
▼
┌───────────────────────────────────────┐
│ 4. Production Serving & Optimization │ (ONNX/vLLM, Sub-100ms Latency, Canary)
└───────────────────────────────────────┘Step-by-Step Procedure (TWI)
Step 1: Requirements & Data Hygiene Verification
- Action: Assess target metrics, evaluate class balance, and establish reproducible validation splits.
- Key Point: Check for temporal dependencies. If data has a time dimension, use chronological splitting; otherwise, use Stratified $k$-Fold cross-validation.
- Why: Random splits on time-series data cause severe lookahead leakage and false confidence.
Step 2: Model Training & Architecture Selection
- Action: Fit naive baselines, progress to gradient-boosted trees or fine-tune neural architectures (LoRA/PEFT for LLMs).
- Key Point: For LLMs, apply LoRA to all attention and MLP projection layers with $\alpha = 2 \times r$ and 4-bit NF4 quantization.
- Why: Selective rank adaptation achieves foundation model performance at 25% of the VRAM cost.
- Inline Checklist:
- Simple baseline established (Linear/Logistic Regression or Mean baseline)
- Cross-validation variance across folds is within acceptable bounds (< 5%)
- Overfitting diagnostics checked (Training loss vs Validation loss convergence)
- Hyperparameters tuned systematically using Bayesian optimization
Step 3: Bias, Explainability & Robustness Auditing
- Action: Evaluate fairness across subpopulations and calculate SHAP feature attributions.
- Key Point: Enforce the four-fifths rule ($\text{selection rate ratio} \ge 0.80$) and compute top local feature attributions for high-stakes decisions.
- Why: Undetected bias causes regulatory violations and uncalibrated real-world discrimination.
Step 4: Low-Latency Serving & Canary Rollout
- Action: Export models to ONNX or vLLM, wrap in asynchronous API services, and initiate a 10% canary deployment.
- Key Point: Track $p99$ latency, Population Stability Index (PSI), and error rates across the canary group.
- Why: Canary testing isolates performance regressions before full traffic exposure.
Anti-Rationalization Guardrails
| Tempting Rationalization | Binding Rule | Engineering Rationale |
| "Accuracy is 98%, so we don't need confusion matrices." | Mandatory PR-AUC, F1, and confusion matrix analysis. | High accuracy on imbalanced data often hides a degenerate majority-class classifier. |
| "Preprocessing before splitting is harmless." | Zero data leakage: pipeline-contained transformers only. | Dataset-wide preprocessing leaks test distribution parameters into training folds. |
| "Model meets accuracy goals, so skip bias checks." | Fairness audit is a mandatory release gate. | Regulatory and ethical standards mandate demographic parity verification. |
| "400ms latency is fast enough for cloud servers." | Sub-100ms p99 budget for interactive endpoints. | High latency compounds across microservices and degrades user experience. |
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- swyxio/skills★ 189same name
- mthines/agent-skills★ 20same name
- 05-deepak-patidar/claude-skills★ 4same name
- JimmyVGDY/codex-long-term-assistant-skills★ 3same name
- ethansmadjaa/skills★ 1same name
- joaocarloscruz/skills★ 1same 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 repository42 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ai-data-remediationSkill
- codebase-designSkill
- code-reviewSkill
- diagnosing-bugsSkill
- domain-modelingSkill
- engineering-workflow-guideSkill
- git-safety-guardrailsSkill
- goalSkill
- grillingSkill
- grill-meSkill
- grill-with-docsSkill
- handoffSkill
- implementSkill
- implement-specSkill
- improve-codebase-architectureSkill
- j-spaceSkill
- migrate-to-shoehornSkill
- ml-best-practicesSkill
- prototypeSkill
- researchSkill
- resolving-merge-conflictsSkill
- retroSkill
- scaffold-exercisesSkill
- setup-engineering-workflowsSkill
- setup-pre-commitSkill
- setup-ts-deep-modulesSkill
- skill-conductorSkill
- tddSkill
- teachSkill
- to-questionnaireSkill
- to-specSkill
- to-ticketsSkill
- triageSkill
- wait-whatSkill
- wayfinderSkill
- wizardSkill
- workflow-designerSkill
- writing-beatsSkill
- writing-for-agentsSkill
- writing-fragmentsSkill
- writing-shapeSkill
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.

