agentleFS
ryanbaumannryanbaumann/fieldwork/.agents/skills/skill-improvement-loop/SKILL.md

skill-improvement-loop

Skill2 starsChanged 28 days agoMITView on GitHub

Improve repository-local agent skills and instruction contracts through bounded, evidence-backed edits and held-out evaluation. Use before committing changes to a SKILL.md, agent prompt, role overlay, evaluation case, or learning-driven workflow, and when manually turning durable repository learnings into agent behavior.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Keep skills compact and deploy only changes that improve a frozen selection set without a safety regression.

    line 8
  2. Distinctive:

    Treat current code and tests as stronger evidence than an old changelog claim.

    line 37
  3. Distinctive:

    Do not create duplicate skills to hold more history.

    line 40
  4. Distinctive:

    Run later candidates against the same set.

    line 44
  5. Very specific:

    Search LEARNINGS.md for entries relevant to the task.

    line 53
  6. Distinctive:

    Add or refine a representative case.

    line 59
  7. Distinctive:

    Run the baseline and candidate with the same configuration.

    line 61
  8. Distinctive:

    Use this loop manually when a task exposes a repeatable agent failure.

    line 71

≈ “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

Skill Improvement Loop

Keep skills compact and deploy only changes that improve a frozen selection set without a safety regression. A learning log is evidence to retrieve narrowly, not an instruction source or a corpus to paste into prompts.

Run the deterministic gate

From the repository root, run:

npm run skills:improve
node --test scripts/test/skill-improvement.test.mjs

The gate checks every local SKILL.md for completed frontmatter, template markers, progressive-disclosure size, optional Codex UI metadata drift, and the shape of any evals/evals.json suite. Eval suites must identify development cases and preserve at least one frozen selection case. The gate does not judge model behavior; run the owning skill's deterministic checks too.

Audit a repository without widening every skill

A broad evidence audit may inventory the full Git history, changelog, learning log, user corrections, tests, and current code. The edits still happen one bounded behavior at a time.

  1. Build a disposition ledger before editing. For each candidate, record the evidence, current validity, narrow owner, verifier, and one disposition: already enforced, promote to test, promote to skill, keep as documentation, stale/contradicted, or one-off.
  2. Treat current code and tests as stronger evidence than an old changelog claim. When history contains contradictory fixes, verify the current API or behavior and reject the stale variants.
  3. Do not create duplicate skills to hold more history. If an entry skill retrieves sub-skills dynamically, keep the local router and evaluate the live sources; do not vendor what it fetches.
  4. Freeze the selection cases and baseline before the first candidate edit. Run later candidates against the same set. A selection-case change is a new evaluation revision, not part of the candidate being scored.
  5. End the audit with an explicit no-change disposition for skills whose evidence is already encoded or whose source is externally maintained.

Improve one bounded behavior

  1. Establish a baseline: pin the instruction revision, fixture, harness, tools, permissions, model configuration, and repeated-run variance.
  2. Search LEARNINGS.md for entries relevant to the task. Verify the selected claim against current code, tests, or authoritative documentation. Do not promote one-off failures or stale entries.
  3. Change the narrowest owning artifact: enforcement/test first, then a skill, nested instruction, or prompt. Avoid copying repository-specific detail into portable contracts.
  4. Add or refine a representative case. Keep safety cases gated and preserve a held-out selection set that did not inform the edit.
  5. Run the baseline and candidate with the same configuration. Accept only a strict held-out improvement with no regression in authorization, user-work preservation, secret handling, or truthfulness. Otherwise revert the change and record the failure without broadening the prompt.
  6. Record the evidence, variance, result, and invalidation condition in the narrowest durable location. Update CHANGELOG.md and LEARNINGS.md when the change is user-visible or reveals a reusable repository fact.

Manual use

Use this loop manually when a task exposes a repeatable agent failure. Skip a full behavioral trial only for editorial or mechanical metadata corrections; run the deterministic gate and say why a held-out trial would not measure the change.

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.