Skill / mattpocock

Git Guardrails Claude Code Codex Skill

Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent…

Docs reviewedChecked 2026-09-21Runtime not tested

What it adds

Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent…

code and repositories

Get set up

  1. Run the install command below and pick Codex when the CLI asks which agent to install for.
  2. Start a new Codex thread so the skill loads.
npx skills add https://github.com/mattpocock/skills --skill git-guardrails-claude-code
Review before running
Read the installation source

Before you install

  • Node.js, to run the skills CLI

Compatibility & limitations

SKILL.md format, readable by Codex

Cursor: SKILL.md format; not tested in Cursor.

    This listing is based on source documentation. We have not installed or runtime-tested this asset.

    Sources & provenance

    Reviewed 2026-09-21. Source revision: main (mutable; commit not pinned).