commit
1
总安装量
1
周安装量
#43057
全站排名
安装命令
npx skills add https://github.com/kasperjunge/agent-resources --skill commit
Agent 安装分布
mcpjam
1
claude-code
1
windsurf
1
zencoder
1
crush
1
amp
1
Skill 文档
Commit
Commit workflow that ensures quality gates pass and changelog is updated before committing.
When to Use
- After
/code-reviewpasses with no critical issues - When asked to commit, save, or wrap up work
- Before creating a PR
Workflow
âââââââââââââââââââââââ
â 1. Run quality â
â checks â
â ty â ruff â pytest
âââââââââââ¬ââââââââââââ
â
â¼
âââââââââââââââ
â All pass? ââââNoâââ STOP. Fix issues first.
âââââââ¬ââââââââ
âYes
â¼
âââââââââââââââââââââââ
â 2. Update CHANGELOG â
âââââââââââ¬ââââââââââââ
â
â¼
âââââââââââââââââââââââ
â 3. Stage + Commit â
âââââââââââ¬ââââââââââââ
â
â¼
âââââââââââââââââââââââ
â 4. Verify success â
âââââââââââââââââââââââ
Step 1: Run Quality Checks
Run in this order. Stop on first failure.
ty # Type checking
ruff check . # Linting
ruff format --check . # Format check
pytest # Tests
If any fail: Fix the issue. Do not proceed to commit.
No exceptions:
- “It’s a flaky test” â Fix the test or mark it properly
- “I manually tested it” â Automated tests must pass
- “We can fix it later” â Later never comes. Fix now.
Step 2: Update CHANGELOG
Create or update CHANGELOG.md in project root.
Format:
# Changelog
## [Unreleased]
### Added
- New feature description
### Changed
- Modified behavior description
### Fixed
- Bug fix description
### Removed
- Removed feature description
Rules:
- Add entry under
[Unreleased]section - Use appropriate category (Added/Changed/Fixed/Removed)
- Be concise but specific – what changed and why it matters
- If CHANGELOG.md doesn’t exist, create it
Step 3: Stage and Commit
git add -A # Or specific files if preferred
git commit -m "$(cat <<'EOF'
Short summary in imperative mood (max 50 chars)
Longer description if needed. Explain what changed and why.
Keep lines under 72 characters.
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
Commit message guidelines:
- First line: imperative mood, max 50 chars (“Add feature” not “Added feature”)
- Blank line after summary
- Body: explain what and why, not how
- Reference issues if applicable
Step 4: Verify Success
git status # Should show clean working tree
git log -1 # Verify commit message looks correct
Red Flags – STOP
- Tests failing â Fix before commit
- Linting errors â Fix before commit
- Type errors â Fix before commit
- No changelog entry â Add one
- Vague commit message â Rewrite it
Common Mistakes
| Mistake | Fix |
|---|---|
| Skipping checks “to save time” | Checks catch bugs. Run them. |
| Committing with failing tests | Fix the test or the code |
| Forgetting changelog | Always update before commit |
| “WIP” or “fix” commit messages | Write meaningful messages |
| Not verifying after commit | Always check git status/log |