Two bundled fixes across the same nine skills, since both touch the same files. Issue #113: skill prose used rtk git and bare git inconsistently for the same operations, with no stated rule for which applied where. Executable instructed commands (a dispatch-table "Run" cell, a fenced code-block procedure, an imperative step) now consistently use rtk git; illustrative or referential mentions -- naming a flag's behavior, quoting a doc heading, warning against an anti-pattern -- stay bare git. Documented in the new plugins/git/README.md, scoped to this plugin only: gitea-* skills talk to the server over MCP tools and carry no git/rtk mentions at all. Also the git-plugin slice of #127: metadata.version added to the eight skills that lacked it. git-commits already had one and is untouched. Fixes: #113 Fixes: #127 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EeH8SCbcrCAQrtymkNuhKP
39 lines
1.8 KiB
Markdown
39 lines
1.8 KiB
Markdown
---
|
|
name: pc-author
|
|
description: >
|
|
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`.
|
|
allowed-tools: Bash Read Write Edit
|
|
metadata:
|
|
version: "1.0.0"
|
|
category: devtools
|
|
source_keys:
|
|
- context7-pre-commit-com
|
|
- pre-commit-com
|
|
- context7-pre-commit-hooks
|
|
- pre-commit-hooks-github
|
|
---
|
|
|
|
## Gotchas
|
|
|
|
- `rev` must be an immutable tag or commit SHA, never a branch name. A branch looks like it works and then breaks `pre-commit autoupdate` silently.
|
|
- `pre-commit validate-config` checks YAML structure only — it never confirms a hook `id` exists 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
|
|
|
|
1. 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.
|
|
2. Run `pre-commit validate-config` after every write. On a non-zero exit, show the error and resolve it before reporting done — never leave a config that cannot be parsed.
|
|
3. Never edit a `rev` value. Report staleness and hand the bump to `pc-run`, which runs `autoupdate` against the hook repos themselves.
|