git-guardrails-claude-code

Block destructive Git and EF Core migration commands until explicit confirmation.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/amodelandme/skill-tree-dotnet --skill git-guardrails-claude-code-amodelandme
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-guardrails-claude-code
Source: https://github.com/amodelandme/skill-tree-dotnet/tree/main/.claude/skills/git-guardrails-claude-code
Command: npx skills add https://github.com/amodelandme/skill-tree-dotnet --skill git-guardrails-claude-code-amodelandme

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq, and includes scripts (resource) components.

What problem does it solve?

Guardrails for Claude Code that prevent an AI agent from running destructive git or EF Core migration commands without explicit confirmation, reducing risk in automated development workflows.

Core Features & Use Cases

  • Generates a CLAUDE.md guardrails block to clearly define prohibited commands and required approvals.
  • Includes a Bash script (scripts/block-dangerous-git.sh) that detects dangerous patterns and blocks execution.
  • Provides an install-and-use flow for new projects or agents with shell access to a .NET codebase, ensuring safety across setup and ongoing development.

Quick Start

Run this skill and paste the output block into the CLAUDE.md at the top under a Guardrails heading.

Frequently Asked Questions about git-guardrails-claude-code

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

FAQPage Schema
How do I prevent AI coding agents from running destructive git commands?

To prevent AI coding agents from running destructive git commands, you can use a guardrails script and a CLAUDE.md block that detect dangerous patterns and block execution unless explicitly approved. This ensures safe automated development operations.

Can I block unsafe EF Core migrations in a .NET workspace?

Yes, you can block unsafe EF Core migrations in a .NET workspace by applying a generated guardrails block and a Bash script that detect dangerous patterns, requiring explicit confirmation before any destructive migration execution.

How do I set up git guardrails for Claude Code?

To set up git guardrails for Claude Code, run the skill to generate a CLAUDE.md guardrails block, paste it at the top of your CLAUDE.md file under a Guardrails heading, and ensure the block-dangerous-git.sh script is active in your workspace.

Do I need jq to block dangerous git commands in my .NET project?

Yes, you need jq installed as a dependency to run the Bash script that detects and blocks destructive git and EF Core migration commands, ensuring your AI-assisted operations require explicit confirmation.

What specific commands do git guardrails block during AI-assisted development?

Git guardrails block destructive commands in Git and EF Core migrations by detecting dangerous patterns and preventing execution unless approved, reducing the risk of automated workflows running harmful operations in your repository.

When should I not use automated guardrails for AI coding safety?

You should anticipate limitations if your environment lacks shell access or does not use a .NET codebase, as these guardrails specifically target Git and EF Core migrations within automated development workflows requiring explicit confirmation.