| name | commit |
| description | Stage the intended changes only, derive a scoped conventional-commit message, branch first if on main, run the staged lint check, and commit. Use when the user asks to commit work. |
/commit
Commit the current work cleanly.
- Inspect —
git status and git diff (and git diff --staged). Identify only the changes
that belong to this unit of work. Do not blindly git add -A unrelated files.
- Branch if on
main — git branch --show-current. If it's main, create a topic branch first
(git switch -c <type>/<short-slug>); never commit straight to main.
- Stage the intended files explicitly (
git add <paths>).
- Lint staged —
pnpm lint:staged. Fix anything it flags before committing.
- Message — conventional commit, scoped:
type(scope): summary where type ∈
feat|fix|refactor|test|ci|docs|style|chore|perf|build. Keep the subject imperative and concise.
- Commit — do not add tool-specific co-author trailers unless explicitly requested.
(The git-guard hook warns on non-conventional messages.)
- Report the branch + short SHA. Don't push unless asked.