commit-work
Install this skill
npx skills add softaworks/agent-toolkitWorks across Claude Code, Cursor, Codex, Copilot & Antigravity
The commit-work skill enforces disciplined version control by treating commits as meaningful units of history rather than mere save points. Instead of dumping all changes at once, the agent parses the working tree to isolate logical groupings, ensuring every commit adheres to Conventional Commits standards. It rigorously verifies the state of the repository before finalization, performing differential checks against the index to prevent the inclusion of debugging artifacts, secrets, or unintentional formatting noise. By enforcing a strict workflow that requires human-readable justifications for every hunk, it keeps repository history clean and navigable. This approach transforms a messy working directory into a sequence of atomic, reviewable updates, which minimizes merge conflicts and accelerates peer review for maintainers.
When to Use This Skill
- •Separating feature implementation from dependency updates in a single session
- •Refactoring code while ensuring tests remain in a separate, valid commit
- •Cleaning up a cluttered working tree after a long prototyping phase
- •Preparing an atomic set of commits for a complex pull request
How to Invoke This Skill
Example prompts that trigger this skill in Claude Code, Cursor, or Antigravity:
- “Commit my recent changes to the repository
- “Prepare these file modifications for a clean commit
- “Help me split my current work into logical conventional commits
- “Review and commit my current progress following standard conventions
- “Finalize the changes in my staging area with proper messages
Pro Tips
- 💡Always use `git diff --cached` to review exactly what will be committed, ensuring no unintended changes or sensitive information slips into your repository.
- 💡Leverage patch staging (`git add -p`) extensively when changes are mixed within files. This allows for creating highly atomic commits that are much easier to revert or cherry-pick.
- 💡Beyond just adhering to Conventional Commits, consider adding a brief 'why' in your commit body. Explaining the reasoning behind a change significantly enhances future understanding and debugging.
What this skill does
- •Performs granular staging using patch-based selection
- •Validates commit messages against Conventional Commits formatting
- •Identifies and isolates unrelated modifications into distinct logical commits
- •Runs automated verification checks prior to finalizing commit operations
- •Detects potential security risks or unintended debug logs in staged changes
When not to use it
- ✕When working in a throwaway exploration branch where history cleanliness is irrelevant
- ✕When an immediate emergency hotfix requires skipping verification steps
Example workflow
- Execute git status and diff to audit modified files
- Apply git add -p to separate distinct logical changes
- Review changes using git diff --cached to confirm content
- Compose a Conventional Commit message detailing the intent
- Run relevant linting or unit tests to verify the commit state
- Finalize the commit and repeat for remaining unstaged hunks
Prerequisites
- –Git repository initialized locally
- –Repository guidelines for scopes and types defined
Pitfalls & limitations
- !Over-splitting commits can lead to unnecessarily verbose git logs
- !Ignoring test failures during the verification step can break build pipelines
- !Misinterpreting complex hunk overlaps may result in partial code logic
FAQ
How it compares
Unlike a standard 'git commit -am' which ignores structure, this skill mandates intentional staging and schema validation to ensure long-term maintainability.
📄 Full skill instructions — original source: softaworks/agent-toolkit
## Goal
Make commits that are easy to review and safe to ship:
- only intended changes are included
- commits are logically scoped (split when needed)
- commit messages describe what changed and why
## Inputs to ask for (if missing)
- Single commit or multiple commits? (If unsure: default to multiple small commits when there are unrelated changes.)
- Commit style: Conventional Commits are required.
- Any rules: max subject length, required scopes.
## Workflow (checklist)
1) Inspect the working tree before staging
-
git status-
git diff (unstaged)- If many changes:
git diff --stat2) Decide commit boundaries (split if needed)
- Split by: feature vs refactor, backend vs frontend, formatting vs logic, tests vs prod code, dependency bumps vs behavior changes.
- If changes are mixed in one file, plan to use patch staging.
3) Stage only what belongs in the next commit
- Prefer patch staging for mixed changes:
git add -p- To unstage a hunk/file:
git restore --staged -p or git restore --staged <path>4) Review what will actually be committed
-
git diff --cached- Sanity checks:
- no secrets or tokens
- no accidental debug logging
- no unrelated formatting churn
5) Describe the staged change in 1-2 sentences (before writing the message)
- "What changed?" + "Why?"
- If you cannot describe it cleanly, the commit is probably too big or mixed; go back to step 2.
6) Write the commit message
- Use Conventional Commits (required):
-
type(scope): short summary- blank line
- body (what/why, not implementation diary)
- footer (BREAKING CHANGE) if needed
- Prefer an editor for multi-line messages:
git commit -v- Use
references/commit-message-template.md if helpful.7) Run the smallest relevant verification
- Run the repo's fastest meaningful check (unit tests, lint, or build) before moving on.
8) Repeat for the next commit until the working tree is clean
## Deliverable
Provide:
- the final commit message(s)
- a short summary per commit (what/why)
- the commands used to stage/review (at minimum:
git diff --cached, plus any tests run)How to Use This Skill Unit
Option A: Project-Specific (Recommended)
- Click "Download" above
- In your project, create the directory:
.agent/skills/commit-work/ - Save the file as
SKILL.md - The agent will automatically discover the skill based on its description.
Option B: Global Installation (All Agents)
Save the file to these locations to make it available across all projects:
- Claude Code:
~/.claude/skills/softaworks/agent-toolkit/commit-work/SKILL.md - Cursor:
~/.cursor/skills/softaworks/agent-toolkit/commit-work/SKILL.md - Antigravity:
~/.gemini/antigravity/skills/softaworks/agent-toolkit/commit-work/SKILL.md
🚀 Install with CLI:npx skills add softaworks/agent-toolkit