| name | commit |
| description | Create a git commit after completing a task. Use this skill after finishing a logical unit of work to commit changes with a detailed conventional commit message. Always confirms with user before applying the commit. Never pushes to remote. |
Commit Skill
Create conventional commits after task completion with user confirmation.
When to Use
- After completing a task or logical unit of work
- When the user requests a commit
- After significant documentation updates
- After implementing a feature or fix
Procedure
Step 1: Gather Changes
git status
git diff --stat
Step 2: Analyze Changes
Identify:
- Files modified, added, or deleted
- Type of change (feat, fix, docs, refactor, style, test, chore)
- Scope (which module/area affected)
- Breaking changes (if any)
Step 3: Draft Commit Message
Use conventional commits format:
<type>(<scope>): <short description>
<body with details>
<footer>
Types:
feat: New featurefix: Bug fixdocs: Documentation onlyrefactor: Code change that neither fixes a bug nor adds a featurestyle: Formatting, missing semicolons, etc.test: Adding or updating testschore: Maintenance tasks, dependencies
Example:
feat(auth): add password reset flow
- Add forgot password endpoint
- Implement email verification token
- Add password reset form component
Closes #123
Step 4: Show Diff and Confirm
Before committing, ALWAYS:
- Show the user what will be committed:
git diff --staged # or git diff if not staged
Show the proposed commit message
Ask: "Ready to commit these changes? (yes/no)"
Wait for explicit user approval
Step 5: Execute Commit (only after approval)
git add -A # or specific files
git commit -m "<message>"
Step 6: Verify
git log -1 --stat
Rules
- NEVER push — Only commit locally, never run
git push - ALWAYS confirm — Never commit without explicit user approval
- Show diff first — User must see changes before approving
- One logical unit — Each commit should represent one complete change
- Conventional format — Always use type(scope): description format
Output Format
## Proposed Commit
**Type:** feat
**Scope:** auth
**Files:**
- src/auth/reset.ts (new)
- src/components/ResetForm.tsx (new)
- src/api/routes.ts (modified)
**Message:**
feat(auth): add password reset flow
- Add forgot password endpoint
- Implement email verification token
- Add password reset form component
Closes #123
**Diff summary:**
3 files changed, 245 insertions(+)
---
Ready to commit these changes?