minimal-commit

Splits working tree changes into atomic git commits with Conventional Commits messages.

Updated Jun 28, 2026
One-click install
npx skills add https://github.com/jason23452/my-skill --skill minimal-commit-jason23452
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: minimal-commit
Source: https://github.com/jason23452/my-skill/tree/main/flow/minimal-commit
Command: npx skills add https://github.com/jason23452/my-skill --skill minimal-commit-jason23452

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Dirty worktrees often mix bugfixes, tests, formatting, and docs in one pile, making history hard to review and revert. This Skill enforces small, atomic commits so every change is independently reviewable and traceable to an Azure DevOps work item. ## Core Features & Use Cases - Atomic Commit Splitting: Inspects git status, diffs, and recent history, then groups changes into single logical units and stages only the relevant files or hunks. - Standardized Messages: Generates Conventional Commits subjects prefixed with an ADO work item id, e.g. #1234 fix(auth): 修正 token 過期判斷, and asks for the id when missing. - Safe Partial Staging: Uses patch-based staging (git diff + git apply --cached) to split mixed hunks in one file, and stops to ask when hunks cannot be separated safely. - Use Case: You finished an auth bugfix, its tests, and a README tweak in one session. The Skill creates three separate verified commits instead of one messy git add -A commit. ## Quick Start Ask the assistant to commit my current changes as minimal atomic commits using ADO work item id 1234.

Frequently Asked Questions about minimal-commit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I split mixed changes into atomic git commits?▼

Inspect git status and diffs, group changes into single logical units, then stage only the files for one group at a time. For mixed hunks in one file, generate a patch with git diff, edit it, and apply it to the index with git apply --cached.

How to write Conventional Commits messages with a work item id?▼

Prefix the subject with the Azure DevOps id followed by a type and scope, such as #1234 fix(auth): correct token expiry check. Keep the summary under 50 characters, use imperative mood, and omit trailing periods.

What happens if no ADO work item id is provided?▼

The workflow stops and asks for the work item id before staging or committing anything. It never guesses an id, uses a placeholder, or creates a commit without the required prefix.

Can I stage only part of a file in git without interactive mode?▼

Yes. Export the file's diff to a patch file, manually remove unrelated hunks, then run git apply --cached on the edited patch. If the hunks cannot be separated safely, the workflow pauses and asks whether to stage the whole file.

Does this workflow amend, push, or discard existing changes?▼

No. It never amends commits, pushes, or runs destructive commands like git reset --hard unless the user explicitly requests it. Pre-existing unrelated changes in the worktree are left untouched.