git-safety
v1.0.0Branch-aware git guardrails for Claude Code. A PreToolUse hook on Bash that denies destructive git and gh CLI operations before they run: pushing to main/master, deleting protected branches, commit/merge/rebase/reset/push while on a protected branch, and gh pr merge/close, issue close, release delete, repo delete. Three safety levels (critical/high/strict) selectable via HOOK_SAFETY_LEVEL; every block is logged.
By Karan BansalLicense: MIT533 GitHub starsUpdated 2 weeks ago
Directory evidence
- Runtimes
- Claude Code
- Parsed components
- 0 skill or MCP entries
- Source updated
- Oct 4, 2026
- Manifest status
- Canonical path parsed
The directory validates manifest shape and source location. It does not execute the plugin or provide a security endorsement. Review the indexing methodology →
Install git-safety for Claude Code
claude plugin marketplace add IchenDEV/agent-plugin-mkt
claude plugin marketplace update agent-plugin-marketplace
claude plugin install git-safety-11@agent-plugin-marketplacePaste and run these commands in a terminal with Claude Code. They add and refresh the PluginsMP catalog, then install this plugin.
The installer fetches third-party code from the source repository shown on this page. This directory validates manifest structure and source location, but does not perform a security audit; review the manifest, components, and source before installing.
Get the source manually
git clone https://github.com/karanb192/claude-code-hooksClone the source repository, then follow its setup instructions to add the plugin to a compatible client. The plugin root is plugins/git-safety/.
Plugin files
└── .claude-plugin/plugin.json
Plugin manifests1
{
"name": "git-safety",
"description": "Branch-aware git guardrails for Claude Code. A PreToolUse hook on Bash that denies destructive git and gh CLI operations before they run: pushing to main/master, deleting protected branches, commit/merge/rebase/reset/push while on a protected branch, and gh pr merge/close, issue close, release delete, repo delete. Three safety levels (critical/high/strict) selectable via HOOK_SAFETY_LEVEL; every block is logged.",
"version": "1.0.0",
"author": {
"name": "Karan Bansal",
"url": "https://github.com/karanb192"
},
"homepage": "https://github.com/karanb192/claude-code-hooks",
"license": "MIT",
"keywords": [
"claude-code",
"hooks",
"git",
"github",
"safety",
"guardrails",
"pretooluse"
]
}For maintainers
If you maintain this plugin, link to this source-backed listing from your README so users can review its manifest and indexed components.
[git-safety on Agent Plugins Marketplace](https://pluginsmp.com/plugins/git-safety-11)