Files
holocron/plugins/git/.apm/skills/pc-author/references/create-config.md
Defame1297 2c6ce438b6 refactor(git): normalize rtk-prefix usage, add metadata.version
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
2026-09-07 20:36:49 +00:00

1.2 KiB

source_keys
source_keys
context7-pre-commit-com
pre-commit-com

Creating a .pre-commit-config.yaml

Reached from SKILL.md's Route table when the repo has no config yet. Self-contained — the modify flow's file is not needed here. SKILL.md's three common gates still apply.

Steps

  1. Detect what languages are actually in the repo with a shallow extension scan, rather than inferring them from the project's name or README:

    rtk git ls-files | grep -oE '\.[a-z]+$' | sort | uniq -c | sort -rn
    
  2. Read references/hooks-by-language.md and map the detected extensions to recommended hooks. Take the repo URL, rev and args from that file rather than from memory — a rev that does not exist is the most common way a fresh config fails on its first run.

    For a deliberately minimal starting point instead of a full recommendation set, pre-commit sample-config > .pre-commit-config.yaml prints a small starter config to build on.

  3. State the proposed config in full and wait for the user's confirmation.

  4. Write .pre-commit-config.yaml, then run pre-commit validate-config. If it exits non-zero, show the error, fix it in place, and re-validate.