| name | commit |
| description | Analyzes diffs, splits logical changes, creates conventional emoji commits aligned with HXSK atomic commit protocol |
| trigger | ์ปค๋ฐ ์์ฑ, git commit, ์ปค๋ฐ ๋ฉ์์ง ์์ฑ, ๋ณ๊ฒฝ์ฌํญ ์ปค๋ฐ, conventional commit |
Quick Reference
- Pre-commit:
shellcheck *.sh (์ ํ์ ), git diff --stat ํ์ธ
- Commit format:
<emoji> <type>(<scope>): <description>
- Types: feat, fix, docs, style, refactor, perf, test, chore, ci
- HXSK scope:
(phase-N.M) ํ์ โ ์: feat(phase-1.2): add login endpoint
- Split signals: ๋ค๋ฅธ ๋ชจ๋, ํผํฉ ์ ํ(feature+config), ๋
๋ฆฝ ๋ฒ๊ทธ ์์
HXSK Commit Skill
You create well-structured git commits following conventional commit format with emoji.
You analyze diffs to detect multiple logical changes and suggest splitting into separate commits.
This skill is the shipping mechanism for HXSK executor's atomic commit requirement.
Workflow
Step 1: Pre-Commit Checks
Run quality checks before committing:
Qlty ๊ฒฝ๋ก (.qlty/qlty.toml ์กด์ฌ ์):
qlty check
Shell ์คํฌ๋ฆฝํธ ๊ฒ์ฌ:
shellcheck *.sh
If checks fail, report failures and ask whether to:
- Fix issues first (recommended)
- Proceed anyway (
--no-verify flag)
Step 2: Analyze Staged Changes
git status
git diff --cached --stat
git diff --cached
If no files are staged, stage all modified files:
git add -A
Step 3: Detect Logical Splits
Analyze the diff for multiple distinct concerns:
Split signals:
- Changes to unrelated modules (e.g.,
src/auth/ + src/billing/)
- Mixed change types (feature code + test code + config)
- Different file categories (source vs docs vs config)
- Independent bug fixes bundled with features
If multiple concerns detected, suggest splitting:
Detected 3 logical changes:
1. feat: add user validation in src/auth/
2. test: add validation tests
3. chore: update pyproject.toml dependencies
Split into separate commits? [Y/n]
Step 4: Create Commit
Use conventional commit format with emoji:
git commit -m "$(cat <<'EOF'
<emoji> <type>(<scope>): <description>
<optional body>
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
Commit Types
| Emoji | Type | Description |
|---|
feat | New feature or capability | |
fix | Bug fix | |
docs | Documentation changes | |
style | Formatting, no logic change | |
refactor | Code restructuring | |
perf | Performance improvement | |
test | Adding or fixing tests | |
chore | Tooling, config, dependencies | |
ci | CI/CD changes | |
HXSK-Specific Scopes
When executing HXSK plans, use phase-plan scope:
feat(phase-1.2): implement login endpoint with JWT
fix(phase-2.1): resolve bcrypt comparison error
test(phase-1.3): add integration tests for auth flow
Commit Message Rules
- Imperative mood: "add feature" not "added feature"
- First line: max 72 characters (์ ๋ชฉ 50์ ์ด๋ด ๊ถ์ฅ)
- Scope: module or phase-plan reference
- Body: explain WHY, not WHAT (the diff shows WHAT). ๋ณธ๋ฌธ์ 72์ ์ค๋ฐ๊ฟ
- No period at the end of the subject line
- Issue linking: ์ด์๋ฅผ ๋ซ๋ ์ปค๋ฐ์๋
Resolved #N ํฌํจ
์์ธ ์ปจ๋ฒค์
: docs/CONVENTIONS.md ์น์
4 ์ฐธ์กฐ
Examples
Single Commit
feat(auth): add JWT-based login endpoint
Implements POST /api/auth/login with bcrypt password verification
and httpOnly cookie response. Uses jose library for Edge runtime
compatibility.
Split Commits (from single diff)
git add src/auth/
git commit -m "feat(auth): add JWT-based login endpoint"
git add tests/auth/
git commit -m "test(auth): add login endpoint integration tests"
git add pyproject.toml uv.lock
git commit -m "chore(deps): add jose and bcrypt dependencies"
๋ค์ดํฐ๋ธ ๋๊ตฌ ํ์ฉ
Diff ๋ถ์๊ณผ ์ปค๋ฐ ๋ถํ ์ git ๋ช
๋ น๊ณผ ๋ค์ดํฐ๋ธ ๋๊ตฌ๋ก ์ํ:
git diff --name-only HEAD~1
git diff --stat
git diff --name-only | xargs -I{} dirname {} | sort -u