Two new skills for managing pre-commit in any repo. Both live in plugins/kyberforge/skills/. Provenance wires to plugins/kyberforge/docs/research/docs/pre-commit/.
On create or add: run shallow file extension scan (git ls-files) to detect languages, then recommend hooks from references/hooks-by-language.md (always consult the reference — not training-data revs). User confirms before any write.
On remove: show what will be removed (hook id + repo block if it becomes empty), wait for confirmation before writing.
Never recommend a hook that duplicates a linter/formatter already present in the config.
After every write: run pre-commit validate-config. Abort and show error if non-zero.
On removal: clean up empty repo blocks after the hook is removed.
Rev staleness: compare each rev in the user's config against references/hooks-by-language.md. Flag mismatches and direct user to pc-run autoupdate. Do not modify revs.
Top-level keys (fail_fast, default_stages, exclude, etc.): handle only on explicit request.
Out of scope:.pre-commit-hooks.yaml authoring, pre-commit install, running hooks.
pc-run
Owns installing, running, updating, and maintaining the pre-commit setup.
Routing by intent:
run / check / verify → pre-commit run --all-files (default)
staged / simulate → pre-commit run (staged files only)
install / set up → pre-commit install with explicit warning
Default is always --all-files; never silently staged-only.
On hook failure: identify hook + root cause + concrete next step. Do NOT auto-fix files. Do NOT edit .pre-commit-config.yaml.
On install: check ls .git/hooks/ first. If hook files exist, warn explicitly that pre-commit install will refuse unless -f is passed, which will overwrite existing hooks. Only run on explicit request.
On clean: explain full consequence (wipes ~/.cache/pre-commit, forces full re-download) and wait for explicit yes.
Out of scope:.pre-commit-config.yaml edits, hook authoring.
pc-author: remove hardcoded staleness version list; use reference-file comparison (SUGGESTION)
pc-author: make hooks-by-language.md lookup unconditional (SUGGESTION)
pc-author: add shallow scan to "add hook" path, not only "create from scratch" (GAP)
pc-run: fill in README.md (FAIL)
pc-run: fix README.md file table — remove phantom files, list real files (FAIL)
pc-run: fix install accuracy — pre-commit refuses without -f, does not migrate (FAIL)
pc-run: remove orphan sentence line 99 (SUGGESTION)
pc-run: add install-hooks and uninstall to route table (SUGGESTION)
pc-run: add fenced code block for pre-commit clean (SUGGESTION)
Both skills: provenance chain validates via validate-provenance.sh
Both skills resolving via plugins/kyberforge/plugin.json glob
Two new skills for managing pre-commit in any repo. Both live in `plugins/kyberforge/skills/`. Provenance wires to `plugins/kyberforge/docs/research/docs/pre-commit/`.
---
## `pc-author`
Owns `.pre-commit-config.yaml` authoring: create, add hooks, remove hooks, configure top-level keys.
**Routing:**
- No config at repo root → create from scratch
- Config exists → modify in place
**Key behaviours:**
- On create or add: run shallow file extension scan (`git ls-files`) to detect languages, then recommend hooks from `references/hooks-by-language.md` (always consult the reference — not training-data revs). User confirms before any write.
- On remove: show what will be removed (hook id + repo block if it becomes empty), wait for confirmation before writing.
- Never recommend a hook that duplicates a linter/formatter already present in the config.
- After every write: run `pre-commit validate-config`. Abort and show error if non-zero.
- On removal: clean up empty repo blocks after the hook is removed.
- Rev staleness: compare each `rev` in the user's config against `references/hooks-by-language.md`. Flag mismatches and direct user to `pc-run autoupdate`. Do not modify revs.
- Top-level keys (`fail_fast`, `default_stages`, `exclude`, etc.): handle only on explicit request.
**Out of scope:** `.pre-commit-hooks.yaml` authoring, `pre-commit install`, running hooks.
---
## `pc-run`
Owns installing, running, updating, and maintaining the pre-commit setup.
**Routing by intent:**
- run / check / verify → `pre-commit run --all-files` (default)
- staged / simulate → `pre-commit run` (staged files only)
- install / set up → `pre-commit install` with explicit warning
- pre-create environments → `pre-commit install-hooks`
- autoupdate / bump → `pre-commit autoupdate`
- gc → `pre-commit gc`
- clean / wipe cache → HITL confirmation required
- remove / uninstall → `pre-commit uninstall`
**Key behaviours:**
- Default is always `--all-files`; never silently staged-only.
- On hook failure: identify hook + root cause + concrete next step. Do NOT auto-fix files. Do NOT edit `.pre-commit-config.yaml`.
- On install: check `ls .git/hooks/` first. If hook files exist, warn explicitly that `pre-commit install` will refuse unless `-f` is passed, which will overwrite existing hooks. Only run on explicit request.
- On clean: explain full consequence (wipes `~/.cache/pre-commit`, forces full re-download) and wait for explicit yes.
**Out of scope:** `.pre-commit-config.yaml` edits, hook authoring.
---
## Checklist
- [x] `pc-author`: fix remove path confirmation gate (FAIL)
- [x] `pc-author`: remove hardcoded staleness version list; use reference-file comparison (SUGGESTION)
- [x] `pc-author`: make `hooks-by-language.md` lookup unconditional (SUGGESTION)
- [x] `pc-author`: add shallow scan to "add hook" path, not only "create from scratch" (GAP)
- [x] `pc-run`: fill in README.md (FAIL)
- [x] `pc-run`: fix README.md file table — remove phantom files, list real files (FAIL)
- [x] `pc-run`: fix install accuracy — pre-commit refuses without `-f`, does not migrate (FAIL)
- [x] `pc-run`: remove orphan sentence line 99 (SUGGESTION)
- [x] `pc-run`: add `install-hooks` and `uninstall` to route table (SUGGESTION)
- [x] `pc-run`: add fenced code block for `pre-commit clean` (SUGGESTION)
- [x] Both skills: provenance chain validates via `validate-provenance.sh`
- [x] Both skills resolving via `plugins/kyberforge/plugin.json` glob
Defame1297
was assigned by Claude2026-06-27 22:26:22 +00:00
Claude
added this to the Kyberforge basics milestone 2026-06-27 22:26:22 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Two new skills for managing pre-commit in any repo. Both live in
plugins/kyberforge/skills/. Provenance wires toplugins/kyberforge/docs/research/docs/pre-commit/.pc-authorOwns
.pre-commit-config.yamlauthoring: create, add hooks, remove hooks, configure top-level keys.Routing:
Key behaviours:
git ls-files) to detect languages, then recommend hooks fromreferences/hooks-by-language.md(always consult the reference — not training-data revs). User confirms before any write.pre-commit validate-config. Abort and show error if non-zero.revin the user's config againstreferences/hooks-by-language.md. Flag mismatches and direct user topc-run autoupdate. Do not modify revs.fail_fast,default_stages,exclude, etc.): handle only on explicit request.Out of scope:
.pre-commit-hooks.yamlauthoring,pre-commit install, running hooks.pc-runOwns installing, running, updating, and maintaining the pre-commit setup.
Routing by intent:
pre-commit run --all-files(default)pre-commit run(staged files only)pre-commit installwith explicit warningpre-commit install-hookspre-commit autoupdatepre-commit gcpre-commit uninstallKey behaviours:
--all-files; never silently staged-only..pre-commit-config.yaml.ls .git/hooks/first. If hook files exist, warn explicitly thatpre-commit installwill refuse unless-fis passed, which will overwrite existing hooks. Only run on explicit request.~/.cache/pre-commit, forces full re-download) and wait for explicit yes.Out of scope:
.pre-commit-config.yamledits, hook authoring.Checklist
pc-author: fix remove path confirmation gate (FAIL)pc-author: remove hardcoded staleness version list; use reference-file comparison (SUGGESTION)pc-author: makehooks-by-language.mdlookup unconditional (SUGGESTION)pc-author: add shallow scan to "add hook" path, not only "create from scratch" (GAP)pc-run: fill in README.md (FAIL)pc-run: fix README.md file table — remove phantom files, list real files (FAIL)pc-run: fix install accuracy — pre-commit refuses without-f, does not migrate (FAIL)pc-run: remove orphan sentence line 99 (SUGGESTION)pc-run: addinstall-hooksanduninstallto route table (SUGGESTION)pc-run: add fenced code block forpre-commit clean(SUGGESTION)validate-provenance.shplugins/kyberforge/plugin.jsonglob