commit
1
总安装量
1
周安装量
#53564
全站排名
安装命令
npx skills add https://github.com/luisurrutia/skills --skill commit
Agent 安装分布
amp
1
opencode
1
kimi-cli
1
codex
1
claude-code
1
Skill 文档
Context
- Branch: !
git branch --show-current - Status: !
git status -s - Recent commits: !
git log --oneline -5 - Staged diff: !
git diff --staged -- . ':!*.svg' ':!*lock.json' ':!*lock.yaml' ':!*.lockb' ':!*.lock' ':!.opencode' ':!.claude' ':!.cursor' ':!*.png' ':!*.jpg' ':!*.jpeg' ':!*.gif' ':!*.ico' ':!*.webp' ':!*.avif' ':!*.bmp' ':!*.tiff' ':!*.psd' ':!*.ai' ':!*.eps' ':!*.raw' ':!*.woff' ':!*.woff2' ':!*.ttf' ':!*.eot' ':!*.otf' ':!*.mp3' ':!*.mp4' ':!*.wav' ':!*.ogg' ':!*.webm' ':!*.mov' ':!*.pdf' ':!*.doc' ':!*.docx' ':!*.xls' ':!*.xlsx' ':!*.ppt' ':!*.pptx' ':!*.zip' ':!*.tar.gz' ':!*.gz' ':!*.rar' ':!*.7z' ':!*.bin' ':!*.exe' ':!*.dll' ':!*.so' ':!*.dylib' ':!*.db' ':!*.sqlite' ':!*.sqlite3' ':!*.map' ':!*.js.map' ':!*.css.map' ':!*.min.js' ':!*.min.css' ':!*.bundle.js' ':!*.class' ':!*.jar' ':!*.war' ':!*.pyc' ':!*.pyo' ':!*.whl' ':!*.pem' ':!*.key' ':!*.crt' ':!*.p12' ':!*.parquet' ':!*.pickle' ':!*.npy' ':!*.sketch' ':!*.fig' ':!*.xd' - Staged files: !
git diff --staged --name-only
Steps
- Analyze â Review staged changes, unstaged modifications, and current branch
- Generate â Create commit message following conventional commits:
type(scope): message- Use context if provided:
context: $ARGUMENTS - Types:
feat,fix,docs,style,refactor,test,chore - Infer scope from staged files (e.g.,
feat(auth):for changes inauth/) - Match recent commits style when possible
- No co-authors
- Subject line: imperative mood, present tense, lowercase, no period
- Body:
- Explain why, not what â the diff already shows what changed
- Use imperative mood and present tense (e.g., “allow users to filter by date” not “allowed” or “allows”)
- Include motivation for the change
- Contrast with previous behavior when relevant
- Be specific about user-facing impact â avoid vague messages like “improved experience”; say exactly what changed
- Breaking changes: add ! before the colon in the type prefix (e.g.,
feat(api)!: remove v1 endpoints) or use aBREAKING CHANGE:footer â MUST be uppercase
- Use context if provided:
- Confirm â Ask ALL relevant questions at once:
- No staged files? â “Stage all changes?” / “Select files to stage?”
- Unstaged mods in staged files? â “Include unstaged changes?”
- On main/master? â “Create new branch?” with suggested name
- Show commit message â “Approve?” / “Edit message?”
- “Push after commit?” â Yes/No
- Execute â Apply user choices, commit, and push if requested
- Handle failures â If commit/push fails:
- Report the error clearly
- Never use
--no-verifyto bypass hooks - Suggest fixes (e.g., fix lint errors, resolve conflicts)
- Retry after user addresses the issue