scoped-commits
Skill0 starsChanged 10 months agoMITView on GitHub
Analyzes all pending repo changes (staged, unstaged, and untracked), groups them into cohesive commits by scope, infers the Conventional Commits type for each group, and creates one commit per group. Does not push.
- Reads credentials
- Commits and pushes
2 other projects use a version of this.
Adopted by
Most recently taken up by
- gabrielbauman/skillstheir own version, first seen Nov 1, 2026
- uwonu606/claude-skillstheir own version, first seen Oct 11, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- gabrielbauman/skills★ 1same name
- uwonu606/claude-skills★ 0same 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 repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- coaching-reporter/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- astro-mcp-integrationSkill
- coaching-reporterSkill
- commit-messageSkill
- feature-notesSkill
- pr-creatorSkill
- project-roadmapSkill
- runbook-executorSkill
- runbook-generatorSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 8 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 25
Don't use it if there's already a single cohesive change staged — commit-message is enough there.
- Distinctive: line 43
If git status --porcelain returns nothing, report "No pending changes" and stop.
- Distinctive: line 45
Treat staged + unstaged + untracked as a single set to partition — don't assume what's already in the index is a correct partition.
- Distinctive: line 59
Before grouping, identify and exclude from any commit:
- Distinctive: line 72
If something is ambiguous (is it a legitimate test fixture or a generated file?), don't guess — ask.
- Distinctive: line 84
If, within a single file, the diff visibly mixes two unrelated scopes (two unrelated hunks), don't try to split by hunk (git add -p) …
- Distinctive: line 87
Never leave an intermediate commit deliberately broken: if one file renames a function and another updates all its call sites, they go in …
- Distinctive: line 127
If it fails, fix and re-validate.
- Very specific: line 152
Never --amend, never --no-verify, never -c commit.gpgsign=false.
- Very specific: line 153
If a pre-commit hook fails, fix the issue and create a new commit — don't retry with --amend.
- Distinctive: line 166
Don't run git push: this skill's scope ends at leaving the commits created locally.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Scoped Commits
Splits a repo's pending state (a mix of fixes, features, docs, config...) into separate,
coherent commits — each with its correct type(scope): subject. It's the next step after
the commit-message skill: that one assumes you've already decided what goes in the
staging area; this one decides how to split a working tree with changes of different
natures and does the git add/git commit work for each partition. The scope ends there:
it never runs git push — that's left to the user's judgment.
When to use it
The user asks to "push the changes", "commit this in parts", "split the commit by scope", or there's an obvious mix of unrelated changes (e.g. a domain fix + a demo feature + a docs update) in the same working tree.
Don't use it if there's already a single cohesive change staged — commit-message is
enough there.
Workflow
1. Survey the full repo state
Run in parallel:
git status --porcelain # NEVER with -uall (memory issues on large repos) — the
# "normal" (default) mode already lists every untracked file
git --no-pager diff # unstaged changes
git --no-pager diff --staged # changes already in the index (if the user ran `git add` beforehand)
git --no-pager log --format="%s%n%b" -10 # recent style/vocabulary of the repo
git branch --show-currentIf git status --porcelain returns nothing, report "No pending changes" and stop.
Treat staged + unstaged + untracked as a single set to partition — don't assume what's already in the index is a correct partition; it may be half-finished work from another session.
2. Inspect each changed file
For each path in git status --porcelain, look at its actual diff (git diff HEAD -- <path>
for tracked files; read the full file if it's new/untracked) before classifying it. Don't
decide the group or type based solely on extension or folder — the diff content is the
source of truth (a change in docs/ might actually document a fix and deserve to go in the
same commit as the fix, not in a separate "docs" commit).
3. Discard what shouldn't be committed
Before grouping, identify and exclude from any commit:
- Generated artifacts/runtime state: builds (
dist/,build/), logs, local databases (*.sqlite*), caches, tool captures/sessions (.playwright-mcp/,.DS_Store), state directories of locally-run instances (likedemo/configs/in this repo — each subfolder was the state of apubliteinstance spun up for testing, not source code). If they aren't already in.gitignore, propose adding them there (as part of achorecommit or the most related commit) instead of committing them. Never delete these files — just exclude them from staging. - Possible secrets: an ungitignored
.env,*.pem,*.key,credentials.json, hardcoded tokens visible in the diff. If something like this appears, stop and ask the user instead of deciding on your own — don't include the file in any commit until they confirm. - If something is ambiguous (is it a legitimate test fixture or a generated file?), don't guess — ask.
4. Group the rest into cohesive commits
Grouping criteria, in this order of priority:
- Logical cohesion first: files that only make sense together go together, even if they live in different folders (a fix + its test + the doc line documenting the invariant that fix enforces are a single commit, not three).
- Module/folder boundary next, when there's no obvious cross-coupling (e.g. a
demo/feature unrelated to asrc/core/fix are two separate commits). - If, within a single file, the diff visibly mixes two unrelated scopes (two unrelated
hunks), don't try to split by hunk (
git add -p) automatically — flag it to the user and ask how to separate it instead of guessing. - Never leave an intermediate commit deliberately broken: if one file renames a function and another updates all its call sites, they go in the same commit.
5. Infer the type for each group
| Type | Signal in the diff |
feat | New functionality visible to the user or system; rename of a known public API/name |
fix | Fixes an already-detected/reproduced bug |
perf | Reduces code or improves the performance of existing functionality, without adding new behavior |
refactor | Restructures code without changing observable behavior or the core domain APIs' names |
test | Adds or modifies tests (functional or performance) |
docs | User/integrator-facing documentation (README, docs/*, comments) — not agent-instruction files |
chore | Version bump, adding/updating a dependency, tooling config (Playwright, linters, local CI, editorconfig...), updating AGENTS.md/CLAUDE.md, adding or modifying the license |
build | Project build/packaging scripts |
ci | Code used only in the CI environment (GitHub Actions workflows, etc.) |
Notes:
AGENTS.md/CLAUDE.mdarechoreonly if the change is its own group. If the edit to that file directly documents the behavior of afix/featlanding in the same commit (like adding an invariant that explains the fix), follow the cohesion rule from step 4 and keep it with the code — don't force it into a separatechore.- Pick the most specific type that applies. If a group still mixes two clearly distinct types, that's a sign the grouping from step 4 was wrong — repartition it before continuing.
- The scope is the most representative subsystem/folder/component of the group (same
criterion as the
commit-messageskill: e.g.demo,core,cli,config). Omit it if the change is repo-wide.
6. Draft and validate each message
Same rules as the commit-message skill (format, imperative mood, repo's language, ≤72
characters per line, body explains the why). The message never carries a
Co-Authored-By trailer (see the template in step 8). Validate each message before
committing:
bash scripts/validate-commit-message.sh "<generated message>"If it fails, fix and re-validate. Never commit a message that didn't pass validation.
7. Present the plan before touching git
Show the user, in a single block, the proposed partition: for each future commit, its
type(scope): subject and the list of files it includes — and, if applicable, which files
you're excluding (generated/ambiguous) and what you'd add to .gitignore. This replaces
asking for permission step by step: show the full plan once, and if nothing is ambiguous or
risky (see step 3), proceed straight to execution.
8. Execute: one commit per group
For each group, in order (config/infra first, then fixes/refactors, then features, tests, and docs last — an order that helps readability of history, not a strict rule):
git add <file1> <file2> ... # NEVER `git add -A` or `git add .`
git commit -m "$(cat <<'EOF'
<type>(<scope>): <subject>
<optional body>
EOF
)"- Never
--amend, never--no-verify, never-c commit.gpgsign=false. - If a pre-commit hook fails, fix the issue and create a new commit — don't retry with
--amend. .gitignoreupdates to exclude artifacts detected in step 3 go in the correspondingchorecommit (or the most related commit if the gitignore entry arises from that same change), never on their own without context.
9. Verify
git status # should end up clean (nothing pending from the processed groups)
git log --oneline -<n> # confirm the n new commits, in orderDon't run git push: this skill's scope ends at leaving the commits created locally.
Pushing them is left to the user's judgment (or another skill/explicit instruction).
10. Report
Brief summary: how many commits were created, their type(scope): subject, and what was
left out (files excluded as generated/ambiguous, and whether anything was added to
.gitignore).
Partition example
Working tree with: a fix in src/core/store.ts + its test, a new feature in demo/, and
user docs in docs/:
1) fix(core): reject writes on a read-only secondary
src/core/store.ts, src/errors.ts, test/store.test.ts
2) feat(demo): spawn real instances from the instance launcher
demo/demo.ts, demo/public/components/instance-launcher.js
3) docs: document the read-only replica guard
docs/replication/README.md, docs/cli.md, docs/rest-api.mdEach one is committed and validated separately; pushing is out of this skill's scope.
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.

