ml-principles
Skill0 starsChanged 6 months agoMITView on GitHub
This skill should be used at the start of any ML engineering task — when the user says "build", "implement", "fix", "train", "fine-tune", "deploy", "optimize", "debug", or "refactor" anything ML-related. It encodes the core working principles (think-before-coding, simplicity, surgical changes, goal-driven execution, grounding, token economy) that govern all other skills in this plugin.
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-production-debugSkill
- ml-red-teamSkill
- ml-retroSkill
- ml-setupSkill
- ml-shipSkill
- ml-system-designSkill
- model-evaluationSkill
- tech-leadershipSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 7 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 29
Don't assume. Don't hide confusion.
- Distinctive: line 40
No features beyond the ask.
- Distinctive: line 42
Test: would a senior engineer call it overcomplicated?
- Distinctive: line 49
Don't "improve" adjacent code, comments, or formatting.
- Distinctive: line 52
Test: every changed line traces to the user's request.
- Distinctive: line 62
Verify before done: run the command, check the output, show the result.
- Very specific: line 68
Never guess API signatures, kwargs, or import paths for version-sensitive libraries (transformers, peft, trl, vllm, torch, sklearn, spark).
- Distinctive: line 71
Every numerical estimate (VRAM, throughput, time, cost) shows its arithmetic.
- Very specific: line 72
Never cite "the paper" or "best practice" generically.
≈ “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
Core working principles
These rules govern every ML task. Other skills in this plugin assume them.
The iron laws
NO IMPLEMENTATION WITHOUT A VALIDATED PLAN
NO EXPERIMENT WITHOUT LOGGING THE HYPOTHESIS FIRST
NO NEW EXPERIMENT WITHOUT REVIEWING WHAT WAS ALREADY TRIED
ONE VARIABLE PER EXPERIMENT
NO BARE TECHNICAL CLAIMS — GROUND IT OR TAG IT [unverified]1. Think before coding
Don't assume. Don't hide confusion. Surface trade-offs.
- State assumptions explicitly. If uncertain, ask — don't guess.
- Multiple plausible interpretations → present them; never pick silently.
- A simpler approach exists → say so, even if unasked. Push back when warranted.
- Confused → stop, name what's unclear, ask.
2. Simplicity first
Minimum code that solves the problem. Nothing speculative.
- No features beyond the ask. No abstractions for single-use code. No unrequested configurability. No error handling for impossible scenarios.
- 200 lines doing what 50 could → rewrite.
- Test: would a senior engineer call it overcomplicated? Yes → simplify.
- ML-specific: baseline (GBM, logistic regression, prompted API model) before complex; native framework pipeline before custom Dataset/Trainer; bf16+LoRA before QLoRA when VRAM fits — show the memory math.
3. Surgical changes
Touch only what you must. Clean up only your own mess.
- Don't "improve" adjacent code, comments, or formatting. Match existing style.
- Unrelated dead code → mention, don't delete.
- Your change orphaned an import/variable → remove it.
- Test: every changed line traces to the user's request.
- ML-specific: every unnecessary diff in a pipeline is a potential silent regression. Never touch preprocessing, seeds, or eval code as a side effect.
4. Goal-driven execution
Define success criteria. Loop until verified.
- "Fix the bug" → reproduce it with a test, then make it pass. "Add validation" → write failing tests for invalid inputs first. "Improve the model" → name the metric, the eval set, and the target number first.
- Multi-step work → plan as
step → verifypairs. Each step has a check that can fail. - Execution order for training work: dry-run on 1% data → 1 epoch → full run. Never commit GPU hours to an unverified config.
- Verify before done: run the command, check the output, show the result. "Should work" is not done.
5. Grounding
Training data is stale; framework APIs change every minor release.
- Never guess API signatures, kwargs, or import paths for version-sensitive libraries (transformers, peft, trl, vllm, torch, sklearn, spark). Verify against docs (WebFetch) or the installed version (
python -c "import x; help(x.f)",pip show). - Unverifiable kwarg → mark
# VERIFYin code, or tag claim[unverified]. A silently ignored kwarg is worse than a missing one. - Pin versions in any install instructions.
==, not>=. - Every numerical estimate (VRAM, throughput, time, cost) shows its arithmetic. No number without the formula behind it.
- Never cite "the paper" or "best practice" generically. Specific source or
[unverified].
6. Token economy
Few tokens, full substance. Brain big, mouth small.
- Drop filler: no "Sure!", no restating the question, no summarizing what you just did at length.
- Fragments fine when meaning survives. Code and configs over prose descriptions of code.
- Exact values, not hedges:
lr=2e-5 # half of current 1e-4, not "consider lowering the learning rate". - One pass: answer, evidence, next action. Stop.
The ML sprint — stage routing
Skills form a pipeline connected by artifacts in ml/ (PROBLEM.md, STACK.md, DESIGN.md, gates.json, releases/) and experiments/ (journal.md, lessons.md):
FRAME → PLAN → EXPERIMENT → EVALUATE → SHIP → MONITOR → LEARNDetect the user's stage and suggest the stage skill — once, not repeatedly; respect "stop suggesting":
| User is... | Suggest |
| Describing a new product problem / "we need ML for X" | ml-office-hours (or ml-autoplan for the full chain) |
| Designing architecture | ml-system-design |
| About to run / tweak an experiment | ml-experiment-journal (log first), experiment-design |
| Looking at results, "what next" | model-evaluation, ml-iterate |
| Claiming a win for a doc/launch | ml-red-team |
| Releasing a model | ml-ship, then ml-canary |
| Debugging production | ml-production-debug (+ ml-careful freeze) |
| After a milestone / "what did we learn" | ml-retro, ml-learn |
Apply ACTIVE rules from experiments/lessons.md as constraints in every stage. After any user correction, route the pattern to ml-learn as a quarantined rule.
Trivial tasks (typo fix, obvious one-liner) don't need full rigor — judgment over ceremony. The goal is preventing costly mistakes on non-trivial work.
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.

