/buddy-agent-harness:repairfrom buddy-agent-harness
Repairs a repository's agent configuration when it is present but wrong or outdated — a retired harness name, a git-ignored bridge, an AGENTS.local.md nothing reads, a skill a harness refuses to load, a skills copy that drifted from .agents/skills or lost its copy protection, or an MCP server that differs between the golden set and a harness, on the side that is plainly ahead. Also for "sync the .claude/skills copy that drifted from .agents/skills". Runs doctor to find them, then offers each correction with its before and after and writes only what is approved.
Ships in buddy-agent-harness. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
init consolidates what a repository has. enhance proposes what it does not. doctor reports what is wrong. repair corrects it.
Each of the other three refuses this work deliberately. init has to run anywhere and invent nothing, so it never clobbers a file the user wrote. enhance only offers what is missing. doctor never writes, which is what makes it safe in a session-start hook. Configuration that is present but wrong falls between them.
doctor detects; this skill repairs. Detection has one home, so the two cannot drift and the finding set can grow without touching this file. Do not detect anything yourself — run the command and repair what it reports.
node <this skill's folder>/scripts/buddy-agent-harness.mjs doctor
<this skill's folder> is the directory that holds this SKILL.md. The script forwards every argument to the buddy-agent-harness CLI and runs against the current working directory.
The default output is TOON, which is what you parse. Each entry in findings carries problem (the finding's name), path (what it is about), cause (set only on an unloadable-skill finding), detail (what is wrong, in prose), and its own repair in command and instruction. help lists each distinct repair once, as a summary; read a finding's repair off its own row.
Route on problem, never on detail. The prose exists to be read by a person, and rewording it must not change what you do.
If findings reports zero problems, say so and stop. There is nothing to repair.
Route on problem. references/classes.md carries one section per fault this skill corrects, keyed by the problem name. A problem with a section there is yours; a problem without one is not. Nothing else decides it.
That rule holds for every finding doctor reports today and for the ones it reports next year. A fault this skill has no correction for is not one it can repair, so what classes.md covers and what this skill owns are the same fact — and a finding added tomorrow gets reported rather than improvised on.
Do not read ownership off a skill name in help. Many repairs name no skill — some are a shell invocation, some a git command, some a reconciliation by hand — and only the instruction, configuration, non-standard, and agent-worktree families, the drifted and unprotected skills copies, and four MCP problems, name one at all. An owner is not something the report can always be asked for.
problem up in references/classes.md, which carries the correction and the stopping point for each.doctor states for it, unchanged. Who to hand it to is read off that repair, and the question is whether it names init, or else enhance. Some name the /buddy-agent-harness:init-buddy-agent-harness (pnpm install: pnpm-buddy-agent-harness-init-buddy-agent-harness) skill and some name a buddy-agent-harness init command line; both mean the same thing — the finding is init's, because init is what writes a bridge and what consolidates an instruction file in the first place, and deciding what to preserve while it does is judgment this skill's corrections never carry. Hand it to the skill and never run the command yourself: rebuilding a projection can relocate skills a user wrote, and on the Windows case the naive repair is to recreate the link, the operation that already failed on that machine. A repair naming the /buddy-agent-harness:enhance (pnpm install: pnpm-buddy-agent-harness-enhance) skill and not init is enhance's: it offers guidance for AGENTS.md, which this skill never writes; hand it to that skill. A repair naming init in neither form and not enhance — a git invocation, a reconciliation by hand, an MCP finding with no section in classes.md — needs your decision: no skill owns it, and someone must judge it. Give it that outcome rather than inferring an owner.global-instructions-missing, global-instructions-unbridged, global-instructions-overridden, or global-instructions-emptied finding is about a harness's user-scope file not loading ~/.agents/AGENTS.md. Its repair is the exact line or symlink to add there, or the empty variable to unset, and it is the user's to make: give it the outcome for you to do outside the repo, with the step word for word, and write nothing outside the repository yourself, approved or not. It is not a "needs your decision" finding: the step is settled, only its place is out of reach.You correct what the tooling decides is wrong, never what the repository means.
references/agents-md.md draws the line: content that would stop being true if this tool's output were removed is non-material, and non-material content is all you may correct. A statement about how the repository is worked in is the user's, even when it is out of date — report it and offer no write.
The clearest case is unloadable-skill. A description broken by an unquoted colon is a quoting fault — correct it. A description that is missing cannot be written without asserting what a skill you did not author does, and that claim holds whether or not this tool ever ran. Report it and ask.
Show the file as it stands and as it would read. Not a summary — the actual before and after, so the user is reading the change rather than your description of it.
Where more than one correction is valid, present the options and ask which. Never pick for the user. unread-local-override is always this case, and its options come from references/classes.md — doctor names one repair per finding and has not read the file's contents.
Do not argue past one sentence. The diff is the argument.
Never read out a literal MCP credential. No offer, report, or other output repeats a credential's value or any part of it — not in a before-and-after, not in a row's detail, not to say what moved. Name the server and the field instead. Where projection refuses a golden server for a target, report the server, the target, and the reason the command gave, and offer no write of that server there.
Write only what was approved, preserving the rest of the file exactly. A hand edit the MCP commands returned as an edit row changes that one entry; every other byte of the file, comments included, stays as it was.
Then run doctor again. A correction can fail to hold — a second .gitignore rule matching the same path, a frontmatter fix that leaves another fault behind. Re-running is how you know, and it costs nothing. When a finding survives, say it is still open rather than reporting it landed.
Report every run, whichever way it went. One row per finding doctor reported, naming its path, what was wrong, and its outcome, one of these and told apart from the others:
init-buddy-agent-harness — its repair names init;enhance — its repair names enhance and not init;A run that finds nothing still reports. "Nothing found" without saying doctor ran clean is indistinguishable from not having looked.
doctor ran first, and every finding acted on came from its output; a clean run changed no file and said doctor found nothing.doctor ran again after the writes, and each finding it still reports is called still open.doctor owns detection. A check written here is a second home for it, and two homes drift.doctor's diagnosis and init's repair. Syncing a drifted skills copy and restoring a copy's protection rebuild nothing, and are yours.AGENTS.md is init's and has one home.doctor names.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub repobuddy/buddy-agent-harness --plugin buddy-agent-harness4 skills in this plugin
/doctor-buddy-agent-harnessChecks whether a repository's agent configuration bridges into .claude/skills and the other harness files still resolve — when a repository loads no project skills, when skills are missing after a clone, or when a harness appears to be ignoring AGENTS.md./enhanceAdds guidance missing from a repository's existing AGENTS.md, or refreshes a vetted section it carries in an outdated form — offering each one at a time and writing only what the user approves. Runs on its own or straight after init./init-buddy-agent-harnessInitializes, adopts, or migrates a repository's agent configuration to the open AGENTS.md and Agent Skills standards, so one canonical source works across Claude Code, Codex, Cursor, Copilot CLI, and other agent harnesses.