git-safety
Safety rules and protocols for handling Git operations to prevent data loss.
Install
mkdir -p .claude/skills/git-safety && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/915" && unzip -o skill.zip -d .claude/skills/git-safety && rm skill.zipInstalls to .claude/skills/git-safety
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
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.Key capabilities
- →Enforce safe Git push workflows
- →Prevent destructive history changes
- →Provide safe alternatives to resets
- →Manage merge conflicts safely
How it works
The skill mandates a strict workflow that prioritizes pulling before pushing and using stashing instead of hard resets to maintain repository history integrity.
Inputs & outputs
When to use git-safety
- →Safely recover from merge conflicts
- →Sync local branch with remote repository
- →Stash work instead of resetting
- →Follow safe push-pull workflow
About this skill
git safety
rules for git operations in this repo.
rules
- NEVER force push (
git push --forceorgit push -f) - NEVER
git reset --hardwithout explicit permission - NEVER
git clean -fdwithout explicit permission - prefer
git stashovergit reset - always
git pullbeforegit push
forbidden commands
these require EXPLICIT user permission:
git push --forcegit push -fgit push --force-with-leasegit reset --hardgit clean -fdgit checkout -- .(discards all changes)
safe alternatives
instead of git reset --hard:
git stashto save changesgit stash popto restore
instead of force push:
git pull --rebasethen normal push- ask user how to resolve conflicts
workflow
git pullbefore making changes- make changes
git addrelevant filesgit commitgit pullagain before pushgit push(no force flags)
When not to use it
- →Performing force pushes without explicit permission
- →Executing destructive commands on shared branches
Limitations
- →Requires explicit permission for forbidden commands
- →Strict adherence to workflow rules
How it compares
It explicitly forbids destructive commands and provides safer alternatives to prevent accidental data loss or history corruption.
Compared to similar skills
git-safety side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| git-safety (this skill) | 3 | 6mo | No flags | Beginner |
| resolve-conflicts | 81 | 8mo | Review | Intermediate |
| dependency-upgrade | 26 | 5mo | Review | Intermediate |
| openspec-onboard | 10 | 6mo | Review | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by tamagui
View all by tamagui →You might also like
resolve-conflicts
antinomyhq
Use this skill immediately when the user mentions merge conflicts that need to be resolved. Do not attempt to resolve conflicts directly - invoke this skill first. This skill specializes in providing a structured framework for merging imports, tests, lock files (regeneration), configuration files, and handling deleted-but-modified files with backup and analysis.
dependency-upgrade
wshobson
Manage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing. Use when upgrading framework versions, updating major dependencies, or managing breaking changes in libraries.
openspec-onboard
studyzy
Guided onboarding for OpenSpec - walk through a complete workflow cycle with narration and real codebase work.
codex-cli-bridge
alirezarezvani
Bridge between Claude Code and OpenAI Codex CLI - generates AGENTS.md from CLAUDE.md, provides Codex CLI execution helpers, and enables seamless interoperability between both tools
skill-sync
KyleKing
Syncs Claude Skills with other AI coding tools like Cursor, Copilot, and Codeium by creating cross-references and shared knowledge bases. Invoke when user wants to leverage skills across multiple tools or create unified AI context.
git-commits
bonny
Create well-structured git commits in logical chunks following best practices