git-commit-workflow
Skill2 starsChanged 3 months agoMITView on GitHub
Prepare or create Git commits for the user. Use whenever the user asks to commit changes, split work into commits, write commit messages, stage files, or clean up a dirty worktree before committing, and after each completed phase of a sequenced coding or refactoring workflow. Creates descriptive commit messages, logical commit boundaries, and an Assisted-by trailer for AI-authored or AI-assisted changes.
- Commits and pushes
2 other projects use a version of this.
Adopted by
Most recently taken up by
- Ygohel18/skillstheir own version, first seen Sep 27, 2026
- HeathWang/hw-cc-plugintheir own version, first seen Aug 21, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- HeathWang/hw-cc-plugin★ 1same name
- Ygohel18/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository24 other files it gives its agents.
- AGENTS.mdAGENTS.md
- act-within-scopeSkill
- asd-ste100Skill
- codingSkill
- context-managementSkill
- create-verification-skillSkill
- dockerfileSkill
- domain-modelingSkill
- encode-lessonsSkill
- experience-firstSkill
- eyes-onSkill
- flux-ghcr-image-automationSkill
- flux-kustomize-layoutSkill
- frontend-designSkill
- git-worktreeSkill
- grill-with-docsSkill
- implement-ticketsSkill
- maintain-verification-skillSkill
- makefileSkill
- omarchy-developmentSkill
- releaseSkill
- skill-evaluationSkill
- technical-writingSkill
- test-auditSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
27 rules. About 0 are common, 21 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈21
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Create small, reviewable commits with clear, descriptive subjects and an explicit AI assistance trailer.
- Distinctive: line 23
When the user asks to commit, stage, split commits, or push as part of finishing work.
- Distinctive: line 25
When a loaded skill or reference completes a phase of sequenced work and the tree changed.
- Distinctive: line 31
Never discard, reset, restore, clean, or overwrite user changes unless the user explicitly asks for that destructive action.
- Distinctive: line 36
Treat already-staged changes as provisional, not authoritative.
- Distinctive: line 39
If unrelated changes exist, leave them unstaged and mention them.
- Distinctive: line 40
If a file contains changes from multiple concerns, use an interactive or patch-based staging flow when available.
- Distinctive: line 43
Do not amend, rebase, squash, or rewrite commits unless the user asks.
- Distinctive: line 51
If the staged area or worktree contains multiple independent features, bug fixes, refactors, documentation changes, dependency updates, …
- Distinctive: line 65
Keep changes together when separating them would leave the repository broken, unreviewable, or without the tests that explain the behavior.
- Distinctive: line 68
When multiple logical units are already staged together:
- Distinctive: line 70
Do not assume the user's staging is the desired commit boundary.
- Distinctive: line 73
Ask before mixing groups only when patch-level separation is impractical or when the correct boundary is genuinely ambiguous.
- Distinctive: line 78
Write one short, plain-English line that states the concrete behavior or structural change.
- Very specific: line 82
Prefer an imperative verb: Add file organization guidance, Keep generated wrappers quiet, or Split notification parsing from delivery.
- Very specific: line 86
Do not use Conventional Commit prefixes or invent broad labels such as chore, refactor, or cleanup when they say less than the actual …
- Distinctive: line 88
Keep the subject concise, ideally 72 characters or fewer.
- Distinctive: line 90
Follow a repository's explicit commit-message convention when it has one.
- Distinctive: line 95
Use a body only when it records a non-obvious reason, risk, migration, tradeoff, or useful validation evidence.
- Very specific: line 111
If the change breaks a public contract, state the affected readers and required migration plainly before Assisted-by:.
- Distinctive: line 122
Use the most specific current agent and model name available.
- Very specific: line 127
If the exact model is unavailable, use the agent name with AI, for example:
- Distinctive: line 133
Keep this as a Git trailer at the end of the commit message after other footers.
- Very specific: line 143
Write a descriptive commit message with an Assisted-by trailer.
- Distinctive: line 144
Run targeted validation when practical before committing, especially for code changes.
- Distinctive: line 146
Commit with a multi-line message so the trailer is preserved exactly.
- Very specific: line 149
If the user asked to push, git push the current branch with an explicit refspec.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Git Commit Workflow
Goal
Create small, reviewable commits with clear, descriptive subjects and an explicit AI assistance trailer. Always separate independent logical units of work into separate commits. Prefer preserving user changes over making a tidy history at the cost of mixing unrelated work.
When To Commit
- When the user asks to commit, stage, split commits, or push as part of finishing work.
- When a loaded skill or reference completes a phase of sequenced work and the tree changed. Treat that as authorization. Commit the phase, then continue the next phase without waiting for a separate commit prompt.
Safety Rules
- Never discard, reset, restore, clean, or overwrite user changes unless the user explicitly asks for that destructive action.
- Inspect the worktree before staging:
git status --short, then targeted diffs for changed files. - Stage only files that belong to the commit being made.
- Treat already-staged changes as provisional, not authoritative. Inspect the staged diff and unstage/re-stage by logical unit when staged content contains multiple independent concerns.
- If unrelated changes exist, leave them unstaged and mention them.
- If a file contains changes from multiple concerns, use an interactive or patch-based staging flow when available. If not practical, ask before mixing concerns.
- Do not amend, rebase, squash, or rewrite commits unless the user asks.
Commit Splitting
Split commits when their changes can be reviewed, validated, and reverted independently. Keep changes together when splitting would leave either commit incomplete or broken.
If the staged area or worktree contains multiple independent features, bug fixes, refactors, documentation changes, dependency updates, generated output, formatting, or infrastructure changes, create separate commits.
Each commit should represent one coherent unit of work that can be understood, reviewed, reverted, and tested on its own. Common split points:
- Feature code vs tests or fixtures only when the tests are broad or touch shared helpers. Otherwise keep feature and its focused tests together.
- Behavior changes vs formatting, generated files, dependency bumps, or docs.
- Multiple features, bug fixes, or refactors.
- Application code vs infrastructure/config changes.
- Mechanical renames/moves vs semantic edits.
Keep changes together when separating them would leave the repository broken, unreviewable, or without the tests that explain the behavior.
When multiple logical units are already staged together:
- Do not assume the user's staging is the desired commit boundary.
- Inspect
git diff --cachedand identify logical groups before committing. - Rebuild the index so each commit contains only one group.
- Ask before mixing groups only when patch-level separation is impractical or when the correct boundary is genuinely ambiguous.
Commit Subject
Write one short, plain-English line that states the concrete behavior or structural change. A reader should understand what changed without decoding a type, scope, or local taxonomy.
- Prefer an imperative verb:
Add file organization guidance,Keep generated wrappers quiet, orSplit notification parsing from delivery. - Name the affected thing when it helps the reader find the change:
Preserve failed jobs during retryis clearer thanImprove retries. - Do not use Conventional Commit prefixes or invent broad labels such as
chore,refactor, orcleanupwhen they say less than the actual change. - Keep the subject concise, ideally 72 characters or fewer. Do not end it with a period.
- Follow a repository's explicit commit-message convention when it has one. In the absence of one, use this format.
Commit Body
Use a body only when it records a non-obvious reason, risk, migration, tradeoff, or useful validation evidence. Do not use it to repeat the subject. Keep it concise:
Add file organization guidance
Explain the reason and any important tradeoffs that the diff does not show.
Validation:
- go test ./...
- npm test
Assisted-by: Codex/GPT-5If the change breaks a public contract, state the affected readers and required
migration plainly before Assisted-by:.
Assisted-by Trailer
For AI-authored or AI-assisted commits, always add:
Assisted-by: <agent>/<model>Use the most specific current agent and model name available. Examples:
Assisted-by: Codex/GPT-5Assisted-by: OpenCode/GPT-5
If the exact model is unavailable, use the agent name with AI, for example:
Assisted-by: Codex/AIKeep this as a Git trailer at the end of the commit message after other footers.
Workflow
- Inspect current status and diffs.
- Inspect both unstaged and staged diffs; treat staged content as input to regroup, not as final commit scope.
- Group changes into logical commits using the splitting rules above.
- For each commit, stage only that group.
- Write a descriptive commit message with an
Assisted-bytrailer. - Run targeted validation when practical before committing, especially for code changes.
- Commit with a multi-line message so the trailer is preserved exactly.
- Repeat staging, validation, and commit for each remaining logical group.
- Show the resulting commit hashes and any remaining uncommitted changes.
- If the user asked to push,
git pushthe current branch with an explicit refspec. If they asked for a PR,gh pr createand print the URL. Do not push until they said push.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

