Agent skill
commit
Use when the user asks to commit, commit and push, or make a git commit. Covers branching, commit workflow, conventional commits, TODO updates, and push/PR rules.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/commit-edochi-mdvs
SKILL.md
Commit & Branching Conventions
Branching
Never push directly to main. All work goes through feature branches + PRs.
- One branch per TODO or feature:
feat/description,fix/description,docs/description - Branch off
main:git checkout -b feat/my-feature main - Always ask the user before creating a branch
- Merge via PR (regular merge, not squash)
When to Commit
Never commit unless the user explicitly asks. No autonomous commits. Wait for "commit", "commit and push", or similar.
Before Committing
- If the work corresponds to a spec TODO, update its status to
donebefore committing (use thetodoskill). This lets the user review the TODO update as part of the same diff. - Verify tests pass, clippy is clean, and fmt is applied.
Commit Workflow
Run git add, git commit, and git push as separate commands — never chained together.
Staging
- Stage specific files by name — never use
git add -Aorgit add . - Don't stage files that contain secrets (
.env, credentials)
Commit Messages
Use Conventional Commits format. A commit-msg hook (cocogitto) enforces this.
Format: <type>[optional scope]: <description>
Types: feat, fix, refactor, docs, test, chore, ci, perf, style
git commit -m "$(cat <<'EOF'
feat: add enum constraints on string fields
EOF
)"
Push
Only push when the user explicitly asks. "Commit" does not imply "push". Wait for "push", "commit and push", or similar.
Pull Requests
After pushing a feature branch, create a PR to main when the user asks. Use gh pr create with a clear title and summary. CI must pass before merging. Use regular merge (not squash).
Safety Rules
- Never push directly to
main - Never amend, force-push, or skip hooks — unless the user explicitly asks
- Never rebase interactively (
git rebase -i) - If a pre-commit hook fails, fix the issue and create a new commit (don't amend)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?