skills/ycs77/skills/commit-message

commit-message

SKILL.md

Git Commit Message Generator

Generate concise, descriptive Git commit messages in English.

Process

  1. Run git diff --cached (not git -C <path> diff --cached, not cd <path> && git diff --cached) to check for staged changes
  2. If staged changes exist: generate commit message based on staged changes only
  3. If no staged changes: run git diff (not git -C <path> diff, not cd <path> && git diff) and git status (not git -C <path> status, not cd <path> && git status) to view unstaged and untracked files
  4. For untracked files, intelligently assess which need content review (code/config files) vs which can be inferred from filename (assets, dependencies)
  5. Generate a single-line commit message (output ONLY the message, no follow-up questions)

Format

  • Imperative mood, under 72 characters
  • Types:
    • Add: New features or files
    • Update: Enhancements to existing features
    • Remove: Delete files or features
    • Rename: Rename files or variables
    • Fix: Bug fixes
    • Improve: General improvements
    • Optimize: Performance improvements
    • Refactor: Code restructuring without behavior change
    • Document: Documentation updates
    • Test: Add or update tests
    • Chore: Maintenance tasks (deps, config, CI)

Handling Complex Changes

When multiple types of changes exist in a single commit:

  • Choose the type that represents the primary intent of the change
  • Priority order (when uncertain): Add > Fix > Update > Refactor > Chore
  • If truly mixed and unrelated, suggest the user split into separate commits
  • Describe the most significant change; omit minor ancillary modifications

Examples

Add user authentication with JWT tokens
Update navbar to include search functionality
Remove deprecated API endpoints
Rename userService to UserAccountService
Fix null pointer exception in user service
Improve error handling in payment module
Optimize database queries for faster loading
Refactor user service to use repository pattern
Document API endpoints in README
Test payment processing edge cases
Chore: upgrade dependencies to latest versions
Add login page with validation and error handling
Fix authentication bug and update related tests
Weekly Installs
15
Repository
ycs77/skills
First Seen
Feb 1, 2026
Installed on
claude-code13
github-copilot12
gemini-cli11
opencode5
codebuddy5
codex5