teacher-trace-curation

teacher-trace-curation is a skill for Claude Code, Codex from isaacsight/kernel. It costs 36 tokens per session (653 once invoked), scanned A, original, MIT.

A weekly process for selecting useful interactions with an external AI model and using them as training examples for a local model. A local model runs on your own computer instead of sending every request to an online service.

In plain words
What is it for?
It helps review trace logs, build a cleaned training dataset, fine-tune a local model, and compare its answers with the external model's results.
Why use it?
It removes unsuccessful or corrected interactions from the training data so they do not teach the local model bad behavior. It also provides a repeatable curation and testing routine.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/isaacsight/kernel/teacher-trace-curation
Any agent
npx skills add isaacsight/kernel --skill teacher-trace-curation
Clone the repo
git clone --depth 1 https://github.com/isaacsight/kernel

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for teacher-trace-curation

README.md
[![agentmods](https://agentmods.dev/badge/skills/isaacsight/kernel/teacher-trace-curation.svg)](https://agentmods.dev/skills/isaacsight/kernel/teacher-trace-curation)
Your own site
<a href="https://agentmods.dev/skills/isaacsight/kernel/teacher-trace-curation"><img src="https://agentmods.dev/badge/skills/isaacsight/kernel/teacher-trace-curation.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 653 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00036 $0.00653
Opus 5 $0.00018 $0.00327
Sonnet 5 $0.00007 $0.00131
Haiku 4.5 $0.00004 $0.00065

Measured yesterday against content hash b21ea46259ff, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

teacher-trace-curation scanned grade A with 0 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 yesterday.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/kbot/skills/self-improvement/teacher-trace-curation/SKILL.md · 55 lines

How it starts

The opening of the file, as written. The whole thing — 55 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Teacher Trace Curation

Every time kbot calls Claude, the prompt + response is written to ~/.kbot/teacher/traces.jsonl. Left alone, this is just a log. Curated, it's the dataset that teaches the local model to answer your questions without touching the API.

Iron Law

ONLY SUCCESSFUL, CORRECTED, AND USER-APPROVED TRACES ENTER THE DATASET.

Failed traces teach the model to fail. Garbage in is not "more data."

The Weekly Ritual

  1. kbot train-self --mode default --max-examples 500 --iters 200 --num-layers 8 — curates + fine-tunes in one pass. The curator runs first, scores traces, and writes ~/.kbot/teacher/dataset-default.jsonl.
  2. Review the top 50 entries in the dataset file. Skim titles + first 200 chars.
  3. Remove anything you wouldn't want the local model to imitate:
    • Responses you corrected mid-session.
    • Hallucinated library names or APIs.
    • Advice you later decided was wrong.
  4. Re-run step 1 with the cleaned dataset if you made significant deletions.
  5. Test: ollama run kernel-self:<timestamp> on a task from the last week. Compare against the Claude baseline.

For longer cycles of evaluation + retraining, use kbot train-cycle which chains curate → train → evaluate → merge across multiple iterations.

The Quality Signal That Matters Most

Was this answer used without correction? The curator scores partly on: no correction in the next 5 turns, no follow-up question asking for clarification, no user rephrasing. Approved-by-silence is the strongest endorsement.

What You're Actually Building

A local model that answers "how do I deploy this?" using your deploy flow, not Anthropic's generic best practice. Your infrastructure, your naming, your conventions, your past decisions. That's what the local model becomes over weeks.

Anti-Pattern

Training on everything. Larger datasets with noisy data fine-tune worse models than small curated datasets. 200 excellent examples beat 2,000 mediocre ones every time.

Integration

Read the full file on GitHub · 55 lines

Changes

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.

  1. yesterday First seen · 55 lines · 36 tokens per session scan A b21ea46259ff

Subscribe to this mod's changes

teacher-trace-curation is a skill published in the GitHub repository isaacsight/kernel (16 stars, last pushed 6d ago), licensed MIT. It adds 36 tokens to every session and 653 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.