commit-msglisted
Install: claude install-skill hsinhan-h/hh-claude-skills
# Commit Message Generator
Generate a well-structured commit message based on the current staged changes.
## Step 1: Read the staged diff
```bash
git diff --staged
```
If there are no staged changes, tell the user and stop. Suggest they run `git add <files>` first.
Also check the language used in recent commits to decide whether the message should be in Traditional Chinese or English:
```bash
git log --oneline -5
```
Use Traditional Chinese if recent commits are in Chinese, otherwise use English.
## Step 2: Analyze the changes
Look at what files changed and what the diff shows. Ask yourself:
- What was the purpose of this change from a user's perspective?
- Does it add new capability, fix broken behavior, update structure, or something else?
## Step 3: Pick the commit type
Choose exactly one type based on the primary intent of the change:
| Type | When to use |
|------|-------------|
| `feat` | New feature for the user (not a build-script feature) |
| `fix` | Bug fix for the user (not a build-script fix) |
| `docs` | Documentation only — no code logic changed |
| `style` | Formatting, whitespace, semicolons — zero semantic change |
| `refactor` | Code restructured without fixing a bug or adding a feature |
| `chore` | Maintenance, dependency updates, config — no production code touched |
| `perf` | Performance improvement |
| `revert` | Reverts a previous commit |
| `test` | Adding or fixing tests — no production code change |
| `build` | Build system or external