Git Protection
Plugin Verified ActiveGit safety hooks for Claude Code. Blocks force-push, protects main/master branch, prevents hard-reset, guards interactive rebase, and blocks git clean -fd.
To enhance the safety and reliability of AI-driven Git operations by preventing accidental data loss and code corruption.
Features
- Blocks force-pushing to Git repositories
- Protects main and master branches from direct pushes
- Prevents irreversible Git resets
- Guards against accidental deletion of untracked files with `git clean -fd`
Use Cases
- Use when employing AI agents for Git operations to prevent data loss.
- Use to enforce safer Git workflows in team environments.
- Use to protect critical branches from accidental overwrites.
Non-Goals
- Managing Git repositories beyond safety checks.
- Providing AI-assisted Git command generation.
Documentation
- info:Configuration & parameter referenceThe README mentions configuration variables for hooks like `CC_ALLOW_DESTRUCTIVE`, `CC_PROTECT_BRANCHES`, and `CC_SECRET_PATTERNS`, but a detailed reference with explicit defaults and precedence order is missing.
Execution
- info:ValidationThe hook scripts use `jq` for parsing input and basic string matching (grep) for validation, but lack a formal schema library for robust parameter validation.
Invocation
- info:Hooks-off mechanismThere is no explicit 'hooks-off' mechanism documented or provided in the plugin. Users would need to uninstall the plugin to disable hooks.
Installation
First, add the marketplace
/plugin marketplace add yurukusa/cc-safe-setup/plugin install git-protection@cc-safe-setupQuality Score
VerifiedTrust Signals
Similar Extensions
Cc Safe Setup
99734 safety hooks for Claude Code — prevent file deletion, credential leaks, git disasters, and token waste during autonomous AI coding sessions
Claude Code Hooks
99Production safety hooks for autonomous Claude Code operation. Context monitoring, syntax checking, branch protection, activity logging, and more.
Hooks Safety
99Essential safety hooks to prevent destructive operations in Claude Code. From cc-safe-setup (655+ hooks).
Worktrunk
99Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows. This plugin provides configuration guidance (LLM commit messages, project hooks, worktree paths) and automatic activity tracking (🤖/💬 indicators in `wt list` showing active Claude sessions).
Tdd
99TDD workflow enforcement with auto-test hook
Claude Recap
99Topic-based automatic memory for Claude Code — never lose context across sessions or compactions.