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 agentmods add skills/rchaz/tunelab/tune-loopnpx skills add rchaz/tunelab --skill tune-loopgit clone --depth 1 https://github.com/rchaz/tunelabWrote 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/rchaz/tunelab/tune-loop)<a href="https://agentmods.dev/skills/rchaz/tunelab/tune-loop"><img src="https://agentmods.dev/badge/skills/rchaz/tunelab/tune-loop.svg" alt="Measured on agentmods" 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 | $0.00151 | $0.01731 |
| Opus 5 | $0.00076 | $0.00865 |
| Sonnet 5 | $0.00030 | $0.00346 |
| Haiku 4.5 | $0.00015 | $0.00173 |
Grade A, and why
tune-loop 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 4d 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.
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.
How it starts
The opening of the file, as written. The whole thing — 113 lines — stays where its author put it; the contents beside it link to each section on GitHub.
tune-loop — the self-improving system
The other four skills build one model. tune-loop closes the loop: serve → log → collect feedback → curate → experiment across architectures × methods → promote only what measurably beats the champion → repeat. The "AI system" stops being a model and becomes the loop; what sits inside (a single model, a cascade, an agent, a deterministic workflow) is just the current champion, which the loop is free to replace when evidence says so.
This is champion/challenger from classical MLOps, generalized to compound-AI architecture search, driven by a Monitor–Analyze–Plan–Execute (MAPE) control loop. It deliberately reverses tunelab's v1 "no autonomous hill-climbing" non-goal — and the disciplines below are what make the reversal teaching-grade rather than AutoML slop.
Step 0 — read the system state before anything
On invocation, read the project's system/ dir:
descriptor.json— the current champion architecture (see schema below).predictions.jsonl— the append-only flywheel log (tune-data'sflywheel.pyschema).EXPERIMENT-LOG.md+rounds/*/— prior rounds, promotions, and the eval slices each consumed. Never reuse a consumed slice.
The system descriptor (architectures as data)
A small versioned JSON makes architectures enumerable, comparable, reproducible:
{ "version": 3, "kind": "cascade",
"components": [
{"id": "t1", "model": "lr", "train": "embeddings+logreg", "calibrate": "isotonic"},
{"id": "t2", "model": "qwen3-4b", "train": "qlora-sft", "conf": "token-margin"},
{"id": "t3", "model": "frontier", "prompt": "knn-fewshot"}],
"routing": "t1 ->[cal_conf<0.43] t2 ->[cal_conf<0.60] t3",
"thresholds": {"t1": 0.43, "t2": 0.60} }
kind ∈ {single, cascade, workflow}. Examples: single: FT-SLM(qwen3-4b, sft) ·
workflow: injection-gate → router → {cheap, frontier}. The descriptor is the unit the loop
mutates and the eval adjudicates.
The MAPE round (the crank)
What ships with it
1 file 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.
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.
- 4d ago First seen · 113 lines · 151 tokens per session scan A 4b5ae69c4805
tune-loop is a skill published in the GitHub repository rchaz/tunelab (6 stars, last pushed 1mo ago), licensed MIT. It adds 151 tokens to every session and 1,731 once invoked, about $0.0008 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-08-31.
Other skills, from other repositories
implementing-llms-litgpt
Implements and trains LLMs using Lightning AI's LitGPT with 20+ pretrained architectures (Llama, Gemma, Phi, Qwen, Mistral). Use when need clean model implementations, educational understanding of architectures, or production fine-tuning with LoRA/QLoRA. Single-file implementations, no abstraction layers.
peft-fine-tuning
Parameter-efficient fine-tuning for LLMs using LoRA, QLoRA, and 25+ methods. Use when fine-tuning large models (7B-70B) with limited GPU memory, when you need to train <1% of parameters with minimal accuracy loss, or for multi-adapter serving. HuggingFace's official library integrated with transformers ecosystem.
axolotl
Expert guidance for fine-tuning LLMs with Axolotl - YAML configs, 100+ models, LoRA/QLoRA, DPO/KTO/ORPO/GRPO, multimodal support.
llama-factory
Expert guidance for fine-tuning LLMs with LLaMA-Factory - WebUI no-code, 100+ models, 2/3/4/5/6/8-bit QLoRA, multimodal support.
unsloth
Expert guidance for fast fine-tuning with Unsloth - 2-5x faster training, 50-80% less memory, LoRA/QLoRA optimization.
data-validation-first
Use this skill before any data analysis, transformation, or modeling. Always inspect and validate the data before drawing conclusions or writing transformations.