name: commit description: "Stage intended changes and create one Conventional Commit." user-invocable: true argument-hint: "[optional commit message]"
Commit
Create one Conventional Commit for the intended current changes.
Workflow
- Inspect
git status,git diff, andgit diff --cached. - Read recent commit messages for scopes and local phrasing.
- If there is nothing worth committing, stop.
- Stage only intended files.
- Use the user's message if provided. Otherwise write a Conventional Commit message:
type(scope): subject. Imperative subject, 72 characters or fewer, no trailing period. - Create the commit and report the hash and message.
Rules
- Prefer staging specific files over broad adds.
- Do not commit
.env, credentials, or keys. - If the diff is not understood, stop.
- Prefer
feat,fix,refactor,test,docs, orchore. - The subject should say what changed. Add a body when the why, risk, or verification matters.
- Never bypass hooks with
--no-verify. If a hook fails, fix the cause or stop and report.