Create a git commit by following these steps:
- •Run
git status(without -uall flag) andgit diffin parallel to see all changes - •Run
git log --oneline -5to match recent commit message style - •Analyze changes and draft a concise commit message (1-2 sentences) that focuses on the "why"
- •Stage relevant files by name (never use
git add -Aorgit add .) - •Create the commit with the generated message, ending with: Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com
- •Run
git statusafter commit to verify success
Rules:
- •Do NOT push to remote unless explicitly asked
- •Do NOT commit files that may contain secrets (.env, credentials, etc.)
- •If there are no changes to commit, inform the user
- •Use HEREDOC syntax for multi-line commit messages