mm-git-guardrails-claude-code

Block destructive git commands like push, reset, and clean.

1|Updated Apr 6, 2026
One-click install
npx skills add https://github.com/mikkeymoo/claude-solo --skill mm-git-guardrails-claude-code
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mm-git-guardrails-claude-code
Source: https://github.com/mikkeymoo/claude-solo/tree/main/mm-skills/mm-git-guardrails-claude-code
Command: npx skills add https://github.com/mikkeymoo/claude-solo --skill mm-git-guardrails-claude-code

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Prevents accidental destructive operations in git, like pushes, resets, and cleans, ensuring project integrity.

Core Features & Use Cases

  • Prevent Git Destructive Actions: Blocks commands that could harm the project.
  • Scope Selection: Can be installed at project or global levels.
  • Customizable Blocking: Allow customization of blocked commands.

Quick Start

Run 'install' to set up Git Guardrails and block dangerous git commands.

Frequently Asked Questions about mm-git-guardrails-claude-code

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I block destructive git commands like push, reset, and clean?

You block destructive git commands by installing git hooks that prevent push, reset, and clean from executing. This Skill configures those hooks to stop unintended data loss before operations run.

What is the best way to prevent accidental git push to a remote repository?

Preventing accidental git push is best handled by hook installation that intercepts the command. This Skill installs guardrails at your chosen scope to block dangerous pushes automatically.

Can I customize which git commands are blocked for project safety?

Yes, you can customize which git commands are blocked. The Skill allows you to specify the exact destructive actions to prevent, ensuring the guardrails match your project safety requirements.

Do I need to install git hooks globally or per project to prevent destructive actions?

You can install git hooks either globally or per project. The Skill supports scope selection so you can apply preventive measures across all repositories or restrict them to a single project.

Why should I use git hooks for project safety instead of manual checks?

Git hooks for project safety automate the prevention of destructive actions like reset and clean. Manual checks are prone to human error, whereas hooks enforce blocking rules consistently before commands execute.