command-guard
CommunityBlock destructive commands before they run
Software Engineering#claude code#bash safety#database safety#git protection#pretooluse hook#command guard
AuthorJKHeadley
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill protects Claude Code projects from accidental data loss, broken Git history, and credential leaks by blocking dangerous shell commands before they execute.
Core Features & Use Cases
- Pre-execution command filtering: Intercepts Bash tool calls and stops risky operations like destructive file deletion, force pushes, hard resets, and database drops.
- Security-focused guardrails: Helps teams enforce safer agent behavior when working with repositories, local environments, and production-like data.
- Customizable policies: Lets you extend the blocklist for project-specific rules such as protected branches, sensitive config files, or deployment restrictions.
- Use case: A developer asks Claude Code to clean a directory or update Git history, and the hook blocks the command until the action is explicitly reviewed.
Quick Start
Ask Claude Code to install the command-guard hook in your project so dangerous Bash commands are blocked before they can run.
Dependency Matrix
Required Modules
None requiredComponents
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: command-guard Download link: https://github.com/JKHeadley/instar/archive/main.zip#command-guard Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 536,000+ vetted skills library on demand.