Skip to main content
EQ
Foundry
arrow_back Back to Browse

branch-guard

Verified

Pre-tool hook that blocks destructive git commands on protected branches

Installation

npx skills add mclaude95/eq-foundry -s branch-guard

Recommended — works with Claude Code, Cursor, and 40+ agents.

bolt

Performance

Optimized for speed with minimal overhead. Runs efficiently in CI and local environments.

shield

Security

Sandboxed execution with scoped permissions. No external data leaves your environment.

Overview

branch-guard is a pre-tool hook that intercepts git push --force, git reset --hard, and similar destructive commands when the current branch is main or another protected branch, requiring explicit confirmation.

When to Use

Install globally to protect all projects, or per-project for repos with strict branch protection requirements.

Usage Examples

Runs automatically before any Bash tool call that matches destructive git patterns.

Configuration

Configure protected branch names in .claude/settings.json under branchGuard.protectedBranches.

Installation

npx skills add mclaude95/eq-foundry -s branch-guard