smart-commit
Skill3 starsChanged 8 days agoMITView on GitHub
Use when the user explicitly asks to group current working-tree diffs by business domain or purpose and create focused local commits, including staged and unstaged splits. Do not use for a generic commit request, diff inspection, status reporting, or history cleanup.
17 other projects use a version of this.
Adopted by
Most recently taken up by
- babs/skillstheir own version, first seen Nov 8, 2026
- claude-world/director-mode-litetheir own version, first seen Nov 1, 2026
- Phoebe-WD/claude-skillstheir own version, first seen Oct 25, 2026
- sinuxnet/skillstheir own version, first seen Oct 20, 2026
- pksarkar345/claude-skillstheir own version, first seen Oct 15, 2026
- sd0xdev/sd0x-dev-flowtheir own version, first seen Oct 8, 2026
Used with
Projects with it also use security-review.
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.
SentrySkillsecurity-review
Finds exploitable application security vulnerabilities in code changes. Use for Warden security scans, appsec review, OWASP-style checks, authentication or authorization bugs, injection, XSS, SSRF, path traversal, secrets, unsafe crypto, webhook verification, open redirects, or sensitive data exposure.
Also in 3 projects that use this
Other versions17 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 17
- rohitg00/pro-workflow★ 2.9ksame name
- sd0xdev/sd0x-dev-flow★ 192same name
- sd0xdev/sd0x-harness★ 192same name
- claude-world/director-mode-lite★ 80same name
- conectlens/lenserfight★ 18same name
- jackjin1997/ClawForge★ 12same name
- babs/skills★ 4same name
- AlanSyue/my-skills★ 2same name
- jindalAnuj/publish-skills★ 2same name
- themusecatcher/ai-coding-kit★ 2same name
7 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 repository34 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- analyze-projectSkill
- api-contract-strategySkill
- architecture-patternsSkill
- close-changeSkill
- design-changeSkill
- development-standardsSkill
- docker-multiarch-buildSkill
- error-patternsSkill
- go-guidelinesSkill
- herdr-implementSkill
- implement-changeSkill
- logging-standardsSkill
- lua-guidelinesSkill
- organize-docsSkill
- output-stylesSkill
- plan-changeSkill
- powershell-guidelinesSkill
- python-guidelinesSkill
- review-changeSkill
- review-designSkill
- review-implementationSkill
- review-planSkill
- routeros-scripting-guidelinesSkill
- runtime-diagnosisSkill
- security-guardrailsSkill
- shell-guidelinesSkill
- skill-authoringSkill
- skill-minerSkill
- skills-routingSkill
- sops-age-guardrailsSkill
- sync-truthSkill
- testing-strategySkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 6 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 15 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 27
Run every Git command as git -C "$TARGET_REPO" ....
- Distinctive: line 28
Never use the plugin repository as the implicit target repository just because this skill file is loaded from there.
- Very specific: line 30
If the resolved TARGET_REPO conflicts with the user's stated path, stop before running git log, git diff, git add, or git commit.
- Distinctive: line 44
When all four checks are empty, report a no-op and stop.
- Distinctive: line 54
Read the diffs, then group files by business purpose:
- Distinctive: line 58
Keep each commit atomic and independently meaningful, with pure refactoring separate from behavioral changes.
- Distinctive: line 61
Write each message in the repository's own commit-message convention, as seen in recent git log.
- Distinctive: line 76
After each commit, confirm its recorded tree holds only that group's paths, and stop and report if a commit fails:
“Common” is measured: kept by at least 6 in 10 of the 15 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
Smart Commit
Group the current working-tree changes by business purpose and create focused local commits when the request combines semantic grouping with local commit creation.
Scope
This skill covers change analysis through commit execution. It creates new local commits and commits eligible changes without a confirmation gate; reorganizing or squashing existing commits is a history rewrite that needs the user's explicit rewrite authority.
Push authority comes only from the user's own instruction, and a commit request does not grant it. Run Git with its default safety checks, hooks included.
Target Repository Binding
Bind the target repository before any Git inspection or write. The target repository is the Git root for the user's invocation working directory, an explicit user-supplied repository path, or a checkout the current task already resolved and verified as its target, such as its own worktree. For an explicit or task-resolved path, resolve TARGET_REPO from that path instead of the invocation directory.
INVOCATION_CWD="$(pwd -P)"
TARGET_REPO="$(git -C "$INVOCATION_CWD" rev-parse --show-toplevel)"
printf 'Target repository: %s\n' "$TARGET_REPO"Rules:
- Run every Git command as
git -C "$TARGET_REPO" .... - Never use the plugin repository as the implicit target repository just because this skill file is loaded from there.
- The plugin repository is a valid target only when the invocation working directory resolves to it or the user explicitly selects it.
- If the resolved
TARGET_REPOconflicts with the user's stated path, stop before runninggit log,git diff,git add, orgit commit.
Workflow
Phase 1: Collect And Exclude
git -C "$TARGET_REPO" rev-parse --git-dir # validate repository
git -C "$TARGET_REPO" status --short # all changes overview
git -C "$TARGET_REPO" diff --cached --name-status # staged changes
git -C "$TARGET_REPO" diff --name-status # unstaged changes
git -C "$TARGET_REPO" ls-files --others --exclude-standard # untracked filesWhen all four checks are empty, report a no-op and stop. Read file contents when needed to decide whether a file belongs in a commit.
Exclude files that should not be versioned: secrets and credentials, foreign or unowned generated output and caches, large binaries, temporary files, user-specific IDE config, and lock files with no source change. Include intentionally tracked generated deliverables with the group whose source change produces or requires them. Add only files that .gitignore does not match. Read references/exclusion-criteria.md when an untracked, tracked-generated or ambiguous file is present.
Commit ordinary eligible changes directly. Stop and ask the user before any commit only when Git is already tracking or staging content that appears unsafe to version: a tracked or staged file that appears to contain secrets, credentials, local machine state, foreign generated output, temporary logs or personal IDE settings, or a safe path that requires removing a tracked file from Git or changing .gitignore. Untracked excluded files stay untracked while the run continues.
List each excluded file with its path and reason.
Phase 2: Semantic Grouping
Read the diffs, then group files by business purpose:
- Changes that serve the same business goal belong together: files modified together for a feature or fix, shared module boundaries, configuration that accompanies code, documentation paired with the code it describes, tests with the code they test.
- Order groups by dependency; for example, schema changes come before the code that uses them.
- Keep each commit atomic and independently meaningful, with pure refactoring separate from behavioral changes.
- A single logical group yields one commit.
Write each message in the repository's own commit-message convention, as seen in recent git log. Without one, use an imperative subject of about 50 characters, a blank line, and an optional body wrapped near 72 characters.
Phase 3: Present Plan And Execute
Show each commit group with its message and files, plus the excluded files and reasons; a single group needs only its message and files. Then execute each eligible group in sequence without waiting for confirmation:
# For each group: register new untracked files so the pathspec can match them,
# then commit only that group's paths with a trailing pathspec.
git -C "$TARGET_REPO" add -- <file1> <file2> ...
git -C "$TARGET_REPO" commit -m "<message>" -- <file1> <file2> ...The trailing -- <paths> scopes the commit: Git records the current working-tree content of exactly those paths and leaves staged changes to every other path staged. The preceding add only makes new untracked files known to Git. Commit each group this way; references/split-and-merge-cases.md covers the exceptions.
After each commit, confirm its recorded tree holds only that group's paths, and stop and report if a commit fails:
git -C "$TARGET_REPO" show --stat --oneline HEAD
git -C "$TARGET_REPO" show --name-only --format="" HEADWhen the user asked for only some groups, commit only those and leave the rest uncommitted and visible in the working tree. When some files are already staged, include them in the plan, note the pre-existing staging, and let each path-scoped commit carry only its own group. When merge conflicts are present, stop and ask the user to resolve them first. When all files are excluded, present the exclusion list and explain why nothing remains.
Finish with git -C "$TARGET_REPO" log --oneline -<N> to show the results.
References
references/exclusion-criteria.md: classifying an untracked, tracked-generated or ambiguous file.references/split-and-merge-cases.md: two groups sharing one file, a hunk-level split, partial staging, orMERGE_HEADpresent.references/amend-and-unpushed-context.md: the user mentions amend or squash, or the branch is ahead of its upstream.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

