commit-discipline
Ensures code is committed only after verifying work, promoting small and reviewable history.
Install
mkdir -p .claude/skills/commit-discipline && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12833" && unzip -o skill.zip -d .claude/skills/commit-discipline && rm skill.zipInstalls to .claude/skills/commit-discipline
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Use this skill when doing code-changing work in this repository that should end with a small, reviewable commit, especially after a green TDD slice or completed ticket slice.Key capabilities
- →Confirm commit scope to active ticket or review slice
- →Run `ruff format .` before lint, tests, or commit
- →Run touched-area tests first
- →Run `ruff check .` and `pytest -v`
- →Review diff for small, reviewable commits
- →Commit after each coherent green slice
How it works
The skill enforces a workflow of confirming scope, verifying readiness with formatting and tests, reviewing diffs, and committing small, coherent slices, reporting the outcome.
Inputs & outputs
When to use commit-discipline
- →Commit completed feature
- →Verify code before commit
- →Manage commit size
About this skill
Commit Discipline
Use this skill after implementation or review work in this repo when changes are ready to commit.
Purpose
Follow the repo default in AGENTS.md: after a green, reviewable slice, commit by default unless the user says not to.
When To Use
Use this skill when:
- A behavior-changing ticket slice is green.
- A review fix is complete and verified.
- A coherent docs+code slice is ready and reviewable.
Do not use this skill when:
- Work is still in a red or unstable state.
- The user explicitly says not to commit yet.
- The task is planning-only or pure exploration.
- The worktree contains unrelated user changes that cannot be safely separated.
Workflow
- Confirm scope.
- Commit only the active ticket or review slice.
- Do not bundle unrelated files.
- Verify readiness.
- Run
uv run ruff format .before lint, tests, commit, or push. - Run the touched-area tests first.
- Run broader required checks only when the slice warrants it.
- At minimum, finish with:
uv run ruff format .uv run ruff check .uv run pytest -v - Apply the same sequence before pushing more commits to an already open PR.
- Do not commit with known red-phase failures in the slice.
- Run
- Review the diff.
- Inspect
git status --short. - Inspect
git diff --statand a narrow diff. - Confirm the commit is small and reviewable.
- Inspect
- Commit by default.
- Commit after each coherent green slice.
- Prefer multiple small commits over one large commit.
- Report clearly.
- State the commit created and what slice it covers.
- If no commit was made, state the blocker.
Commit Rules
- Default unit of commit: one green, reviewable ticket slice.
- Preferred timing: after focused tests are green and before starting the next sub-slice.
- Hold the commit only when:
- the user asked to wait
- unrelated worktree changes make the commit unsafe
- the slice is still red or unstable
- Never amend or rewrite history unless explicitly requested.
- Never include unrelated user changes.
- Avoid interactive git flows.
Commit Messages
Rules:
- Keep the subject short and factual.
- Use imperative/lowercase style unless the repo already uses another clear convention.
- Include a ticket id only when one is already part of the task context.
- Do not invent issue prefixes or project codes.
Relationship To Other Skills
- Use
tddfor behavior-changing work. - Use this skill after the slice is green to handle commit follow-through.
When not to use it
- →When work is still in a red or unstable state
- →When the user explicitly says not to commit yet
- →When the task is planning-only or pure exploration
Limitations
- →Commit only the active ticket or review slice
- →Do not bundle unrelated files
- →Do not commit with known red-phase failures in the slice
How it compares
This skill formalizes a disciplined commit workflow, ensuring small, reviewable commits after verified changes, unlike large, monolithic commits or unverified changes.
Compared to similar skills
commit-discipline side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| commit-discipline (this skill) | 0 | 3mo | No flags | Intermediate |
| resolve-conflicts | 81 | 8mo | Review | Intermediate |
| dependency-upgrade | 26 | 5mo | Review | Intermediate |
| git-commits | 21 | 4mo | No flags | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
resolve-conflicts
antinomyhq
Use this skill immediately when the user mentions merge conflicts that need to be resolved. Do not attempt to resolve conflicts directly - invoke this skill first. This skill specializes in providing a structured framework for merging imports, tests, lock files (regeneration), configuration files, and handling deleted-but-modified files with backup and analysis.
dependency-upgrade
wshobson
Manage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing. Use when upgrading framework versions, updating major dependencies, or managing breaking changes in libraries.
git-commits
bonny
Create well-structured git commits in logical chunks following best practices
git-advanced-workflows
wshobson
Master advanced Git workflows including rebasing, cherry-picking, bisect, worktrees, and reflog to maintain clean history and recover from any situation. Use when managing complex Git histories, collaborating on feature branches, or troubleshooting repository issues.
github-multi-repo
ruvnet
Multi-repository coordination, synchronization, and architecture management with AI swarm orchestration
git-workflow-enforcer
CrazyDubya
Ensures commits follow conventional commits, branch naming conventions, and PR templates. Use when creating commits, branches, or PRs, or when user mentions git workflow.