commit-message

Generate concise Git commit messages in imperative mood. Analyzes staged changes first; if none, examines unstaged and untracked files. Use when the user asks to create, write, draft, make, or generate a commit message.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "commit-message" with this command: npx skills add ycs77/skills/ycs77-skills-commit-message

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

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

commit-message

No summary provided by upstream source.

Repository SourceNeeds Review
General

commit-message

No summary provided by upstream source.

Repository SourceNeeds Review
General

commit-message

No summary provided by upstream source.

Repository SourceNeeds Review