| name | commit-message |
| description | Write git commit messages following the project's chosen convention (Conventional Commits, Korean variant, Gitmoji, or custom). Reads style from `.claude/android-skills.json` and onboards the project once if the config is missing. Use when the user asks to commit, draft a commit message, fix up a commit, or after staging changes. Triggers include "commit message", "커밋 메시지", "커밋 메세지", "git commit", "커밋해줘", "커밋 작성". |
commit-message
Produces a git commit subject + body that conforms to the project's commit convention. Reads project preferences from a config file so the same skill works for every repo without baking choices into the skill.
Configuration
Source: .claude/android-skills.json at the git repo root (the directory containing .git, not the working directory).
{
"git": {
"commitStyle": "conventional-ko",
"commitPrefixes": ["feat", "fix", "refactor", "chore", "docs", "test", "perf", "build", "ci", "style"],
"subjectMaxLength": 50,
"bodyWrapLength": 72,
"issueTracker": "github",
"scopeRequired": false,
"language": "ko"
}
}
Field meanings:
| Field | Values | Notes |
|---|
commitStyle | conventional, conventional-ko, gitmoji, custom | Determines the subject format. |
commitPrefixes | string[] | Allowed type prefixes. Override per project. |
subjectMaxLength | int | Default 50. Hard limit, not a suggestion. |
bodyWrapLength | int | Default 72. Wrap body lines at this column. |
issueTracker | none, github, linear, jira | Affects the footer (Closes #123, Fixes ENG-45, …). |
scopeRequired | bool | If true, refuse to write a message without a scope. |
language | ko, en | Body language. Subject prefix follows commitStyle. |
Onboarding (run once)
If .claude/android-skills.json is missing or has no git.commitStyle:
- Ask the user these questions in order, one message:
- "커밋 스타일을 골라주세요:
conventional / conventional-ko / gitmoji / custom?"
- "issue tracker 쓰시나요?
none / github / linear / jira"
- "본문 언어 —
ko 또는 en?"
- Use defaults for everything else (
subjectMaxLength: 50, bodyWrapLength: 72, scopeRequired: false, prefix list based on style).
- Write the result to
.claude/android-skills.json at the repo root, merging with any existing config rather than overwriting. Create the file if needed.
- Mention to the user that the file is committable so the team shares the same convention.
- Continue with the commit message using the new config.
Do not re-ask on subsequent runs.
Commit styles
conventional
<type>(<scope>): <subject>
<body>
<footer>
type ∈ commitPrefixes.
scope is optional unless scopeRequired: true.
- Subject: imperative mood (
add, not added/adds), no trailing period, lowercase first letter after the prefix.
- Body: explain why, not what. The diff already shows what.
- Footer:
Closes #123 / Fixes ENG-45 based on issueTracker.
Example:
feat(auth): add biometric login fallback
The fingerprint sensor on Pixel 8 occasionally returns
TIMEOUT instead of FAIL, leaving the user stuck on the
auth screen. Fall back to PIN entry after 3 timeouts.
Closes #412
conventional-ko
Same structure as conventional, but the body is Korean. The subject prefix stays in English (feat, fix, …) because tooling parses it.
Example:
fix(network): Retrofit 401 응답 시 토큰 자동 갱신
interceptor가 만료된 토큰으로 한 번 더 시도해서 두 번
실패 처리되던 문제. authenticator로 옮겨 한 번만 갱신
시도 후 실패하도록 수정.
Closes #128
gitmoji
<emoji> <type>: <subject>
| Type | Emoji |
|---|
| feat | ✨ |
| fix | 🐛 |
| refactor | ♻️ |
| docs | 📝 |
| test | ✅ |
| perf | ⚡️ |
| chore | 🔧 |
| build | 📦 |
| ci | 👷 |
| style | 💄 |
Example:
✨ feat: add dynamic color support for Android 12+
Pulls system color palette via DynamicColors.applyToActivitiesIfAvailable
on app start. Falls back to brand seed color on < S.
custom
Use the commitPrefixes list as-is and follow the user's stated format. If the user has specific examples in .claude/commit-examples.md, read and mimic them.
Operating rules
- Never invent the issue number. Only include
Closes #N if the user mentioned it, the branch name encodes it (e.g., feature/123-…), or you can find it in git log for a related commit. If unsure, omit.
- Never run
git commit autonomously. Draft the message and let the user run the command. Exception: if the user explicitly says "commit it" — then stage if needed and commit.
- Never use
--no-verify unless the user explicitly says so.
- Subject length is a hard cap. If the change cannot be described in
subjectMaxLength, the change is too large — suggest splitting commits before drafting.
- Inspect the actual diff. Run
git diff --cached (or git diff if nothing staged) before writing. Don't write a message based on the user's verbal description alone — they may have missed something.
- One concern per commit. If
git diff --cached spans unrelated areas, point this out and offer to draft 2+ messages with git reset HEAD <path> instructions.
- No trailing Co-Authored-By unless the user asks. Many teams reject Claude attribution lines.
Workflow
- Run
git rev-parse --show-toplevel to find the repo root.
- Read
<root>/.claude/android-skills.json. If absent or missing git.commitStyle, run onboarding.
- Run
git status --short and git diff --cached (fall back to git diff if staging area is empty).
- If diff is empty → tell the user there's nothing to commit, stop.
- If diff spans unrelated concerns → propose a split, stop.
- Pick the type prefix from
commitPrefixes based on the diff:
- New user-visible behavior →
feat
- Bug fix →
fix
- Code rearrangement, no behavior change →
refactor
- Tests added/changed →
test
- Build/CI/tooling →
chore / build / ci
- Docs only →
docs
- Draft the message in the configured style and language. Wrap the body at
bodyWrapLength.
- Show the message to the user inside a fenced block — do not pipe directly into
git commit.
Anti-patterns
- ❌ "fix bugs" / "update code" / "wip" — non-informative subject
- ❌
feat: Added new feature. — past tense + period
- ❌ Subject + body that just paraphrase the diff — body should explain motivation
- ❌ Bundling refactor + feature in one commit
- ❌ Adding
Co-Authored-By: Claude without being asked
- ❌ Running
git commit -am to bypass the staging review