git-safety-guard

Official

Block destructive commands before they wreck work.

Authorterraphim
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Blocks destructive git and filesystem commands before execution to protect uncommitted work.

Core Features & Use Cases

  • PreToolUse guard: Intercepts Bash commands and blocks dangerous operations using a safe allowlist of patterns.
  • CLI integration: terrraphim-agent guard provides runtime decision results for integration hooks.
  • Fail-open semantics: If the guard is unavailable or patterns fail, commands are allowed to avoid workflow disruption.

Quick Start

Install terraphim-agent from GitHub releases, then configure a PreToolUse Bash hook in your project. Copy the guard script to your repository at .claude/hooks/git_safety_guard.sh and reference it in .claude/settings.local.json: { "hooks": { "PreToolUse": [{ "matcher": "Bash", "hooks": [{ "type": "command", "command": ".claude/hooks/git_safety_guard.sh" }] }] } } Validate behavior by piping commands through terraphim-agent guard, e.g.: echo "git reset --hard" | terraphim-agent guard --json echo "git checkout -b feature" | terraphim-agent guard --json

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: git-safety-guard
Download link: https://github.com/terraphim/terraphim-skills/archive/main.zip#git-safety-guard

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.