1.9 KiB
1.9 KiB
Create a git commit following the project's conventional commit message conventions.
Instructions
-
Check git status and staged changes:
- Run
git statusto see all untracked files - Run
git diff --cachedto see staged changes - Run
git diffto see unstaged changes
- Run
-
Stage relevant files:
- Add any untracked files that should be committed
- Stage any unstaged changes that should be included
-
Analyze changes and create commit message:
- Follow the conventional commit format from CLAUDE.md:
feat:(new feature for the user)fix:(bug fix for the user)docs:(changes to the documentation)style:(formatting, missing semi colons, etc)refactor:(refactoring production code)test:(adding missing tests, refactoring tests)chore:(updating grunt tasks etc; no production code change)
- Write a clear, concise commit message that describes the "why" not just the "what"
- Focus on the purpose and impact of the changes
- Follow the conventional commit format from CLAUDE.md:
-
Create the commit:
- Use the conventional commit format
- Do not add the Claude Code signature
-
Verify the commit:
- Run
git statusto confirm the commit succeeded - If pre-commit hooks modify files, amend the commit to include those changes
- Run
Message Format
The commit message should be passed via HEREDOC for proper formatting:
git commit -m "$(cat <<'EOF'
<type>: <description>
<optional body>
EOF
)"
Additional Context
Optional commit message details: $ARGUMENTS
Important: Never update git config, never use interactive flags like -i, and don't push unless explicitly requested.
If the changes are complex, pass enough information for a reviewer in the message body. Reference relevant design documents or documentation files, which can help a reviewing AI agent to build enough context for a successful review.