Skip to content
Back to skills

Git Safety

ASecurity

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.

  • 14,318 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 11, 2026
developmentgit

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add tamagui/tamagui --skill git-safety --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Git Safety?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Git Safety
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tamagui-git-safety/badge)](https://www.skillsdirectory.com/skills/tamagui-git-safety)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.