agentleFS
plebpleb/graft/skills/tune/SKILL.md

tune

Skill9 starsChanged 16 days agoMITView on GitHub

Finds corrections you keep making to plan, orchestrate, execute and yolo runs and the agents they launch, and turns the ones you pick into mods in your Graft repo.

9 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use setup.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • VercelSkill

    setup

    Set up Vercel CLI and project configuration. Use when the user says "set up Vercel", "configure Vercel", "link to Vercel", or "vercel init".

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 3 are distinctive, and 7 are very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 7

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read ${CLAUDE_SKILL_DIR}/../common.md and follow its section ## Ask the user.

    line 11
  2. Very specific:

    If node is not found, or the command fails with tune needs Node 24 or later, ERR_UNKNOWN_FILE_EXTENSION or a SyntaxError, say tune needs …

    line 27
  3. Very specific:

    only apply to one repo (a project convention rather than Graft's process).

    line 44
  4. Distinctive:

    Recurrence: keep a correction only when the same correction appears in at least 2 different tasks from at least 2 sessions.

    line 50
  5. Very specific:

    Coverage: read the history of the target file and of skills/common.md.

    line 52
  6. Very specific:

    When the target is skills/common.md, also log 'skills/*/SKILL.md', where its rules lived before.

    line 58
  7. Distinctive:

    When the current text covers a finding and the covering text reached the clone after that time, drop the finding.

    line 62
  8. Distinctive:

    When the covering text was already there, keep the finding as a rule that is not holding (to strengthen or move).

    line 63
  9. Very specific:

    Leave the /reload-plugins request out of modify's ## Report.

    line 79
  10. Very specific:

    When a mod was made, ask the user to run /reload-plugins.

    line 87

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “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

You find the corrections the user keeps making to /graft:plan, /graft:orchestrate, /graft:execute and /graft:yolo runs, including the agents they launch, and turn the ones the user picks into mods in ~/.my-graft.

Read ${CLAUDE_SKILL_DIR}/../common.md and follow its section ## Ask the user.

Arguments: $ARGUMENTS

Start

The arguments are guidance and may set the window anywhere, such as 30 days or over the last month. A span the arguments exclude, such as ignore the last 2 days, is guidance, not the window. Ask when it is unclear. The default is 14 days.

Extract

Pull the candidates out of the user's sessions, with the window in days.

node ${CLAUDE_SKILL_DIR}/extract.ts --days <n>

If node is not found, or the command fails with tune needs Node 24 or later, ERR_UNKNOWN_FILE_EXTENSION or a SyntaxError, say tune needs Node 24 or later and stop. Show the user any other failure as it is.

The Wrote line names the candidates file. Every exit from here on removes its directory, with that path. When it exits 1, show the user its message.

node ${CLAUDE_SKILL_DIR}/extract.ts --clean <path>

Show the user the lines after Wrote, including any Warning: line (a likely transcript format change). With Runs: 0, stop.

Analyse

Send one graft:researcher the candidates file and the clone, with every path absolute (expand ~/.my-graft): the clone's current skills/common.md, skills/plan/SKILL.md, skills/orchestrate/SKILL.md, skills/execute/SKILL.md, skills/yolo/SKILL.md, skills/pr/SKILL.md, agents/*.md and, when they exist, MODS.md and INTERSTOCK-MODS.md. Its brief carries the user's guidance and these rules:

  • Guidance: apply the user's guidance first (for example, skip the runs it excludes).
  • Evidence: the candidates file is the only evidence. Do not open transcripts.
  • Corrections: a correction is a free-text answer or per-option note on a question, a typed or queued message, a rejected tool call, or an interrupt. Picking a listed option is a decision, not a correction. A correction counts only when it is about how a skill or agent worked, not about the task's content. Drop corrections that:
    • only apply to one repo (a project convention rather than Graft's process);
    • are about how a skill other than plan, orchestrate, execute, yolo or pr worked.
  • Tasks: a task is a repo plus its plan, from each run's planFiles.
    • Runs that share a plan file they write, edit or take as an argument (write, edit, multiedit, argument) are one task. So a plan run and the orchestrate run of the same plan are one task.
    • A run with none of those belongs to the task of the plan it reads, when it reads one. When it reads several or none, it is a task of its own.
    • A run with copyOf counts as the run it copies.
  • Recurrence: keep a correction only when the same correction appears in at least 2 different tasks from at least 2 sessions. Each kept correction is a finding.
  • Target file: pick it from each run's agent launches, the correction's time and its skill (the skill typed most recently, when not the run's own). The target is skills/common.md (rules plan, orchestrate and pr share), skills/plan/SKILL.md, skills/orchestrate/SKILL.md, skills/execute/SKILL.md, skills/yolo/SKILL.md, skills/pr/SKILL.md (the worker that raises a PR follows it) or an agents/*.md file. In an execute or yolo run, everything before the first question skills/orchestrate/SKILL.md asks or the first graft:worker launch, whichever comes first, is plan phase; a run with neither is all plan phase.
  • Coverage: read the history of the target file and of skills/common.md.

    git -C <clone> log --first-parent -p --format='%h %cI' -- <target file> skills/common.md

    When the target is skills/common.md, also log 'skills/*/SKILL.md', where its rules lived before.

    • Judge when the covering meaning first reached the clone, by meaning rather than exact wording.
    • Compare that time in UTC with the latest correction's skillTime, or the start of its run when it has none.
    • When the current text covers a finding and the covering text reached the clone after that time, drop the finding.
    • When the covering text was already there, keep the finding as a rule that is not holding (to strengthen or move).
    • A rule that is not holding although a mod already strengthened it (per the registries and the log) gets a different change (move it, or change how the step works), not more emphasis.
  • Report: for each finding, the rule in general terms, the target file, any existing line it strengthens or moves, the commit its coverage judgement rests on, and the runs it came from (date, repo, a short quote).

Pick

List the findings, numbered, each with its rule, target file and evidence. Ask which to make into mods: multi-select questions of 2 to 4 findings, the most recurring first, over as many calls as needed. Ask a lone finding as take or skip.

With no findings, say so, show the counts from Extract, and stop.

Modify

For each pick in turn, read ~/.my-graft/skills/modify/SKILL.md and follow it, targeting ~/.my-graft, with the finding's rule as its arguments and the evidence as context.

  • The mod's text, its registry row and its commit state the rule in general terms and name no repo, path or quote from the evidence. Every brief modify sends says so.
  • Leave the /reload-plugins request out of modify's ## Report.

Report

  • The counts from Extract.
  • The findings.
  • Each mod made, with its registry row and commit.
  • Picks not made, and why.
  • When a mod was made, ask the user to run /reload-plugins.

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.