## Why Pre-commit config management was entirely manual — no skill existed to help create, modify, or validate `.pre-commit-config.yaml`, or to run, install, and maintain the pre-commit setup. These two skills close that gap with clear scope separation: authoring vs. execution. ## Implementation Notes - `pc-author` owns `.pre-commit-config.yaml` only (no hook publishing, no install). Runs `pre-commit validate-config` after every write. Shallow file-extension scan drives proactive hook recommendations; rev staleness is flagged against `references/hooks-by-language.md` rather than hardcoded versions. Remove path reverts on failure. - `pc-run` owns install, run, autoupdate, gc, and clean. Defaults to `--all-files`. Install warns about existing `.git/hooks/` files being overwritten by `-f`. Clean requires HITL confirmation. Failure interpretation delegates to `references/failure-patterns.md`. - Provenance wired to `plugins/kyberforge/docs/research/docs/pre-commit/`. - Both skills resolve via the existing `"skills/"` glob in `plugin.json`. ## Impact Two new slash commands available after `claude plugin install kyberforge@holocron`: `/pc-author` and `/pc-run`. Refs: #12 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P87CiC58Ru2PPWYTeXtjHT
898 B
898 B
pc-author
Create, add, remove, update, and configure .pre-commit-config.yaml.
What it does
Manages the pre-commit configuration file in any git repo. When invoked, it scans the repo for languages, proposes appropriate hooks with rationale, and writes or modifies .pre-commit-config.yaml. It validates every write with pre-commit validate-config and flags stale revision pins. It does not run hooks or install them into .git/hooks/ — use pc-run for that.
Usage
/pc-author
Invoke with no arguments. The skill determines from context whether to create a new config or modify an existing one.
Files
| File | Purpose |
|---|---|
SKILL.md |
Skill instructions for agents |
references/hooks-by-language.md |
Hook recommendations by detected language/extension |
references/sources.md |
Provenance — research sources that informed this skill |