git-guardrails-Codex

Block dangerous git commands before execution in Codex projects.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill prevents destructive git commands from executing, reducing the risk of accidental data loss or system corruption.

Core Features & Use Cases

  • Prevent Destructive Commands: Blocks commands like git push --force, git reset --hard, and git clean before they can cause harm.
  • Git Safety Hooks: Adds a layer of safety to git operations, especially useful in Codex projects.
  • Customization: Allows users to add or remove patterns from the blocked list based on their needs.

Quick Start

Use the git-guardrails-Codex skill to block dangerous git commands in your project.

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 force push before they execute?

You can block dangerous git commands by applying customizable safety hooks that intercept operations like git push --force and git reset --hard before execution, preventing accidental data loss or system corruption in your projects.

What destructive git operations should I prevent from running automatically?

Destructive git operations include git push --force, git reset --hard, and git clean, which can cause irreversible data loss or system corruption if executed accidentally without proper safety guardrails.

Can I customize which git commands are blocked in my Codex projects?

Yes, you can customize the blocked command patterns by modifying the JSON settings configuration, allowing you to add or remove specific git command patterns from the block list based on your project requirements.

Do I need bash and jq to run git safety hooks in Codex?

Yes, you need bash for script execution and jq for JSON settings configuration to run git safety hooks, as the guardrail scripts rely on bash to intercept commands and jq to parse configuration patterns.

What's the best way to prevent accidental data loss from git reset hard?

The best way to prevent accidental data loss from git reset --hard is to implement pre-execution git hooks that block destructive commands before they run, adding a safety layer to your git operations workflow.