git-commit
Create well-formatted git commits with conventional commit messages and emoji codes. Use when the user asks to commit changes, create a commit, or run /commit. Supports --no-verify to skip pre-commit checks. Automatically stages files if nothing is staged, picks the right conventional commit type and emoji, and writes clean plain-text commit messages.
来源:SKILL.md
# git-commit ## Process 1. Run `git status` to check for staged changes 2. If nothing is staged, review unstaged changes and stage appropriate files 3. Unless `--no-verify` is passed, run pre-commit checks (lint, build, doc generation) 4. Analyze the diff to determine commit type and scope 5. Write a commit message: `<emoji-code> <type>(<scope>): <description>` 6. Add a body for complex changes explaining *why* 7. Execute the commit ## Commit Types | Emoji code | Type | When to use | | ---------------------- | ----------------- | -------------------------------------------------------- | | `:sparkles:` | `feat` | New feature | | `:bug:` | `fix` | Bug fix | | `:books:` | `docs` | Documentation only | | `:art:` | `style` | Formatting, whitespace — no logic change | | `:recycle:` | `refactor` | Code change that is neither fix nor feature | | `:zap:` | `perf` | Performance improvement | | `:rotating_light:` | `test` | Adding or correcting tests | | `:wrench:` | `chore` | Build process, tooling, auxiliary libraries | | `:rocket:` | `chore(release)` | Deployment or publishing | | `:link:` | `chore(deps)` | Add or remove dependencies | | `:package:` | `build` | Build system changes | | `:construction_worker:`| `ci` | CI configuration updates | | `:lock:` | `security` | Security fixes | | `:globe_with_meridians:`| `i18n` | Internationalization / localization | | `:boom:` | `breaking` | Breaking changes | | `:gear:` | `config` | Configuration file changes | | `:heavy_plus_sign:` | `add` | Adding something (files, resources) | | `:heavy_minus_sign:` | `remove` | Removing something | ## Rules - Use emoji *codes* (`:gear:`) not actual emoji characters (⚙️) - Plain text only — no ANSI color codes or escape sequences in commit messages - Do NOT add "🤖 Generated with Claude Code" or "Co-Authored-By" signatures - Write in imperative mood: "Add feature" not "Added feature" - Keep commits atomic; suggest splitting unrelated changes into separate commits - Explain *why* in the body, not just *what* - Reference issues/PRs when relevant