train-recipe
Stage-by-stage, gate-verified process for training, debugging and improving deep learning and tabular ML models, based on Karpathy's recipe, with an experiment log
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Badge for your README
Markdown
[](/listings/misobalogh--train-recipe)HTML
<a href="/listings/misobalogh--train-recipe"><img src="/api/listings/misobalogh--train-recipe/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
The skill is a plain `SKILL.md` folder (`skills/train-recipe/`) in the open Agent Skills format, so any compatible agent can use it. Pick one of the options below.
Any agent: `npx skills`
The [skills CLI](https://github.com/vercel-labs/skills) detects your installed agents and copies the skill into the right folder:
npx skills add misobalogh/train-recipe # current project npx skills add misobalogh/train-recipe -g # all projects npx skills add misobalogh/train-recipe -a codex # one specific agent
Claude Code: plugin marketplace
The plugin is listed in the [misobalogh/claude-plugins](https://github.com/misobalogh/claude-plugins) marketplace and updates from there:
/plugin marketplace add misobalogh/claude-plugins /plugin install train-recipe@misobalogh
The shell equivalents are `claude plugin marketplace add ...` and `claude plugin install ...`. To invoke the skill explicitly, use `/train-recipe:train-recipe`.
Codex
Ask the built-in installer: `$skill-installer install the train-recipe skill from https://github.com/misobalogh/train-recipe`. Or use `npx skills` or copy the folder manually (see below). Restart Codex if the skill does not show up.
Manual copy
git clone https://github.com/misobalogh/train-recipe.git cp -r train-recipe/skills/train-recipe <skills-dir>/
| Agent | Project `<skills-dir>` | Global `<skills-dir>` | |-------|------------------------|-----------------------| | Claude Code | `.claude/skills/` | `~/.claude/skills/` | | Codex | `.agents/skills/` | `~/.agents/skills/` | | Cursor | `.agents/skills/` | `~/.cursor/skills/` | | Gemini CLI | `.agents/skills/` | `~/.gemini/skills/` | | GitHub Copilot | `.agents/skills/` | `~/.copilot/skills/` | | OpenCode | `.agents/skills/` | `~/.config/opencode/skills/` | | Windsurf | `.windsurf/skills/` | `~/.codeium/windsurf/skills/` |
Agents change these paths from time to time. If one does not pick the skill up, check its docs.
Agents without skill support
Copy the `skills/train-recipe/` folder into your project and add this line to your `AGENTS.md` (or the agent's rules file, e.g. `CLAUDE.md`, `GEMINI.md`, `.cursorrules`):
When training, debugging, tuning or auditing an ML/DL model, read and follow `skills/train-recipe/SKILL.md` and the reference file it points to.
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
.claude-plugin/plugin.json · Manifest · 13 lines
- {
- "name": "train-recipe",
- "description": "Stage-by-stage, gate-verified process for training, debugging and improving deep learning and tabular ML models, based on Karpathy's recipe, with an experiment log",
- "version": "0.2.0",
- "author": {
- "name": "Michal Balogh",
- "url": "https://github.com/misobalogh"
- },
- "homepage": "https://github.com/misobalogh/train-recipe",
- "repository": "https://github.com/misobalogh/train-recipe",
- "license": "MIT",
- "keywords": ["machine-learning", "deep-learning", "training", "debugging", "tabular", "karpathy"]
- }
README.md · README · 135 lines
- # train-recipe
- An agent skill for Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and any other
- agent that supports the open [Agent Skills](https://agentskills.io) format. It makes the agent train, debug and improve ML models the way
- Andrej Karpathy describes in
- [A Recipe for Training Neural Networks](https://karpathy.github.io/2019/04/25/recipe/) (2019),
- updated for current practice and extended to classic/tabular ML. Most ML skills are a collection of
- tips. This one **enforces the process**: the agent works through six stages in order, checks each
- stage's gate with a real measurement before moving on, goes back when an earlier gate was never
- verified (even if you asked about tuning), and keeps an experiment log (`RECIPE_LOG.md`) in your
- project with one line per experiment: hypothesis -> change -> result -> keep/revert.
- It is process-only: no scripts. Every check is described precisely enough (what to measure, expected
- value, what a failure means) for the agent to write it inside your codebase, in whatever framework
- you use.
- All credit for the original method goes to Andrej Karpathy. This skill paraphrases and extends his
- post; read the original.
- ## The stages
- 1. Become one with the data
- 2. End-to-end skeleton + dumb baselines
- 3. Overfit
- 4. Regularize
- 5. Tune
- 6. Squeeze out the juice
- ## What is modernized vs. the 2019 post
- - Pretrained weights (timm / Hugging Face / torchvision) as the default starting point.
- - AdamW, LR range test, warmup + cosine added later as a separate experiment.
- - Mixup / cutmix, label smoothing and EMA weights in the regularization ladder.
- - Silent bugs of current stacks: mixed precision / bf16, BatchNorm with tiny batches, GPU
- nondeterminism, `torch.compile`, gradient clipping.
- - Per-example gradient dependency test, also along the time axis for causal models.
- - Random or TPE search with multiple seeds; calibration, distillation and TTA at the end.
- - A full tabular / classic ML branch: leakage review, time and group splits, the
- constant -> linear -> GBDT baseline ladder, fold variance, and when a neural net is worth it.
- - An explicit experiment log and three working modes (new project, audit, triage).
- ## Install
- The skill is a plain `SKILL.md` folder (`skills/train-recipe/`) in the open Agent Skills
- format, so any compatible agent can use it. Pick one of the options below.
- ### Any agent: `npx skills`
- The [skills CLI](https://github.com/vercel-labs/skills) detects your installed agents and copies the
- skill into the right folder:
- ```bash
- npx skills add misobalogh/train-recipe # current project
- npx skills add misobalogh/train-recipe -g # all projects
- npx skills add misobalogh/train-recipe -a codex # one specific agent
- ```
- ### Claude Code: plugin marketplace
- The plugin is listed in the [misobalogh/claude-plugins](https://github.com/misobalogh/claude-plugins)
- marketplace and updates from there:
- ```
- /plugin marketplace add misobalogh/claude-plugins
- /plugin install train-recipe@misobalogh
- ```
- The shell equivalents are `claude plugin marketplace add ...` and `claude plugin install ...`.
- To invoke the skill explicitly, use `/train-recipe:train-recipe`.
- ### Codex
- Ask the built-in installer: `$skill-installer install the train-recipe skill from
- https://github.com/misobalogh/train-recipe`. Or use `npx skills` or copy the folder
- manually (see below). Restart Codex if the skill does not show up.
- ### Manual copy
- ```bash
- git clone https://github.com/misobalogh/train-recipe.git
- cp -r train-recipe/skills/train-recipe <skills-dir>/
- ```
- | Agent | Project `<skills-dir>` | Global `<skills-dir>` |
- |-------|------------------------|-----------------------|
- | Claude Code | `.claude/skills/` | `~/.claude/skills/` |
- | Codex | `.agents/skills/` | `~/.agents/skills/` |
- | Cursor | `.agents/skills/` | `~/.cursor/skills/` |
- | Gemini CLI | `.agents/skills/` | `~/.gemini/skills/` |
- | GitHub Copilot | `.agents/skills/` | `~/.copilot/skills/` |
- | OpenCode | `.agents/skills/` | `~/.config/opencode/skills/` |
- | Windsurf | `.windsurf/skills/` | `~/.codeium/windsurf/skills/` |
- Agents change these paths from time to time. If one does not pick the skill up, check its docs.
- ### Agents without skill support
- Copy the `skills/train-recipe/` folder into your project and add this line to your
- `AGENTS.md` (or the agent's rules file, e.g. `CLAUDE.md`, `GEMINI.md`, `.cursorrules`):
- ```markdown
- When training, debugging, tuning or auditing an ML/DL model, read and follow
- `skills/train-recipe/SKILL.md` and the reference file it points to.
- ```
- ## Example prompts
- New project:
- - "Set up training for an image classifier on the data in `data/`, follow the training recipe."
- - "I want to predict churn from `customers.parquet`. Start from scratch."
- Audit existing code:
- - "Audit my training code in `src/train.py` against the recipe and tell me which gates are missing."
- - "Review this LightGBM pipeline for leakage and missing baselines."
- "Model isn't learning" triage:
- - "My val loss has been stuck at 0.69 since epoch 1. What's wrong?"
- - "Loss goes to NaN after a few hundred steps with bf16."
- - "The model is 99% accurate on validation, that seems too good."
- ## Repository layout
- ```
- .claude-plugin/
- plugin.json # Claude Code plugin manifest (other agents ignore it)
- skills/train-recipe/ # the portable Agent Skills folder
- SKILL.md # shared backbone: rules, modes, stages, gates, common checks
- references/
- deep-learning.md # DL-specific checks per stage
- tabular-ml.md # tabular / classic ML checks per stage
- ```
- ## License
- [MIT](LICENSE), Copyright (c) 2026 Michal Balogh.
Version history
v0.2.011/19/2026
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.