git-safety
/git-safety
Git safety rules. INVOKE WHEN: git push, force push, git reset, git clean, destructive git, push force, reset hard. NEVER force push or do destructive git operations.
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Git safety rules. INVOKE WHEN: git push, force push, git reset, git clean, destructive git, push force, reset hard. NEVER force push or do destructive git operations.
Original author description
Git safety rules. INVOKE WHEN: git push, force push, git reset, git clean, destructive git, push force, reset hard. NEVER force push or do destructive git operations.
How it works
- rules
- forbidden commands
- safe alternatives
- workflow
SKILL.md preview
--- name: git-safety description: Git safety rules. INVOKE WHEN: git push, force push, git reset, git clean, destructive git, push force, reset hard. NEVER force push or do destructive git operations. --- # git safety rules for git operations in this repo. ## rules - NEVER force push (`git push --force` or `git push -f`) - NEVER `git reset --hard` without explicit permission - NEVER `git clean -fd` without explicit permission - prefer `git stash` over `git reset` - always `git pull` before `git push` ## forbidden commands these require EXPLICIT user permission: - `git push --force` - `git push -f` - `git push --force-with-lease` - `git reset --hard` - `git clean -fd` - `git checkout -- .` (discards all changes) ## safe alternatives instead of `git reset --hard`: - `git stash` to save changes - `git stash pop` to restore instead of force push: - `git pull --rebase` then normal push - ask user how to resolve conflicts ## workflow 1. `git pull` before making changes 2. make changes 3. `git add` relevant files 4. `git commit` 5. `git pull` again before push 6. `git push` (no force flags)
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · tamagui/tamagui | 90 | MIT |
| waynesutton/builder-skills | 100 | Apache-2.0 |
Database snapshot: 13.11.2026 · package version 71e4bf2db68d (SHA-256 digest of the entire package)
Downloads in the last 30 days: 1 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100git-guard
Ask before a destructive git write and summarize the diff first. Use before git push --force, git push --force-with-lease, push or amend of main, master, or release/*, git push --delete, git push origin :branch, git reset --hard, git clean -fdx, git filter-repo, git remote… - 100git-guardrails
Install a hook that blocks destructive git commands before an AI agent runs them. Use when an agent force-pushed or ran reset --hard, when adding git safety hooks, or when protecting main from agent pushes. - 100git-guardrails-claude-code
Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push/reset in Claude Code. - 95git-guardrails-claude-code
Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push/reset in Claude Code. - 100git-guardrails
Install a hook, for one project or for every project, that blocks destructive git commands before an agent runs them: git push, force push, reset --hard, clean -f, branch -D, checkout . and restore . Claude Code's PreToolUse hook is the worked example. Use when the user wants to… - 100git-workflow
Writes commit messages, manages branches, and opens pull requests with summaries. Use when the user asks to commit, push, branch, or create a PR, and before any destructive git operation such as reset, rebase, or force-push.