agentleFS
saint0xsaint0x/my-skills/sft/SKILL.md

sft

Skill1 starsChanged 3 months agoMITView on GitHub

Use when designing, running, diagnosing, or selecting supervised fine-tuning rounds for coding-agent models. Especially useful for teaching output formats, action-chain imitation, strict tool JSON, project-building trajectories, checkpoint selection by generation quality, and stopping loss-only improvements that do not improve behavior.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when the model needs to learn the target behavior shape.

    line 8
  2. Distinctive:

    Use RL after SFT when the model can emit the right form but still ranks shortcuts too highly.

    line 25
  3. Distinctive:

    no prose before or after JSON

    line 45
  4. Distinctive:

    Run a zero-update generation baseline.

    line 59
  5. Distinctive:

    Stop if loss improves but exactness, F1, echo, JSON, or schema do not.

    line 63

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

SFT

Use this skill when the model needs to learn the target behavior shape.

Principle

SFT teaches form, rhythm, and contract. It is the right tool when the model cannot reliably emit the output surface needed by production.

Use SFT When

  • exact generation is weak
  • the model emits prose instead of action tokens
  • tool JSON is malformed
  • arguments are missing or wrong-shaped
  • prompt tails are echoed
  • new task families need exemplars
  • project trajectories are too generic
  • runtime contract changed and the model needs demonstrations

Use RL after SFT when the model can emit the right form but still ranks shortcuts too highly.

Data Requirements

SFT rows should be clean, deterministic, and contract-specific.

For action chains:

  • output only target action tokens
  • preserve order
  • stop cleanly
  • avoid extra prose
  • include diverse but equivalent wording

For tool JSON:

  • one object only
  • exact canonical tool name
  • complete argument object
  • strict schema
  • no prose before or after JSON

For project-building:

  • inspect first
  • choose bounded slice
  • implement/test/expose/verify
  • include user-visible proof
  • preserve safety boundaries

Training Workflow

  1. Build or select a focused corpus.
  2. Materialize and validate splits before GPU time.
  3. Run a zero-update generation baseline.
  4. Train with a small update budget first.
  5. Evaluate intermediate checkpoints.
  6. Select by generation metrics, not final loss.
  7. Stop if loss improves but exactness, F1, echo, JSON, or schema do not.
  8. Feed remaining preference failures into RL only after generation is viable.

Metrics

Track:

  • eval loss
  • token accuracy
  • token-F1
  • exact match
  • JSON validity
  • schema validity
  • argument match
  • prompt echo overlap
  • repeat collapse
  • project validity/score when relevant

Loss is diagnostic. Behavior is the decision surface.

Failure Modes

  • final checkpoint has lowest loss but worse generation
  • examples leak train wording into eval
  • target strings include echo-prone prompt labels
  • tool rows are valid JSON but wrong arguments
  • action chains learn separators or wrappers instead of clean tokens
  • model overfits solved fixtures and fails fresh OOD wording

Reporting

Report corpus, seed checkpoint, train/eval counts, update budget, baseline metrics, best checkpoint, final checkpoint, selected checkpoint rationale, and next failure class.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.