git-safety
Skill0 starsChanged 4 months agoMITView on GitHub
Safe git commit workflow. Use when the user asks to create a commit, or before running git commit. Covers staging, message style, HEREDOC format, amend rules, and hook failures.
- Reads credentials
11 other projects use a version of this.
Adopted by
Most recently taken up by
- TrueImmortal82/open-code-skillstheir own version, first seen Nov 8, 2026
- Adham-Aly/quartermastertheir own version, first seen Nov 1, 2026
- Adham-Aly/implement-looptheir own version, first seen Nov 1, 2026
- haintbotast/coding-agent-instructionstheir own version, first seen Oct 25, 2026
- tamagui/tamaguitheir own version, first seen Oct 8, 2026
- Effulgent-Point/pawtheir own version, first seen Oct 8, 2026
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- tamagui/tamagui★ 14ksame name
- waynesutton/convexskills★ 405same name
- waynesutton/builder-skills★ 404same name
- genfeedai/genfeed.ai★ 4same name
- Effulgent-Point/paw★ 2same name
- Adham-Aly/implement-loop★ 1same name
- Adham-Aly/quartermaster★ 1same name
- shaunburdick/skills★ 1same name
- haintbotast/coding-agent-instructions★ 0same name
- kartykk/agent-ready★ 0same name
1 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 repository16 other files it gives its agents.
- answer-shapesSkill
- claim-verificationSkill
- create-prSkill
- findings-ledgerSkill
- invariant-auditSkill
- lossless-doc-compressSkill
- model-orchestrationSkill
- office-hoursSkill
- plan-reviewSkill
- prompt-caching-playbookSkill
- review-ratchetSkill
- spec-fidelity-reviewSkill
- staff-reviewSkill
- systematic-debuggingSkill
- test-adequacy-reviewSkill
- verification-before-completionSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 6 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
1
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 11
Only create commits when requested by the user.
- Very specific: line 25
Do not commit secrets (.env, credentials, etc.)
- Distinctive: line 41
NEVER: update git config
- Distinctive: line 48
Commit has not been pushed
- Distinctive: line 49
If commit failed or was rejected by hook — never amend.
- Distinctive: line 50
If already pushed — never amend unless user explicitly requests (needs force push)
- Distinctive: line 56
Commit with HEREDOC message
“Common” is measured: kept by at least 6 in 10 of the 11 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 safety
Only create commits when requested by the user. If unclear, ask first.
Before committing
Run in parallel:
git status— untracked filesgit diff— staged and unstaged changesgit log— recent messages for style
Message
- 1–2 sentences focused on why, not only what
- Match the repo's message convention (from
git log); default types if none: add / update / fix / refactor / test / docs - Do not commit secrets (
.env, credentials, etc.)
Commit command
Pass message via HEREDOC:
git commit -m "$(cat <<'EOF'
Commit message here.
EOF
)"Protocol
- NEVER update git config
- NEVER destructive commands (
push --force,hard reset, etc.) unless explicitly requested - NEVER skip hooks (
--no-verify,--no-gpg-sign) unless explicitly requested - NEVER force push to
main/master— warn if requested - Avoid
git commit --amendunless ALL:- User requested amend, OR commit succeeded but pre-commit hook modified files
- HEAD commit was created in this session by you
- Commit has not been pushed
- If commit failed or was rejected by hook — never amend; fix and new commit
- If already pushed — never amend unless user explicitly requests (needs force push)
- Do not push unless user asks
Sequence
- Stage relevant files
- Commit with HEREDOC message
git statusto verify
Hook failure
Fix the issue and create a new commit — do not amend a failed commit.
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.

