claude-world/director-mode-lite / skills/smart-commit
smart-commit
UnverifiedCreate clean Conventional Commits: inspect the diff, group related changes, run quality checks, and write type(scope) messages. Use when committing work, or when the user runs /smart-commit or asks to commit changes.
Smart Commit
Create a high-quality commit for current changes.
Execution
- Inventory changes: run
git statusandgit diff(plusgit diff --stagedfor already-staged work) to see everything that changed. - Group related changes into logical commits — list the files that belong to each group so one commit maps to one concern.
- Run available quality gates (test suite, linter, formatter) if the project configures them, and fix failures before committing.
- Stage each group in turn with
git add <files>. - Craft a Conventional Commits message —
type(scope): description, with a body that explains why the change was made. - Commit the staged group.
- Confirm the result with
git log --oneline -n(choosento cover the commits you just made).
Repeat steps 4-6 for each group so unrelated changes land in separate commits. The format and type reference below is your guide for steps 5-6.
Pre-Commit Checklist
Scope Check
- Solves one problem only
- No unrelated changes
- No debug code
- No temporary files
Quality Check
- All tests pass
- Code is formatted
- No linting errors
- Documentation updated
Commit Message Format
<type>(<scope>): <description>
<body>
<footer>
Type (Required)
| Type | Use When |
|---|---|
feat | New feature (user-visible) |
fix | Bug fix |
docs | Documentation only |
test | Adding/updating tests |
refactor | Code restructure (no behavior change) |
style | Formatting (no logic change) |
chore | Maintenance, dependencies |
perf | Performance improvement |
Scope (Optional)
Module, component, or file affected:
feat(auth): add login endpointfix(api): handle null responsedocs(readme): update installation steps
Description (Required)
- 50 characters or less
- Present tense, imperative mood
- Lowercase first letter
- No period at end
- Describe WHAT, not HOW
Examples
Feature
feat(user): add email verification
Implement email verification flow for new user registration.
Users must verify email before accessing protected features.
Closes #42
Bug Fix
fix(api): handle null response in user endpoint
Previously threw uncaught exception when user not found.
Now returns 404 with proper error message.
Fixes #67
Commit Checklist
Before committing:
- Follows Conventional Commits format
- Subject clearly describes the change
- One commit = one logical change
- No sensitive information (.env, credentials)
- All tests pass
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |