Skip to content

commit

Create a well-formatted commit with auto-generated message based on staged changes.

/commit [optional message hint]
  • $ARGUMENTS: Optional hint for commit message focus (e.g., “auth”, “bugfix”, “refactor”)

Create a commit for staged changes with hint: $ARGUMENTS

  1. Check Status

    Terminal window
    git status
  2. View Staged Changes

    Terminal window
    git diff --staged
  3. Review Recent Commits

    Terminal window
    git log --oneline -5

Determine commit type:

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation
  • style: Formatting
  • refactor: Code restructuring
  • test: Adding tests
  • chore: Maintenance

Follow conventional commit format:

type(scope): subject
body (optional)
footer (optional)
Terminal window
git commit -m "$(cat <<'EOF'
type(scope): subject
- Change 1
- Change 2
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
  • Max 50 characters
  • Imperative mood (“Add” not “Added”)
  • No period at end
  • Capitalize first letter
  • Wrap at 72 characters
  • Explain what and why
  • Use bullet points for multiple changes
feat(auth): add password reset functionality
- Add reset token generation
- Implement email sending
- Add rate limiting for reset requests
Closes #123
fix(api): handle null user in profile endpoint
The profile endpoint crashed when accessing deleted users.
Added null check and proper 404 response.
Fixes #456
refactor(database): extract query builders
Split large database service into focused modules
for better maintainability and testing.
docs(readme): update installation instructions
- Add prerequisites section
- Update configuration examples
- Fix broken links
test(auth): add missing login tests
- Add test for invalid credentials
- Add test for locked account
- Add test for expired session
chore(deps): update dependencies
- Update React to 18.2
- Update TypeScript to 5.3
- Remove unused packages
## Commit Created
**Hash**: `abc1234`
**Branch**: `feature/auth-improvements`
### Message

feat(auth): add OAuth2 login support

  • Implement Google OAuth provider
  • Implement GitHub OAuth provider
  • Add session token generation
  • Update user model for OAuth data

Closes #789

### Files Changed
| Status | File |
|--------|------|
| M | src/auth/providers.ts |
| A | src/auth/oauth/google.ts |
| A | src/auth/oauth/github.ts |
| M | src/models/user.ts |
| A | tests/auth/oauth.test.ts |
### Stats
- 5 files changed
- 234 insertions(+)
- 12 deletions(-)
### Next Steps
```bash
# Push to remote
git push -u origin feature/auth-improvements
# Create PR
gh pr create
## Pre-Commit Checks
Before committing:
- [ ] No secrets in staged files
- [ ] No debug statements
- [ ] No TODO comments (unless intentional)
- [ ] Code is formatted
## Amending Commits
If pre-commit hooks modify files:
```bash
# Stage modified files and amend
git add -A
git commit --amend --no-edit

Modify behavior via CLAUDE.md:

  • Commit message format
  • Required sections
  • Issue reference format
  • Co-author settings

Always identify gaps and suggest next steps to users. In case there is no gaps anymore, then AI should clearly state that there is no gap left.