commit
Skill1 starsChanged 27 days agoMITView on GitHub
Runs the pre-commit procedure for Git work, reviewing branch, staged and unstaged changes, untracked files, secrets, .gitignore, and generated artifacts before writing a message that explains the change and why, and defining identity confirmation and secret-in-history recovery. Use before any git commit, when staging files, when a commit mixes concerns, or when a credential may already be in history.
- Reads credentials
- Deletes or force-pushes
- Commits and pushes
188 other projects use a version of this.
Adopted by
Most recently taken up by
- daledesilva/obsidian_inktheir own version, first seen Nov 9, 2026
- thoughtbot/rails-consultanttheir own version, first seen Nov 8, 2026
- pedrohcgs/claude-code-my-workflowtheir own version, first seen Nov 8, 2026
- jisuzzzz/haechitheir own version, first seen Nov 8, 2026
- dirien/yet-another-agent-harnesstheir own version, first seen Nov 8, 2026
- denysdovhan/skillstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use validate-plan, act-on-feedback 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.
shawn-dumasSkillvalidate-plan
Validate an orchestration plan after pre-flight certification. Runs adversarial review, deep review (verify prompt data against codebase), and PoC gate for risky approaches. Auto-invoked by orchestrate-* skills at Step 8.
Also in 5 projects that use this
MicrosoftSkillact-on-feedback
Act on user feedback attached to the current session. Use when the user submits feedback on the session's changes via the Submit Feedback button.
Also in 3 projects that use this
decocmsSkilladd-mcp-tools
Guide for adding new MCP tools with consistent patterns for schemas, tool definitions, registry updates, and Better Auth integration
Also in 3 projects that use this
MicrosoftSkillgenerate-run-commands
Generate or modify run commands for the current session. Use when the user wants to set up or update run commands that appear in the session's Run button.
Also in 3 projects that use this
mitsuhikoSkilloebb-scotty
Austrian rail travel planner (ÖBB Scotty). Use when planning train journeys in Austria, checking departures/arrivals at stations, or looking for service disruptions. Covers ÖBB trains, S-Bahn, regional trains, and connections to neighboring countries.
Also in 3 projects that use this
mitsuhikoSkillpi-share
Load and parse session transcripts from shittycodingagent.ai/buildwithpi.ai/buildwithpi.com/pi.dev (pi-share) URLs. Fetches gists, decodes embedded session data, and extracts conversation history.
Also in 3 projects that use this
Other versions188 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 188
- microsoft/vscode★ 195ksame name
- TryGhost/Ghost★ 56ksame name
- ToolJet/ToolJet★ 41ksame name
- ShareX/ShareX★ 41ksame name
- openai/symphony★ 27ksame name
- ccusage/ccusage★ 19ksame name
- ryoppippi/ccusage★ 19ksame name
- windmill-labs/windmill★ 18ksame name
- EverMind-AI/EverMemOS★ 14ksame name
- EverMind-AI/EverOS★ 14ksame name
178 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 repository12 other files it gives its agents.
- root-causeSkill
- bot-developmentSkill
- readmeSkill
- code-qualitySkill
- dependenciesSkill
- languagesSkill
- publishSkill
- project-memorySkill
- code-reviewSkill
- data-extractionSkill
- reviewSkill
- strategySkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 0 are common, 10 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 168 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
5
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
- Distinctive: line 18
Do not activate for read-only history inspection (git log, git show, git blame), for working-tree operations like git stash or git restore …
- Very specific: line 28
Confirm repository and branch: Run git rev-parse --is-inside-work-tree, git rev-parse --show-toplevel, and git branch --show-current.
- Distinctive: line 30
Review staged and unstaged changes separately: Run git diff --staged and git diff.
- Very specific: line 32
Scan for secrets before staging: Run uaf secrets over the repository or the specific paths and read the findings.
- Distinctive: line 34
Confirm generated artifacts and local config are not staged: Check the staged list for build output, unrelated lockfile churn, …
- Distinctive: line 35
Run the checks the change requires: Use the project's own commands: test runner, linter, type check, format check.
- Very specific: line 38
Stage explicitly: Add each reviewed file by path, for example git add src/parser.ts tests/parser.test.ts.
- Distinctive: line 50
Rotate and accept: when the value was already public or mirrored elsewhere: revoke the credential at its source, issue a replacement, and …
- Distinctive: line 56
After committing, run git show --stat HEAD and compare it to the staged diff you reviewed.
- Distinctive: line 57
Run git status --porcelain and confirm there is nothing left staged that was meant to be in this commit.
- Very specific: line 58
Run git log -1 --format='%an <%ae> %s' and confirm the author matches the identity the user confirmed and the subject matches the intended …
- Distinctive: line 66
No identity configured, or identity inherited only from global config: ask the user to confirm the name and email rather than proceeding.
- Distinctive: line 114
Do not print suspected secret values in the transcript, commit message, or notes.
- Very specific: line 115
Do not edit .git/config by hand to change remotes or identity.
- Distinctive: line 120
Prefer git status --porcelain and git diff --stat before any full diff.
“Common” is measured: kept by at least 6 in 10 of the 168 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
Purpose
A commit is a permanent, reviewable statement about a change. This skill runs the checks that belong before the commit so the commit contains exactly the intended work, carries an honest message, and leaks nothing. It also fixes how the author identity is established and what to do when a credential has already reached history.
When this activates
Activate when the user asks to commit, stage, or save changes; when a task ends with modified files in a repository; when uaf git --commit reports findings that need interpretation; or when a secret is found in a tracked, staged, or already-pushed file.
Do not activate for read-only history inspection (git log, git show, git blame), for working-tree operations like git stash or git restore on uncommitted work, or when the user only wants an existing diff explained.
Prerequisites
- A Git repository and a working
gitbinary, confirmed withgit rev-parse --is-inside-work-tree. - The project's own check entry points, read from its package scripts, Makefile, or CI config. Never substitute a generic command for the project's runner.
uaffor the automated preflight. If it is unavailable, run the same checks manually withgitand the project tooling; say that the preflight was not run.
Procedure
- Confirm repository and branch. Run
git rev-parse --is-inside-work-tree,git rev-parse --show-toplevel, andgit branch --show-current. An empty result orHEADmeans detached HEAD: a commit made there is unreachable from any branch. Create or switch to a branch first. - Read status in full.
git status --porcelain=v1lists staged, unstaged, and untracked entries. The commit will contain only the staged set, so note the three groups separately. - Review staged and unstaged changes separately. Run
git diff --stagedandgit diff. Reviewing only one hides the other: an earliergit addmay already sit in the index, and a partially staged file splits one change across two commits. - Inspect untracked files. List them and open every one you did not create. Untracked credential files, dumps, and scratch scripts are the most common accidental leak.
- Scan for secrets before staging. Run
uaf secretsover the repository or the specific paths and read the findings. Also flag values you noticed while reviewing: private keys, tokens, connection strings, and high-entropy literals. Never echo a suspected value into the transcript, even to explain it. - Review
.gitignore. Confirm it covers credential files (.env*), build output (dist/,build/,target/), dependency trees (node_modules/), editor state (.idea/,.vscode/), OS metadata (.DS_Store), and machine-local config. If a credential-bearing file is untracked and unignored, add the ignore entry in this same commit. - Confirm generated artifacts and local config are not staged. Check the staged list for build output, unrelated lockfile churn, machine-specific settings, caches, databases, and absolute local paths. Unstage anything that does not belong with
git restore --staged <path>and say why. - Run the checks the change requires. Use the project's own commands: test runner, linter, type check, format check. Run the tests that cover the changed code, not a single smoke command as a proxy. Report what actually ran and its real result.
- Confirm the staged set matches the intended task.
git diff --staged --stat, then the fullgit diff --staged. Every staged file must belong to this change. If the change mixes unrelated concerns, split it into separate commits with explicit staging instead of one vague message. - Establish the identity deliberately. Inspect
git config --local user.name,git config --local user.email, then the--globalequivalents for the same keys. State which one applies: a repository-local value wins; a value inherited only from global config belongs to every project on the machine and may be wrong here. Before the framework's first commit in a repository, ask the user to confirm the author name and email, and set them withgit config --local user.name "<name>"andgit config --local user.email "<email>". Never invent an identity and never modify global configuration without explicit authorization; prefer repository-local config. - Stage explicitly. Add each reviewed file by path, for example
git add src/parser.ts tests/parser.test.ts. Neithergit add .norgit add -Ais a default: both pick up whatever else changed in the tree since the review, including files you never inspected. - Re-inspect the staged diff, then commit. Run
git diff --stagedagain immediately beforegit commit, because the index is not a snapshot of your earlier review. Do not pass--no-verify,--no-gpg-sign, or any flag that disables a hook or a signature requirement. Do not create an empty commit unless the user explicitly asked for one. - Write the message. Subject: what changed, imperative mood, roughly 72 characters, no trailing period. Body: why the change was made, constraints or alternatives rejected, and any migration or follow-up a reader needs. If the only honest message is "various changes", the commit should have been split.
- Run the automated preflight.
uaf git --commitchecks for a detached HEAD, the identity scope, staged versus unstaged files, untracked and staged credential-bearing filenames, high-severity secret patterns in the index blobs that would actually be committed, staged build artifacts, a missing tracked.gitignore, and whether the repository has any commits yet. Resolve errors before committing; treat review-level findings as decisions, not noise.
Recovery when a secret has already entered history
Say this plainly: removing the value from the latest commit is insufficient. It stays in the object store, is reachable by SHA through reflogs and packs, and is served to anyone who clones, forks, or views the repository.
Options, in order of preference:
- Rewrite history with a reviewed plan:
git filter-repo(orfilter-branchwhen filter-repo is unavailable) over the affected paths, thengit push --force-with-leaseon branches the team has agreed to rewrite. Rewriting shared history invalidates every existing clone and open pull request, so it requires explicit authorization and coordination with everyone who has the branch. - Rotate and accept when the value was already public or mirrored elsewhere: revoke the credential at its source, issue a replacement, and record the exposure.
Rotation is required either way. A history rewrite removes the value from the repository; it does not make an already-leaked credential safe.
Verification
- After committing, run
git show --stat HEADand compare it to the staged diff you reviewed; they must match exactly. - Run
git status --porcelainand confirm there is nothing left staged that was meant to be in this commit. - Run
git log -1 --format='%an <%ae> %s'and confirm the author matches the identity the user confirmed and the subject matches the intended change. - Re-run
uaf git --commitafter staging and before committing; it should report no errors for the intended set. - Ground every test claim in the command you ran and its observed exit status. If a check was not run, say so.
Failure behavior
- A pre-commit hook rejects the commit: fix the underlying problem. Never re-run with
--no-verify; if the hook itself is wrong, raise that as a separate change with the user. - HEAD is detached: create a branch at the current commit before committing.
- No identity configured, or identity inherited only from global config: ask the user to confirm the name and email rather than proceeding.
- A secret is found in staged content: unstage the file, tell the user to rotate the credential, and apply the recovery procedure above. Do not commit and clean up later.
- Tests or lint fail: report the real failure and stop. Do not commit partially verified work or describe the failure as pre-existing without checking.
- The intended scope is ambiguous: ask which files belong, rather than staging everything and letting the user trim afterwards.
uafis missing: run the manual checks and state clearly that the preflight was skipped.
Anti-patterns
Staging everything and reviewing afterwards:
git add . # picks up .env, dist/, and a colleague's half-finished edit
git commit -m "updates"Stage from a reviewed list, and re-read the index before committing:
git add src/parser.ts tests/parser.test.ts
git diff --staged
git commit -m "parser: reject unterminated block comments
Previously the lexer consumed to EOF, turning a syntax error into a
silent truncated parse. Reported by the fuzz corpus."The explicit form keeps the commit equal to what was reviewed, and the message records the failure mode so the next reader does not reintroduce it.
Forcing a failing hook through:
git commit --no-verify -m "wip"The hook is the cheapest reviewer available. Fix the lint error, the missing test, or the secret it caught, then commit normally.
Rewriting a shared branch to tidy a message:
git push --force origin main # invalidates every clone and open PRAmending or rewriting shared history requires explicit authorization from the user, and coordinated agreement from anyone holding the branch. Local unpushed commits are a different case.
Security
- The index is what gets published. Scan the exactly-staged content, not only the working tree;
uaf git --commitreads the index blobs for this reason. - Credential files (
.env,id_rsa,.aws/credentials,.netrc,.npmrc,.git-credentials) must never be staged, and must appear in.gitignore. - Do not print suspected secret values in the transcript, commit message, or notes; a value repeated in output is a second exposure.
- Do not edit
.git/configby hand to change remotes or identity; usegit config --localso the change is reviewable and reversible. - Signed-commit and hook requirements exist for a reason; disabling them converts a review gate into an unreviewed publish step.
Token notes
- Prefer
git status --porcelainandgit diff --statbefore any full diff; read the full diff only for the paths in scope. uaf git --commit --jsonreturns a compact structured summary that is cheaper to reason over than pasting raw status output.- For a large diff, review it file by file and keep only the relevant hunks in context; do not re-read a diff you have already reviewed.
- Summarize test output as the command plus the failure lines, not the full log.
Known limitations
uaf secretsand any pattern scan produce false negatives; a clean scan is not evidence that no credential is present.- The tooling cannot know which of several plausible identities is the correct author; only the user can confirm that.
- Coordination with clones, forks, and mirrors outside this repository cannot be verified from here, so history-rewrite safety depends on the user's confirmation.
- Generated, minified, or binary diffs are effectively unreviewable; their safety depends on regenerating them from reviewed sources.
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.

