SKILL.md tells a dispatching agent to read the matching reference file "and no other". The retrofit moved the `pre-commit clean` confirmation gate out of the always-loaded body into references/clean.md, but references/failure-patterns.md — loaded by the diagnosis route, not the clean route — prescribes `pre-commit clean` with no gate at all. So "why is this hook failing" could wipe the machine-wide cache at ~/.cache/pre-commit for every repo without asking. The gate returns to the body, where every branch loads it, and is restated at the point of use in failure-patterns.md. It is its own section rather than a Gotchas bullet because folding it in pushed the Gotchas ratio to 41%, whose only suggested remedy is moving it back to references/ — the move that caused this. The fixer-hook rule had the same shape: reachable only behind "if the cause is not obvious from the output", which is false precisely when pre-commit prints `- files were modified by this hook`. The fix (`git add -u && git commit`) and the prohibition on `pre-commit install -f` are now unconditional, and the two weakened pointers that stranded them are restored. Found by an independent review of this branch. Refs #99
pc-run
Runs, installs, updates, and maintains pre-commit hooks in a local git clone.
What it does
pc-run handles everything that happens after .pre-commit-config.yaml exists: wiring hooks into git, running them, bumping their versions, and maintaining the cache. When hooks fail, it identifies the cause and suggests a concrete fix — it does not auto-fix files or edit the config. For creating or editing .pre-commit-config.yaml, use pc-author instead.
Before you start
pre-commitmust be installed and available onPATH- A
.pre-commit-config.yamlmust exist at the repo root (usepc-authorto create one)
Usage
Common invocations:
/pc-run— run all hooks against all files (default)/pc-run install— wire hooks into.git/hooks//pc-run autoupdate— bump allrevvalues to latest/pc-run clean— wipe the pre-commit cache (requires confirmation)
Files
| File | Purpose |
|---|---|
SKILL.md |
Skill instructions for agents |
references/install.md |
The install flow — loaded when the user asks to install or set up hooks |
references/autoupdate.md |
The autoupdate flow — loaded when the user asks to bump hook revs |
references/clean.md |
The clean flow — loaded when the user asks to wipe the cache or rebuild environments |
references/failure-patterns.md |
Hook failure causes and concrete fix suggestions — loaded when a hook fails or never fires |
references/sources.md |
Provenance: research sources that informed this skill |
references/README.md |
Directory index for references/ |