guard

Block Git commit and push operations until explicit user permission is granted.

Updated Mar 9, 2026
One-click install
npx skills add https://github.com/VoDmAl/ai-dev-plugins --skill guard-vodmal
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/VoDmAl/ai-dev-plugins/tree/main/plugins/vdm-git/skills/guard
Command: npx skills add https://github.com/VoDmAl/ai-dev-plugins --skill guard-vodmal

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires scripts/git-guard-hook.py, and includes scripts (resource) components.

What problem does it solve?

This Skill prevents accidental or unauthorized modifications to your project's Git history and remote repositories by requiring explicit user confirmation before critical operations like committing and pushing.

Core Features & Use Cases

  • Commit & Push Protection: Blocks git commit and git push operations by default.
  • Commit Message Enforcement: Guides users to follow a specific commit message format (prefix + short imperative sentence).
  • Pre-Commit Review: Provides a detailed status report of staged changes, diff statistics, and recent commit history before allowing a commit.
  • Use Case: Ensure all code changes are reviewed and properly documented before being pushed to the main branch, preventing accidental data loss or introduction of bugs.

Quick Start

Run a pre-commit review using the guard skill.

Frequently Asked Questions about guard

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

FAQPage Schema
How do I prevent accidental git push operations to remote repositories?

Preventing accidental git push operations requires blocking push commands until explicit user permission is granted. This skill intercepts git push through a pre-tool-use hook script, ensuring critical remote modifications require manual confirmation before proceeding.

How do I enforce a strict commit message format in my workflow?

Enforcing a strict commit message format is done by validating commit messages against a defined structure using a prefix and short imperative sentence. The hook script blocks any commit operations that fail to match this required formatting pattern.

Can I review staged changes and branch diff stats before committing?

Reviewing staged changes and branch diff stats before committing is supported through a detailed pre-commit review. The skill generates a status report containing diff statistics and recent commit history before allowing the commit operation to proceed.

Does this git workflow protection work with standard commit and push commands?

This git workflow protection works with standard commit and push commands by intercepting them via a Python hook script. It operates directly on git commands, blocking execution until explicit user permission is granted.

How does a pre-tool-use hook script intercept git commands?

A pre-tool-use hook script intercepts git commands by acting as an executable layer between the user input and the git execution. It blocks commit and push operations by default, performing validation and requiring explicit permission before allowing the command to run.