Commit
Use when changes are ready to commit - generates conventional commit messages with scope detection and validation.From its SKILL.md
npx -y skills add herbert-julio-azion/specialist-agent --skill commitAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 20 stars20 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
4.0 KB, as published. Nobody here has run it
/commit - Smart Commit
Generate and execute conventional commits with automatic scope detection and pre-commit validation.
Override: $ARGUMENTS
When to Use
- After completing a feature, fix, or refactor
- When you want a well-formatted conventional commit
- To validate changes before committing
- NOT for: empty working tree (nothing to commit)
Workflow
Step 1: Analyze Changes
git status --porcelain
git diff --stat
git diff --cached --stat
Determine:
- Which files changed
- Are changes staged or unstaged?
- How many files and lines affected
Step 2: Auto-Detect Type and Scope
Type detection from file patterns:
| Changed Files | Type |
|---|---|
src/components/*, src/pages/* | feat or fix |
tests/*, *.test.*, *.spec.* | test |
docs/*, *.md | docs |
.github/*, docker*, *.yml | ci or chore |
*.config.*, tsconfig*, package.json | chore |
| Rename/move only | refactor |
| Delete only | chore |
Scope detection from paths:
src/modules/auth/*-> scope:authsrc/components/Button/*-> scope:buttonsrc/services/*-> scope:services- Multiple directories -> no scope (too broad)
Type from diff content:
- New file created ->
feat - Existing file modified (bug context) ->
fix - Restructuring without behavior change ->
refactor - Performance improvement ->
perf
Step 3: Generate Commit Message
Format: type(scope): description
Rules:
- Type: lowercase (
feat,fix,refactor,test,docs,chore,perf,ci,style) - Scope: optional, lowercase, max 15 chars
- Description: imperative mood, lowercase start, no period, max 72 chars
- Body: optional, for complex changes - wrap at 72 chars
If $ARGUMENTS provided, use it as description override but still validate format.
Step 4: Pre-Commit Validation
# Check for secrets/sensitive files
git diff --cached --name-only | grep -E '\.(env|pem|key)$'
# Check for debug artifacts
git diff --cached | grep -E '(console\.log|debugger|TODO.*HACK)'
# Check for large files
git diff --cached --stat | awk '{print $NF}' | head -5
Warn if:
.envor credential files stagedconsole.log/debuggerstatements in diff- Files > 1MB staged
Step 5: Execute Commit
# Stage if not staged
git add [relevant files]
# Commit
git commit -m "type(scope): description"
If commit message needs body:
git commit -m "type(scope): description" -m "body with more details"
Output
──── /commit ────
Type: feat
Scope: auth
Message: feat(auth): add JWT refresh token rotation
Files: 4 changed (+120 / -15)
Warnings: none
✓ Committed: abc1234
Validation Warnings Output
──── /commit ────
⚠ WARNINGS:
- console.log found in src/service.ts:42
- .env.local is staged (contains secrets?)
Proceed anyway? Showing commit preview:
fix(api): handle timeout in payment service
Files: 2 changed (+8 / -3)
Anti-Rationalization
| Excuse | Reality |
|---|---|
| "I'll write a proper message later" | You won't. The context is fresh NOW. A bad commit message is permanent. |
| "It's just a small fix, message doesn't matter" | git log is the project's history book. Every entry matters. |
| "I'll squash before merging anyway" | Squash doesn't fix the habit. Good messages help during review too. |
| "Validation slows me down" | A leaked secret or committed console.log slows the whole team down. |
Rules
- Always validate before committing - Check for secrets and debug code
- Follow conventional commits - type(scope): description
- Imperative mood - "add feature" not "added feature"
- Never commit .env files - Block and warn
- Max 72 chars - Subject line must fit in git log
- One logical change per commit - Don't mix features