git-guardrails-Codex

Block specified dangerous git commands in Codex via PreToolUse hooks.

1|Updated Jun 22, 2026
One-click install
npx skills add https://github.com/jchildree/The-QUESTION --skill git-guardrails-codex
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-guardrails-Codex
Source: https://github.com/jchildree/The-QUESTION/tree/main/.agents/skills/git-guardrails-claude-code
Command: npx skills add https://github.com/jchildree/The-QUESTION --skill git-guardrails-codex

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill ensures safety by blocking dangerous git commands before they are executed, preventing destructive operations in Codex.

Core Features & Use Cases

  • Git Command Blocking: Prevents destructive git commands such as push, reset --hard, clean, and branch -D.
  • Scope Selection: Offers installation options for project-specific or global settings.
  • Customization: Allows customization of the blocked command patterns.
  • Use Case: When working in a collaborative environment, this Skill helps maintain code integrity and prevent accidental damage.

Quick Start

Run 'git-guardrails setup' to install the hook for blocking dangerous git commands.

Frequently Asked Questions about git-guardrails-Codex

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

FAQPage Schema
How do I block dangerous git commands like push, reset --hard, and clean in Codex?

To block dangerous git commands in Codex, you can configure PreToolUse hooks to intercept and prevent execution of operations like push, reset --hard, and clean before they run.

Can I prevent destructive git operations in a shared development environment?

Yes, blocking destructive git operations protects code integrity in shared development environments by intercepting commands like branch -D and clean before execution.

How do I set up git command blocking for a specific project versus globally?

You can set up git command blocking with scope selection options, allowing you to install PreToolUse hooks either project-specific or globally depending on your code management needs.

Are blocked git command patterns customizable?

Yes, the blocked git command patterns are fully customizable through optional script modifications, allowing you to specify exactly which dangerous git operations to intercept.

What is a PreToolUse hook for blocking git commands?

A PreToolUse hook is a configuration mechanism that intercepts git commands before execution, preventing destructive operations and enhancing safety during code management.