Overview
Smart Commit automates quality checks and creates well-crafted conventional commits. It runs lint, typecheck, and tests on affected files, scans for common issues, and drafts meaningful commit messages.Trigger
Use when:- Saying “commit”, “save changes”, or “ready to commit”
- After making changes and ready to persist
- Before pushing to remote
Workflow
Code Review Scan
Before committing, Smart Commit checks staged changes for:Debug Statements
Debug Statements
console.log/console.debug/console.warndebuggerstatementsprint()/println()in Python/Javafmt.Println()in Godbg!()in Rust
TODO Comments
TODO Comments
- TODO/FIXME/HACK comments without ticket references
- Example:
// TODO: fix this❌ - Example:
// TODO(#123): fix auth logic✅
Secrets & Keys
Secrets & Keys
- Hardcoded API keys or tokens
- Database credentials
- Private keys or certificates
- AWS/GCP/Azure credentials
Test-Only Code
Test-Only Code
it.only()/describe.only()fit()/fdescribe()in Jasminetest.only()in Jest- Leftover test fixtures in production code
Commit Message Format
Smart Commit uses conventional commit format:Types
| Type | When to Use | Example |
|---|---|---|
feat | New feature | feat(auth): add OAuth2 support |
fix | Bug fix | fix(api): handle null user response |
refactor | Code restructuring | refactor(db): extract query helpers |
test | Test changes | test(auth): add login edge cases |
docs | Documentation | docs(api): update endpoint examples |
chore | Maintenance | chore(deps): upgrade to Next.js 14 |
perf | Performance | perf(query): add index on user_id |
ci | CI/CD changes | ci(actions): add deploy workflow |
style | Formatting | style(lint): fix ESLint warnings |
Scope
Optional. Use the affected module or feature area:(auth),(api),(ui),(db),(payments)- If change affects entire project, omit scope:
feat: add health check endpoint
Summary
- Under 72 characters
- Lowercase, no period at end
- Imperative mood: “add” not “added” or “adds”
- Focus on what changed, not how
Body
Optional but recommended for non-trivial changes:- Explain why the change was needed
- Reference issue numbers:
Fixes #123orCloses #456 - Describe trade-offs or alternative approaches considered
Guardrails
Staging Rules
- Stage specific files by name. Never
git add -Aorgit add . - Verify each file is intentionally staged
- Exclude generated files, lock files, or unrelated changes
Message Rules
- Summary under 72 characters
- Body explains why, not what
- No generic messages: “fix bug”, “update code”, “changes”
- Reference issue numbers when applicable
Quality Gates
If quality gates fail:- Show the errors
- Ask if you should fix them or commit anyway
- Never proceed without acknowledgment
Output
Smart Commit provides:Examples
Example 1: Feature Commit
Example 2: Quality Gate Failure
Example 3: Issues Found
Integration with Pro Workflow
Smart Commit works seamlessly with other skills:Wrap-Up
Wrap-up calls Smart Commit as part of end-of-session ritual
Learn Rule
Capture lessons after committing (e.g., “Always test edge cases”)
Orchestrate
Multi-phase development ends with Smart Commit
Deslop
Run deslop before Smart Commit to clean up AI bloat
Configuration
Custom Quality Gates
Override default quality commands in your CLAUDE.md:Skip Specific Checks
Temporarily skip checks (not recommended):Best Practices
Commit Often
Commit Often
Small, focused commits are easier to review and revert. Aim for one logical change per commit.
Feature Branches
Feature Branches
Always work on feature branches, never directly on main/master.
Atomic Commits
Atomic Commits
Each commit should be self-contained:
- Builds successfully
- Tests pass
- Can be deployed independently (when possible)
Meaningful Messages
Meaningful Messages
Future you (and teammates) will thank you:
- Good:
fix(auth): prevent token refresh race condition - Bad:
fix bug
Troubleshooting
Quality Gates Take Too Long
Lint Errors on Generated Code
Exclude generated files in.gitignore and lint config:
Commit Message Too Long
Move details to the body:Next Steps
Learn Wrap-Up Ritual
End sessions properly with learning capture
Try Deslop
Clean up AI-generated code bloat before committing
Master Orchestrate
Build features through structured phases
View All Skills
Explore the complete skill system