Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add InferHaven/agent-skills --skill codetraingit clone --depth 1 https://github.com/InferHaven/agent-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/inferhaven/agent-skills/codetrain)<a href="https://agentmods.dev/skills/inferhaven/agent-skills/codetrain"><img src="https://agentmods.dev/badge/skills/inferhaven/agent-skills/codetrain/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/inferhaven/agent-skills/codetrain"><img src="https://agentmods.dev/badge/skills/inferhaven/agent-skills/codetrain.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00121 | $0.05490 |
| Opus 5.5 | $0.00048 | $0.02196 |
| Sonnet 5.5 | $0.00024 | $0.01098 |
| Haiku 4.5 | $0.00012 | $0.00549 |
Grade E, and why
codetrain scanned grade E with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Tells the agent never to refusehighAnti-refusal
Suppressing the ability to decline removes a core safety control; a later harmful request then succeeds.
stop (the UI shows "say 'arm it' to resume"). **Submit anytime — green OR red;** never refuse Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
work**. Sandbox dir: leave it, or `rm -rf` only if asked. How it starts
The opening of the file, as written. The whole thing — 328 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CodeTrain
Overview
Turn-by-turn Socratic coding trainer with a beautiful local web UI. The browser is the pretty face; you are the brain. You set tiny steps and review the user's own code — you do not write their solution for them.
Core principle: the user types the code, every time. You ask, nudge, review, and explain. One small step per turn.
When to use
Triggers: "teach me this code", "walk me through this", "hold my hand", "explain step by step", "tutor me", "guide me", "I want to understand X", "give me a practice exercise", "let me learn by doing", "review my weak spots", "drill me", "spaced review", "what should I revisit", "teach me this diff/PR", "walk me through these changes".
Not for: "just fix it", "write this for me", "do the task" — those want a result, not a lesson. If unsure, ask: "Want me to do it, or teach you to?"
Architecture — this file is self-sufficient
A Python-stdlib server serves the web UI and one JSON file (session.json); the browser
polls it and renders. You change it each turn with tiny patches. The server never
runs user code. Everything you need for a normal session is in THIS file — do
NOT read references/session-protocol.md unless you hit a genuine edge case (an
unusual field, debugging the server). Reading it every session wastes ~4k tokens.
Paths are relative to $SKILL_DIR (shown when the skill loads; never hardcode /root/…).
Requires python3. Prompt-free via app/install-permissions.py (a scoped, auditable
allow-list the user runs once). Other references, loaded only when relevant:
spaced-repetition.md (review/drill), teach-on-diff.md (PR/diff lessons).
Memory & progress (private by default)
CodeTrain remembers the learner across sessions in $HOME/.codetrain/ (profile.json and
one history/<date>-<slug>.md per finished lesson). Never Read, Write or Edit those files
yourself: whatever you read goes to your model provider, so you work from a short brief and
the files stay on the learner's machine.
What ships with it
40 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- app/answer_guard.py 7.8 KB runs code
- app/checkpoint-hook.sh 1.2 KB runs code
- app/ctl.sh 4.5 KB runs code
- app/install-permissions.py 6.8 KB runs code
- app/patch.py 4.1 KB runs code
- app/profile.py 9.3 KB runs code
- app/server.py 23 KB runs code
- app/static/app.js 53 KB runs code
- app/static/docklint.js 4.3 KB runs code
- app/static/editor.js 4.4 KB runs code
- app/static/f-fraunces-400.woff2 66 KB
- app/static/f-fraunces-500i.woff2 41 KB
- app/static/f-fraunces-600.woff2 66 KB
- app/static/f-fraunces-900.woff2 66 KB
- app/static/f-hanken-400.woff2 34 KB
- app/static/f-hanken-500.woff2 34 KB
- app/static/f-hanken-600.woff2 34 KB
- app/static/f-hanken-700.woff2 34 KB
- app/static/f-jbmono-400.woff2 31 KB
- app/static/f-jbmono-500.woff2 31 KB
- app/static/fonts-OFL.txt 13 KB
- app/static/fonts.css 3.5 KB
- app/static/glossary.js 51 KB runs code
- app/static/index.html 6.0 KB
- app/static/js-worker.js 3.9 KB runs code
- app/static/logo-anim.svg 1.9 KB
- app/static/prism.js 21 KB runs code
- app/static/prose.js 19 KB runs code
- app/static/pyodide-worker.js 7.0 KB runs code
- app/static/runner.js 4.5 KB runs code
- app/static/styles.css 46 KB
- app/static/visuals.js 15 KB runs code
- app/watch.sh 2.5 KB runs code
- install.sh 2.0 KB runs code
- LICENSE 11 KB
- NOTICE 768 B
- README.md 23 KB
- references/session-protocol.md 20 KB
- references/spaced-repetition.md 3.4 KB
- references/teach-on-diff.md 2.5 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 11d ago Changed · +24 lines 224e9ed8c3a4
- 16d ago Changed · +27 lines · +43 tokens per session a1703ed09ee6
- 23d ago Changed · +5 lines 2b3fda746a59
- 1mo ago First seen · 272 lines · 78 tokens per session scan E bda61443670f
codetrain is a skill published in the GitHub repository InferHaven/agent-skills (3 stars, last pushed 9d ago), licensed Apache-2.0. It adds 121 tokens to every session and 5,490 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it E with 2 findings (tells the agent never to refuse, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
algo-sensei
Your personal DSA & LeetCode mentor. Use for problem explanations, progressive hints, code reviews, mock interviews, pattern recognition, complexity analysis, and custom problem generation. Automatically adapts to your learning style and request type.
study-teach
Personalized lecture & explanation sub-skill for a Chinese graduate-exam learner who values step-by-step reasoning, intuitive/visual understanding, strict condition checking, error diagnosis, and exam-oriented transfer. Orchestrated by study-assistant but also usable standalone. Use when the learner wants a…
study-assistant
An exam-preparation tutor that guides learners through study material step by step, in Simplified Chinese. It can organize chapters, teach individual topics, create quizzes, and check understanding.
study-quiz
A quiz and grading workflow for learners who provide exam questions, request a test, submit answers, or review mistakes. It creates question banks, quizzes, grading reports, and a record of recurring errors.
study-feynman
A study helper that checks whether a learner can explain a subject clearly using the Feynman technique. The technique tests understanding by asking someone to explain an idea in simple words to a beginner.
study-mindmap
A tool that turns a study knowledge file into an interactive HTML mind map, a visual tree of related ideas. It works offline in a browser and shows learning status for each point.