check-skill-version-bump fails a push when a skill directory changed against its merge-base with main (tests/ excluded) without a strictly higher metadata.version than main. New, renamed and deleted skills are exempt; every plugin is covered. Recorded as a dated section in ADR-0022 and documented in gates.md. Patch-bumps the 17 skills that changed on this branch without a bump, so the branch passes its own gate. Simplification audit finding 33. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1.8 KiB
1.8 KiB
name, description, allowed-tools, metadata
| name | description | allowed-tools | metadata | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| pc-author | Use when the user wants to create or edit `.pre-commit-config.yaml` — add, remove, or configure hooks — even when they name only the tool ("add shellcheck"). Not running, installing, or updating hooks -> `pc-run`. | Bash Read Write Edit |
|
Gotchas
revmust be an immutable tag or commit SHA, never a branch name. A branch looks like it works and then breakspre-commit autoupdatesilently.pre-commit validate-configchecks YAML structure only — it never confirms a hookidexists upstream, so a config it accepts can still fail on first use.
Route
| Condition | Flow | Read |
|---|---|---|
No .pre-commit-config.yaml in the repo |
Create | references/create-config.md |
.pre-commit-config.yaml exists |
Modify | references/modify-config.md |
Read only the file matching the resolved flow — each is self-contained.
The target is always .pre-commit-config.yaml, the config that consumes hooks. A request to publish hooks for other repos to consume means .pre-commit-hooks.yaml, a different file this skill does not author.
Gates common to both flows
- State the proposed config or edit in full and wait for confirmation before writing. Hook choices are opinions imposed on everyone else's commit loop, not defaults to assume.
- Run
pre-commit validate-configafter every write. On a non-zero exit, show the error and resolve it before reporting done — never leave a config that cannot be parsed. - Never edit a
revvalue. Report staleness and hand the bump topc-run, which runsautoupdateagainst the hook repos themselves.