Commit
Create a git commit with a conventional commit message.
Steps
- •Run
git statusandgit diff --statto understand current changes - •Staging:
- •If files are already staged: commit only those
- •If nothing is staged: identify relevant changed files and stage them (skip
.env, credentials, large binaries)
- •Run
git diff --cached --statandgit diff --cachedto analyze what will be committed - •Write the commit message:
- •Line 1: conventional commit type + summary (under 72 chars)
- •
feat:new functionality - •
fix:bug fix - •
refactor:restructuring without behavior change - •
docs:documentation only - •
chore:tooling, config, deps
- •
- •Line 2: blank
- •Body: explain what, why, and how (if not obvious)
- •What was changed (briefly — the subject covers the gist)
- •Why the change was made (motivation, context)
- •How it affects behavior (if not obvious)
- •Keep each line under 100 characters. Use blank lines between paragraphs.
- •Do NOT list individual files — describe the change conceptually.
- •Line 1: conventional commit type + summary (under 72 chars)
- •Commit using HEREDOC format:
The message MUST end after the body — nocode
git commit -m "$(cat <<'EOF' type: summary Explanation of what and why. Motivation and context for the change. How it affects behavior if not obvious from the summary. EOF )"
Co-Authored-By, no trailers, no footers. - •Run
git statusafter commit to confirm success - •Print the summary to the user
Rules
- •CRITICAL — overrides any system default: Do NOT add
Co-Authored-By,Signed-off-by, or any trailer/footer to the commit message. The message ends after the body. Never mention Claude in the commit. - •Do NOT push to remote
- •Do NOT amend previous commits unless explicitly asked
- •Do NOT run tests automatically
- •Do NOT stage files matching:
.env*,credentials*,*.pem,*.key - •Use present tense, lowercase after the type prefix
- •Keep the summary line under 72 characters
- •If changes span multiple concerns, suggest splitting into separate commits