Generates git commit messages following Conventional Commits 1.0.0 specification with semantic types (feat, fix, etc.), optional scope, and breaking change annotations. Use when committing code changes or creating commit messages. Triggers on phrases like 'commit', 'commit and push', 'make a commit', 'git commit', or when commit is part of a compound action (e.g., 'bump version and commit').
View on GitHubSelect agents to install to:
npx add-skill https://github.com/trancong12102/ccc/blob/main/core/skills/commit/SKILL.md -a claude-code --skill commitInstallation paths:
.claude/skills/commit/# Conventional Commit Generator Generate commit messages following [Conventional Commits 1.0.0](https://www.conventionalcommits.org/en/v1.0.0/). ## Workflow 1. Run `git status` and `git diff HEAD` to analyze changes 2. Stage files: user-specified only, or `git add -A` for all 3. Determine type and scope from changes 4. Generate commit message incorporating user hints 5. Commit using HEREDOC format to preserve formatting: ```bash git commit -m "$(cat <<'EOF' <type>(<scope>): <description> <body> <footer> EOF )" ``` 6. Output: `<hash> <subject>` ## Scope Boundaries **DO:** Analyze git changes, generate messages, stage files, commit **DO NOT:** Modify code, push (unless asked), create branches, amend without request ## Commit Format ```text <type>[optional scope][!]: <description> [optional body] [optional footer(s)] ``` ## Type Selection | Change | Type | SemVer | | --------------------------------------- | ---------- | ------ | | New feature | `feat` | MINOR | | Bug fix | `fix` | PATCH | | Performance improvement | `perf` | PATCH | | Code restructuring (no behavior change) | `refactor` | - | | Code style/formatting (no logic change) | `style` | - | | Adding/updating tests | `test` | - | | Documentation only | `docs` | - | | Build system/dependencies | `build` | - | | CI/CD configuration | `ci` | - | | Reverts a previous commit | `revert` | - | | Other maintenance tasks | `chore` | - | > **Note:** Only `feat` and `fix` have SemVer implications. Breaking changes (any type with exclamation mark or `BREAKING CHANGE` footer) trigger MAJOR. ## Subject Line - **Max length:** 72 characters (50 recommended for readability) - **Format:** `ty