Smart commit creation with conventional commits, emoji, and GPG signing. Use when user says "commit" or requests committing changes. Handles staged file detection, suggests splits for multi-concern changes, and applies proper commit format.
/plugin marketplace add pigfoot/claude-code-hubs/plugin install commit@pigfoot-marketplaceThis skill is limited to using the following tools:
Creates well-formatted commits following conventional commit standards with emoji prefixes.
/commit$GPG_PASSPHRASE set)<emoji> <type>: <description> format# Check GPG passphrase availability
if [ -n "$GPG_PASSPHRASE" ]; then
# Cache passphrase
gpg --batch --pinentry-mode loopback \
--passphrase-file <(echo "$GPG_PASSPHRASE") \
--clearsign >/dev/null 2>&1 <<< "test"
USE_GPG="yes"
else
USE_GPG="no"
fi
git status --short
# Prefer staged files if any exist
if ! git diff --staged --quiet; then
git diff --staged --stat # Staged changes
else
git diff HEAD --stat # All changes
fi
Suggest split if:
src/ + test/ + docs/Ask user:
Multiple concerns detected:
1. Auth changes (src/auth/*)
2. UI updates (src/components/*)
3. Docs (README.md)
Split into 3 commits?
- ⨠feat: add JWT authentication
- š style: update login UI
- š docs: update auth documentation
[split/all]
Format: <emoji> <type>: <description>
Rules:
git commit --signoff ${USE_GPG:+--gpg-sign} -m "<emoji> <type>: <description>"
If user requests --no-verify:
ā ļø Requested to skip pre-commit hooks.
Bypasses: linting, tests, formatting
Reason: [ask user]
Approve? [yes/no]
Only proceed if confirmed.
| Type | Emoji | Use Case |
|---|---|---|
| feat | ⨠| New feature |
| fix | š | Bug fix |
| docs | š | Documentation |
| style | š | Formatting, styling |
| refactor | ā»ļø | Code restructure |
| perf | ā” | Performance |
| test | ā | Tests |
| chore | š§ | Build/tools |
| ci | š | CI/CD |
| security | šļø | Security fix |
| build | šļø | Build system |
| revert | āŖļø | Revert changes |
| wip | š§ | Work in progress |
Extended emoji map: š move | ā add-dep | ā remove-dep | š± seed | š§āš» dx | š·ļø types | š business | šø ux | 𩹠minor-fix | š„ errors | š„ remove | šØ structure | šļø hotfix | š init | š release | š ci-fix | š pin-deps | š· ci-build | š analytics | āļø typos | š license | š„ breaking | š± assets | āæļø a11y | š” comments | šļø db | š logs | š remove-logs | š gitignore | šø snapshots | āļø experiment | š© flags | š« animations | ā°ļø dead-code | 𦺠validation | āļø offline
+ src/auth/login.ts (feat)
+ src/components/Button.css (style)
+ README.md (docs)
Split into: 3 separate commits
+ src/auth/login.ts
+ src/auth/middleware.ts
+ tests/auth.test.ts
One commit: ⨠feat: add authentication
+ Add export feature (feat)
+ Fix date bug (fix)
Split into: 2 commits by type
300+ lines: auth system
200+ lines: UI components
150+ lines: database
Split into: 3 commits by feature
CLAUDE.md references this skill: "Use /commit or say 'commit changes'"
Reference planning docs in commit body:
⨠feat: add user authentication
- JWT token validation
- Protected routes middleware
- Tests cover happy/error paths
Related to Stage 2 of PLAN.md (User Story 1.2)
Hooks run automatically unless --no-verify used (requires approval).
User: "commit these changes"
Process:
1. Check GPG ā
2. Analyze: src/auth/login.ts (modified)
3. Single concern ā
4. Create: ⨠feat: add login endpoint
5. Execute: git commit --signoff --gpg-sign -m "..."
User: "commit"
Process:
1. Detect: auth + UI + docs
2. Suggest split (3 commits)
3. User confirms "split"
4. Commit each separately with proper emoji/type
User: "/commit --no-verify"
Response:
"ā ļø Skip hooks? Bypasses linting/tests.
Reason: [wait]"
User: "hotfix for production"
Action: Proceed with --no-verify
echo $GPG_PASSPHRASE # Check set
gpg --clearsign <<< "test" # Test manually
# If fails: commit without --gpg-sign
Check output ā fix issue ā retry Critical case only: ask about --no-verify
git status
# No changes: inform user
# Unstaged only: "Stage files first?"
Keep this main file under 500 lines. For extensive reference:
emoji-reference.md (if needed)advanced-commits.md (if needed)Current approach: All essential info in this file for immediate use.