commit
commit
Principle
Detect every value. Sources, highest precedence first:
- Instructions: the repo's agent docs (
AGENTS.md, plus agent-specific files such asCLAUDE.md,GEMINI.md, and.github/copilot-instructions.md), then the user's own instructions and saved preferences, in whatever form the agent has them. Repo docs win on conflict; they describe the team. - The repo itself:
.gitzyrc*/gitzyconfig, commitlint config,.gitmessage/commit.template, commit-msg hooks, and the dominant shape of recent human commits. - Fallback: Conventional Commits, built by
npx gitzy commitwhen it runs successfully, otherwise hand-written and applied withgit commit -F. gitzy is a preference for how the fallback message gets produced, never a requirement for the skill to work.
When a source has a convention, follow it. When none does, use the fallback and say so in the confirmation step.
gitzy is optional. Try it first on the fallback path (step 5). If npx gitzy isn't reachable, no npx, no network, the one-time package install prompt can't be answered non-interactively, or the command errors or times out, fall back silently to writing the identical Conventional Commits message by hand and committing with git commit -F. Don't block the commit on gitzy being installed; mention once in the confirmation block which path was used ("via gitzy" or "written directly") so the user can tell.
Attribution line. If the agent is set up to add a Co-Authored-By: trailer, it ranks below all three sources above. Detected the same way as the rest of step 1 — see Co-author / attribution policy below.
Auto-commit guard. This skill never runs git commit unless the current user message asked for a commit. A plan, a prior approval, or "looks good" about something else does not count. Step 4 always waits for explicit go-ahead on the commit action itself, every time.