commit
12
总安装量
6
周安装量
#26571
全站排名
安装命令
npx skills add https://github.com/sergio-bershadsky/ai --skill commit
Agent 安装分布
opencode
6
gemini-cli
6
antigravity
6
codex
6
kilo
5
claude-code
5
Skill 文档
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?