prepare-commit
Prepare Commit
Preflight
Determine the language independently for each written sink — the commit message and, when applicable, a changelog entry — using this precedence order, subject to the host's higher-priority instructions:
- Applicable explicit user instruction, respecting its scope and duration. A request scoped to "this commit" does not change the project's default for future commits.
- Documented project convention, such as
CONTRIBUTING.mdor a style guide. Documentation takes precedence over conflicting artifact history. - Existing artifact for that sink: recent commit history (
git log --oneline -10) for the commit message; the rootCHANGELOG.mdfor a changelog entry. - Current conversation language.
- Fallback: English.
Resolve each sink separately; its language does not automatically carry over to the other sink. The message and changelog entry may use different languages when no higher-precedence instruction or convention unifies them. Keep subject, body, footer values, and changelog prose in their resolved language; preserve required machine-readable tokens such as BREAKING CHANGE and keep type tokens (feat, fix, etc.) in English as required by Conventional Commits.
Gates
The host agent's native protocols and current user instructions take precedence over this skill. Follow the host exactly for amend eligibility, failed or modifying hooks, push, permissions, allowed commands, and command execution. This skill narrows commit behavior; it never grants permission or overrides a more restrictive host protocol.
Flow steps describe portable operations. Whether the host allows a given operation is resolved at this seam, not re-derived in each step.