tune-data

tune-data is a skill for Claude Code, Codex from rchaz/tunelab. It costs 108 tokens per session (4,426 once invoked), scanned A, original, MIT.

A workflow for turning logs, CSV files, or JSONL files into training data for adapting language models. Fine-tuning means training an existing model on examples so it performs a specific task better.

In plain words
What is it for?
Collecting data, labeling it with a language model, generating examples, removing duplicates, splitting data into training and test sets, validating files, and documenting the dataset.
Why use it?
It provides checks for common dataset problems such as duplicates, weak labels, poor splits, and invalid records before they affect model training.

Skill for Claude CodeCodex

Part of the tunelab plugin — 5 skills shipped together

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/rchaz/tunelab/tune-data
Any agent
npx skills add rchaz/tunelab --skill tune-data
Clone the repo
git clone --depth 1 https://github.com/rchaz/tunelab

Made for: Claude Code, Codex.

Or install tunelab, the plugin that ships this one along with the rest of its 5 skills.

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 tune-data

README.md
[![agentmods](https://agentmods.dev/badge/skills/rchaz/tunelab/tune-data.svg)](https://agentmods.dev/skills/rchaz/tunelab/tune-data)
Your own site
<a href="https://agentmods.dev/skills/rchaz/tunelab/tune-data"><img src="https://agentmods.dev/badge/skills/rchaz/tunelab/tune-data.svg" alt="Measured on agentmods" height="20"></a>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,426 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 $0.00108 $0.04426
Opus 5 $0.00054 $0.02213
Sonnet 5 $0.00022 $0.00885
Haiku 4.5 $0.00011 $0.00443

Measured 5d ago against content hash fe28bc5bbcd3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

tune-data 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 5d ago.

The scan reads SKILL.md. This mod also ships 6 executable files (scripts/chunk_text.py, scripts/dedupe.py, scripts/distill_generate.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/tune-data/SKILL.md · 197 lines

How it starts

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

tune-data — build the dataset

Data quality determines fine-tuning quality more than any hyperparameter. The pipeline: ingest → (distill) → dedupe → split → validate → datacard. Every step has a bundled script; chain them, don't skip the gates.

<skill-dir> below = the directory containing this SKILL.md. Stdlib scripts run with python3; distill_generate.py is PEP 723 (uv run). Run everything from the user's project workdir.

Before asking the user anything: read the project state

On invocation, check the workdir first — a fresh session (or one that just compacted) must resume mid-pipeline from disk alone:

  1. EXPERIMENT-LOG.md — tune-decide writes the interview summary and level decision here precisely so you never re-ask. Look for: task shape, data inventory, the chosen level, any frozen labeling prompt or dedupe threshold from a prior session.
  2. runs/*/state.json — if any run has status: running|interrupted, training is using data_dir right now (or will resume into it). Do not regenerate splits underneath it; ask before touching that directory.
  3. Partial pipeline artifacts — resume where disk says you are: a raw teacher-output file smaller than the input means resume labeling (the script skips done ids; session-native, count ids and continue); deduped.jsonl present means go to split; data/{train,valid,test}.jsonl present means re-run validate and go to the datacard.

If there is no level decision in EXPERIMENT-LOG.md, route to tune-decide before building anything — whatever the task shape. Classification smell (N fixed categories, labels already logged) is the most urgent case: a Level 1 embeddings+classifier may need no fine-tuning dataset at all, and proving that in 10 minutes beats preparing data for a LoRA the user doesn't need.

After every completed stage, append to EXPERIMENT-LOG.md (append-only, ## <date> — <event> with short Decision / Run (config) / Result / Predicted-vs-actual / Lesson lines as applicable). That log is what makes the dataset reproducible.

Read the full file on GitHub · 197 lines

Files

What ships with it

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

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. 5d ago First seen · 197 lines · 108 tokens per session scan A fe28bc5bbcd3

Subscribe to this mod's changes

tune-data is a skill published in the GitHub repository rchaz/tunelab (6 stars, last pushed 1mo ago), licensed MIT. It adds 108 tokens to every session and 4,426 once invoked, about $0.0005 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.

Related

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.

davila7/claude-code-templates · 77 tokens

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.

davila7/claude-code-templates · 51 tokens

tinker-fine-tuning

Provides guidance for fine-tuning LLMs using the Tinker cloud training API from Thinking Machines Lab. Use when running supervised fine-tuning, reinforcement learning (GRPO/PPO), or LoRA training on cloud GPUs via Tinker's managed infrastructure instead of local compute.

synthetic-sciences/openscience · 62 tokens

colab-finetuning

Fine-tune LLMs on Google Colab GPUs directly from openscience. Connects to Colab runtimes via WebSocket bridge for remote training with Unsloth. Supports SFT, GRPO, DPO, vision, and TTS workflows on free T4 to Pro A100 GPUs.

synthetic-sciences/openscience · 67 tokens

llm-integration

LLM integration patterns for function calling, streaming responses, local inference with Ollama, and fine-tuning customization. Use when implementing tool use, SSE streaming, local model deployment, LoRA/QLoRA fine-tuning, or multi-provider LLM APIs.

yonatangross/orchestkit · 58 tokens

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.

davila7/claude-code-templates · 82 tokens