git-commit
Skill18 starsChanged 4 months agoMITView on GitHub
Commit all uncommitted changes in the current git repo as one or more atomic Conventional Commits. Use when the user says "/git-commit", "commit my changes", "commit the work", "make commits for what I did", or otherwise asks Claude to commit pending work. Splits unrelated changes into separate commits, writes Conventional Commit messages, and stops at local commits — does not branch or push.
- Reads credentials
174 other projects use a version of this.
Adopted by
Most recently taken up by
- HAOYI99/skillstheir own version, first seen Nov 8, 2026
- swjybky/deepwritetheir own version, first seen Nov 8, 2026
- PC2005-cloud/dsh-pettheir own version, first seen Nov 8, 2026
- stuff4ai/skillstheir own version, first seen Nov 8, 2026
- apattichis/agentic-research-toolkittheir own version, first seen Nov 8, 2026
- Darna-Digital/skillstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use git-pr, github-pr-create and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
klauswgSkillgit-pr
Prepare, review, publish, or update a complete GitHub pull request for the current repository, including local commit readiness, safe push strategy, semantic title validation, repository-native PR templates, issue linking, and checks verification. Use when the user asks to draft, create, submit, publish, open, or update a pull request. Always require the user to review and explicitly approve the exact final PR before any push or GitHub write.
Also in 11 projects that use this
mjun0812Skillgithub-pr-create
Pull Requestを作成するSkill。現在のbranchからpull requestを作成する。言語指定可能。 ユーザーが「PR作って」「pull request作成して」のように依頼したら使うこと。
Also in 3 projects that use this
MicrosoftSkillgit-branch
Branch management for implementation. Use when you need to create a branch, switch branches, checkout, or verify branching strategy before implementing code. Do not use for commits (use git-commit), pull requests (use pull-request), or advanced git operations (rebase, merge).
Also in 4 projects that use this
klauswgSkillgit-issue
Prepare, review, create, or update evidence-based GitHub issues for the current repository with duplicate detection, repository-native templates, valid labels, and post-publication verification. Use when the user asks to draft, file, submit, publish, edit, or refine a GitHub issue, bug report, feature request, performance issue, or technical proposal. Always require the user to review and explicitly approve the exact final issue before any GitHub write.
Also in 3 projects that use this
gologo13Skillgit-push
Push current branch to origin and sync with remote updates; keywords: git, rebase. Use only on explicit request; before execution, review diffs and list impact scope.
Also in 6 projects that use this
GoogleSkillgithub-pr-review
Review a GitHub pull request and leave inline comments in a natural human reviewing voice, indistinguishable from comments typed by hand on the GitHub web UI. Deliberately bounded to defects a reader can settle by looking at the anchored line, rather than a deep audit, so every comment is cheap for the author to check. Scales to 2-20 comments by PR size, parallelises analysis across sub-agents, drafts for approval, then posts individually with human pacing. Use when the user says "review this PR", "review PR 123", pastes a github.com/.../pull/N link, or asks for comments on a pull request. Don't use for reviewing local uncommitted changes or a diff against a branch (use the `review` skill for that).
Also in 4 projects that use this
Other versions174 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 174
- github/awesome-copilot★ 41ksame name
- doocs/leetcode★ 37ksame name
- tisfeng/Easydict★ 15ksame name
- doocs/md★ 14ksame name
- spinabot/brigade★ 11ksame name
- PC2005-cloud/dsh-pet★ 5.9ksame name
- GitTools/GitVersion★ 3.1ksame name
- igorescodro/alkaa★ 1.6ksame name
- microsoft/hve-core★ 1.6ksame name
- mattmireles/gemma-tuner-multimodal★ 1.5ksame name
164 more not listed
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 repository67 other files it gives its agents.
- agent-onboardingSkill
- android-backgroundSkill
- android-cliSkill
- android-compose-architectureSkill
- android-compose-componentsSkill
- android-data-layerSkill
- android-di-koinSkill
- android-error-handlingSkill
- android-integration-testingSkill
- android-jacoco-setupSkill
- android-jvm-test-coverageSkill
- android-module-structureSkill
- android-navigationSkill
- android-presentation-mviSkill
- android-preview-figma-verifySkill
- android-ui-screenshot-verifySkill
- android-ui-testingSkill
- android-ui-verifySkill
- android-unit-testingSkill
- android-version-catalogSkill
- architecture-decision-recordSkill
- careful-planningSkill
- compose-adaptive-layoutsSkill
- figma-to-android-vectorSkill
- finalizeSkill
- handoffSkill
- kmp-compose-architectureSkill
- kmp-compose-componentsSkill
- kmp-data-layerSkill
- kmp-di-koinSkill
- kmp-error-handlingSkill
- kmp-integration-testingSkill
- kmp-migration-analyzerSkill
- kmp-module-structureSkill
- kmp-navigationSkill
- kmp-presentation-mviSkill
- kmp-ui-testingSkill
- kmp-unit-testingSkill
- kotlin-coroutinesSkill
- kotlin-flowsSkill
- kotlin-mutation-testingSkill
- openspec-artifact-review-lightSkill
- openspec-artifact-reviewSkill
- project-breakdownSkill
- react-data-layerSkill
- react-error-handlingSkill
- react-integration-testingSkill
- react-presentation-mviSkill
- react-project-structureSkill
- react-routingSkill
- react-screen-architectureSkill
- react-securitySkill
- react-server-stateSkill
- react-ui-componentsSkill
- react-unit-testingSkill
- speckit-parallelize-agent-teamsSkill
- speckit-parallelize-subagentsSkill
- spring-api-layerSkill
- spring-di-configurationSkill
- spring-integration-testingSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. 0 are common, 11 are distinctive, and 10 are very specific to this project.
0
Common
Most of the 134 edited versions we read keep these.
11
Distinctive
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 29
Branch check: if branch is main, master, or develop, print a one-line warning (Note: committing directly to <branch>.) and continue.
- Very specific: line 30
Empty check: if git status shows nothing, report Nothing to commit.
- Very specific: line 31
In-progress check: if mid-rebase / mid-merge / mid-cherry-pick (look for .git/MERGE_HEAD, .git/rebase-*, .git/CHERRY_PICK_HEAD), stop and …
- Very specific: line 46
Use the calling agent's context: If $ARGUMENTS (or any context the calling agent passed) is non-empty, treat it as ground truth for *why* …
- Distinctive: line 48
If current staging conflicts with the group plan, unstage with git restore --staged ..
- Distinctive: line 54
Commit with the HEREDOC pattern (see "Commit Message Format").
- Very specific: line 55
If a pre-commit hook fails: read the failure, fix the underlying issue, re-stage, make a new commit.
- Very specific: line 56
Final report: run git status and print one line per commit (<short-sha> <subject>).
- Distinctive: line 143
When a single file contains two unrelated changes that must land in separate commits, don't fall back to one combined commit — split at the …
- Very specific: line 153
Read /tmp/full.diff and decide which hunks (@@ ...
- Distinctive: line 162
Commit group A with its Conventional Commit message.
- Distinctive: line 169
Run git diff and git diff --cached — both must be empty for that file.
- Very specific: line 175
If --check fails, the hunks were split incorrectly (line numbers off, missing context).
- Distinctive: line 185
Don't edit the numbers — copy each hunk verbatim from the original diff.
- Very specific: line 196
If the calling agent passed extra context as $ARGUMENTS, treat it as ground truth about what changed and why.
- Distinctive: line 202
If no context is provided, infer everything from the diffs plus the recent git log style.
- Distinctive: line 206
Always use a HEREDOC. The message must look fully human-authored — no co-author line, no "Generated with Claude" footer, no AI-attribution, …
- Distinctive: line 221
Never git add -A. Never git add ..
- Very specific: line 223
Never --no-verify. Hook failure → fix the underlying issue + make a new commit (never --amend).
- Distinctive: line 224
Do not push. This skill stops at local commits.
- Distinctive: line 226
Never include a Claude co-author line, AI-attribution, or tooling footer in any commit message.
“Common” is measured: kept by at least 6 in 10 of the 134 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Git Commit
Overview
Look at every uncommitted change in the current repo (staged, unstaged, untracked) and produce one or more atomic Conventional Commits. Group related changes together; split unrelated changes into separate commits. The commit messages must read as if a human developer wrote them — no Claude co-author line, no "Generated with…" footer, no AI-attribution.
This skill commits. It does not branch, push, reset, rebase, or run any other git operation.
Workflow
- Verify repo:
git rev-parse --is-inside-work-tree. If not in a git repo, stop and report. - Collect state in parallel (one message, multiple Bash calls):
git branch --show-currentgit status --porcelain(never use-uall)git diff(unstaged tracked changes)git diff --cached(staged changes)git log --oneline -20(style reference for messages)
- Branch check: if branch is
main,master, ordevelop, print a one-line warning (Note: committing directly to <branch>.) and continue. - Empty check: if
git statusshows nothing, reportNothing to commit.and stop. - In-progress check: if mid-rebase / mid-merge / mid-cherry-pick (look for
.git/MERGE_HEAD,.git/rebase-*,.git/CHERRY_PICK_HEAD), stop and tell the user. - Read diffs — enough of each to understand intent. For large diffs, sample representative hunks. Don't skim past anything that determines the commit type.
Skip likely-secret files — never stage or commit files matching:
.env,.env.**credentials**.pem,*.keyid_rsa*
List them to the user and ask whether they actually want them committed before proceeding.
- Group changes by intent. One concern per commit. Decision test: "Could I revert just this commit and have a coherent codebase?" If no, split. Examples:
- New file + the import that wires it in → 1 commit.
- Rename + every reference update → 1 commit.
- Feature + an unrelated typo fix → 2 commits.
- Migration + the code using the new schema → 2 commits (migration first).
- Two unrelated changes inside the same file → 2 commits (see "Splitting Within a File").
- Use the calling agent's context. If
$ARGUMENTS(or any context the calling agent passed) is non-empty, treat it as ground truth for why changes were made, type/scope selection, grouping decisions, and commit-body content. If empty, infer from diffs + recentgit logstyle. - For each commit group:
- If current staging conflicts with the group plan, unstage with
git restore --staged .. - Stage exactly the changes in this group:
- Whole-file groups:
git add <file1> <file2> .... - Hunk-level groups (same file split across commits): see "Splitting Within a File" below.
- Whole-file groups:
- Never
git add -A. Nevergit add .. - Pick the
type(scope): descriptionper the rules below. - Commit with the HEREDOC pattern (see "Commit Message Format"). No co-author line. No AI-attribution. No tooling footer.
- If a pre-commit hook fails: read the failure, fix the underlying issue, re-stage, make a new commit. Never
--amend. Never--no-verify.
- If current staging conflicts with the group plan, unstage with
- Final report: run
git statusand print one line per commit (<short-sha> <subject>).
Conventional Commits
Format: type(scope): description
- Imperative mood, lowercase start, no trailing period.
- Optional body after a blank line — explains why, not what.
- Breaking change → append
!to the type:feat(api)!: rename foo to bar.
The 10 types
| Type | When |
feat | Adds new user-facing capability |
fix | Corrects wrong behavior (a bug) |
perf | Same behavior, measurably faster/lighter — performance was the goal |
refactor | Code restructure with no behavior change (rename, extract, simplify) |
style | Whitespace/formatting/semicolons only — NOT visual UI styling |
test | Test-only changes (adding, fixing, removing tests) |
docs | Documentation only (README, KDoc, comments, MD files) |
build | Changes that affect the shipped build (Gradle, deps, packaging) |
ci | CI config only (GitHub Actions, workflows, pipelines) |
chore | Repo housekeeping that doesn't ship (lint config, .gitignore, dotfiles, scripts) |
revert | Reverts a previous commit |
Picking rule (top-down, first match wins)
- Does user-facing behavior change?
- New capability →
feat - Corrects bug →
fix - Faster/lighter, same result, perf was the goal →
perf
- New capability →
- No behavior change. What changed?
- Production code structure only →
refactor - Whitespace/formatting/semicolons only →
style - Tests only →
test - Docs/comments only →
docs - Shipped build inputs (Gradle deps, version catalogs, packaging) →
build - CI workflows only →
ci - Reverts an earlier commit →
revert - Anything else maintenance →
chore
- Production code structure only →
Confusion-point clarifications
featwritten together with its tests → still onefeatcommit.testis reserved for test-only commits.chore(deps)vsbuild(deps): pickbuildwhen the dependency ships in the artifact (libraries, Gradle plugins). Pickchorefor tooling that doesn't ship (eslint, ktlint, pre-commit hooks).refactorthat happens to speed things up → only useperfif perf was the goal. Otherwise it'srefactor.styleis not UI styling. UI changes arefeatorfix.styleis purely the formatter.
Scope
Optional. Use the module/area actually changed (e.g., auth, network, ui, deps, nav, data). One scope per commit; if the change spans many areas, leave the scope off.
Examples
| Change | Message |
| Add login screen | feat(auth): add login screen with email/password |
| Fix crash on null user | fix(profile): handle null user in profile screen |
| Extract use case | refactor(auth): extract ValidateCredentialsUseCase |
| Update Ktor version (ships) | build(deps): bump Ktor to 3.1.0 |
| Tighten ktlint config | chore: tighten ktlint rules |
| Add ViewModel tests | test(auth): add LoginViewModel unit tests |
| Fix typo in README | docs: fix typo in setup instructions |
| Speed up list rendering | perf(home): cache item keys to reduce recomposition |
| Reformat with new style guide | style: apply ktlint formatting |
| Update GitHub Actions cache | ci: bump actions/cache to v4 |
| Roll back broken merge | revert: revert "feat(auth): add login screen" |
Atomic Commit Discipline
One logical change per commit. Not "save progress."
Decision test: "Could I revert just this commit and have a coherent codebase?" If no, split it.
| Scenario | Commits |
| New file + its test | 1 commit |
| Rename + update all references | 1 commit |
| New feature + unrelated formatting | 2 commits |
| Migration + code using new schema | 2 commits (migration first) |
| Two unrelated bug fixes | 2 commits |
Never commit broken compilation.
Splitting Within a File
When a single file contains two unrelated changes that must land in separate commits, don't fall back to one combined commit — split at the hunk level. This works whenever the changes touch different, non-overlapping line ranges.
The technique uses git apply --cached with a hand-crafted patch. git add -p is interactive and not usable here.
Sequence:
- Get the full diff for the file:
git diff -- <file> > /tmp/full.diff - Read
/tmp/full.diffand decide which hunks (@@ ... @@blocks) belong to commit A vs commit B. - Build
/tmp/group_a.diffcontaining only:- The
diff --git,index,---,+++header lines from the original. - The hunks assigned to group A (each starting with its own
@@line).
- The
- Stage just group A:
git apply --cached /tmp/group_a.diff - Sanity-check:
git diff --cached -- <file>should show only group A;git diff -- <file>should show only group B. - Commit group A with its Conventional Commit message.
- Stage the rest of the file:
The working tree still holds group B becausegit add <file>git apply --cachedonly touches the index. Nowgit addstages those remaining lines against the new HEAD. - Commit group B.
- Run
git diffandgit diff --cached— both must be empty for that file.
Verifying patches before applying:
git apply --cached --check /tmp/group_a.diff # dry-run; non-zero exit = patch won't apply cleanlyIf --check fails, the hunks were split incorrectly (line numbers off, missing context). Rebuild the patch.
Hunk header reference — hunks use this format:
@@ -<old_start>,<old_count> +<new_start>,<new_count> @@ optional-section-header
context line
-removed line
+added line
context lineDon't edit the numbers — copy each hunk verbatim from the original diff. Keep at least the 3 lines of context git already includes.
When this does NOT work — fall back to a single combined commit:
- Hunks overlap on the same lines (e.g., a refactor and a feature both rewrote the same function body).
- The file is a binary file or rename/delete (no line-level hunks to split).
- Splitting would leave one commit with broken compilation.
In those cases, commit the file once with a message that names the dominant intent and mention the secondary change in the body.
Calling-Agent Context
If the calling agent passed extra context as $ARGUMENTS, treat it as ground truth about what changed and why. Use it to:
- Pick more accurate types and scopes.
- Resolve grouping ambiguity when diffs alone aren't enough.
- Inform the commit body (the why).
If no context is provided, infer everything from the diffs plus the recent git log style.
Commit Message Format
Always use a HEREDOC. The message must look fully human-authored — no co-author line, no "Generated with Claude" footer, no AI-attribution, no tooling notice:
git commit -m "$(cat <<'EOF'
feat(auth): add login screen with email/password
Wires the new LoginScreen into the auth nav graph.
EOF
)"Subject line first. Blank line. Optional body explaining why. Nothing else.
Safety
- Never
git add -A. Nevergit add .. Always stage explicit files. - Skip likely-secret files; warn the user instead of staging them.
- Never
--no-verify. Hook failure → fix the underlying issue + make a new commit (never--amend). - Do not push. This skill stops at local commits.
- Protected branch (
main/master/develop) → print a one-line warning and continue. - Never include a Claude co-author line, AI-attribution, or tooling footer in any commit message.
Edge Cases
- Nothing to commit → report and stop.
- Mid-rebase / mid-merge / mid-cherry-pick → stop and tell the user.
- Pre-commit hook fails twice for the same group → stop and report; don't loop.
- Detached HEAD → warn explicitly before committing.
- Renames that git tracks as delete + add → stage both sides together so git records the rename.
Red Flags
| Thought | Reality |
"I'll just git add -A" | No — stage explicit files only. |
| "These two changes are loosely related" | Split them. The revert test decides. |
"Pre-commit hook is annoying, --no-verify" | No. Fix the hook failure. |
"Commit failed, let me --amend" | No. New commit each time. |
| "Big mixed diff is one feature" | Read it again. Group by intent. |
| "I'll add a co-author line just this once" | No. The message must look human-authored. |
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.

