Git Safety Validator

•
56
•

Prevents accidental data loss by validating Git history-rewriting operations and protecting mission-critical branches.

The Validate Git Safety skill serves as a critical safeguard for developers and AI agents performing high-risk Git operations. It automatically identifies protected branches—such as main, master, and version-specific patterns (e.g., v1, v13)—and blocks dangerous commands that utilize destructive flags like --all or --branches. By enforcing worktree verification and mandating backup creation before any history-rewriting occurs, this skill ensures that repository integrity is maintained even during complex rebases, resets, or filter-branch operations.

Características Principales

0156 GitHub stars
02Automated blocking of dangerous global flags like --all and --branches
03Automatic backup branch creation before history-rewriting operations
04Protected branch detection for main and versioned releases
05Mandatory worktree verification to prevent main workspace corruption
06Safe alternative command suggestions for common Git tasks

Casos de Uso

01Verifying safety before running git filter-branch to remove secrets
02Protecting legacy version branches from accidental force-pushes
03Ensuring CAT task execution remains isolated in dedicated worktrees