git-guardrails

Block destructive git operations with pre-commit and pre-push hooks.

Updated Mar 28, 2026
One-click install
npx skills add https://github.com/zaeem-rafiq/tatheer-swift-sdk --skill git-guardrails-zaeem-rafiq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-guardrails
Source: https://github.com/zaeem-rafiq/tatheer-swift-sdk/tree/main/.claude/skills/dev-workflow/git-guardrails
Command: npx skills add https://github.com/zaeem-rafiq/tatheer-swift-sdk --skill git-guardrails-zaeem-rafiq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill sets up safety hooks that block destructive git operations in AI-assisted coding environments, preventing accidental pushes, force-pushes, and exposure of sensitive files.

Core Features & Use Cases

  • Pre-commit and pre-push hooks to block dangerous commands on protected branches.
  • Detection of sensitive patterns and large files with warnings (configurable).
  • Portable setup guidance to integrate with existing CI/CD and developer workflows.

Quick Start

Install the git guardrails hooks in your repository and verify that destructive git commands are blocked on test branches.

Frequently Asked Questions about git-guardrails

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

FAQPage Schema
How do I prevent force-pushes and accidental commits to main branches in automated coding environments?

Git hooks block destructive operations by intercepting commands before they execute, preventing automated agents from exposing sensitive files or force-pushing to protected branches.

How do I set up pre-commit hooks to detect sensitive patterns and large files?

Set up pre-commit hooks by installing configurable safety checks in your repository that scan for sensitive patterns and large files, issuing warnings before automated agents can commit them.

Can I integrate git hooks with existing CI/CD pipelines and developer workflows?

Yes, git hooks can be integrated with existing CI/CD pipelines using portable setup guidance that ensures the safety checks function across different developer environments and automated workflows.

What is the best way to protect sensitive data from automated git commands?

The best way to protect sensitive data is deploying pre-commit and pre-push hooks with customizable patterns that automatically detect and block exposure of sensitive files during automated git operations.

Do I need to configure git hooks separately for each repository to block destructive operations?

No, you can use portable installation guidance to apply customizable git safety hooks across multiple projects, ensuring consistent protection against destructive operations without configuring each repository individually.