git-guardrails-claude-code SKILL.md skillA

This file is byte-identical to the first copy the registry indexed, one of 6 indexed copies. Same content hash, so the same checks give both the same grade.

git-guardrails-claude-code from jacobstephens2/thirdshift is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add jacobstephens2/thirdshift/git-guardrails-claude-code@git:20260922.89a7f35

Pins git:20260922.89a7f35 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 17 of 17 checks passed
Kind
SKILL.md skill
Repository
jacobstephens2/thirdshift
Path
.agents/skills/git-guardrails-claude-code/SKILL.md
Versions recorded
1
Latest version
git:20260922.89a7f35, committed Sep 22, 2026
Size
2,313 bytes
Repository stars
3
License
MIT

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 destructive git operations, add git safety hooks, or block git push/reset in Claude Code.

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# Setup Git Guardrails

Sets up a PreToolUse hook that intercepts and blocks dangerous git commands before Claude executes them.

## What Gets Blocked

- `git push` (all variants including `--force`)
- `git reset --hard`
- `git clean -f` / `git clean -fd`
- `git branch -D`
- `git checkout .` / `git restore .`

When blocked, Claude sees a message telling it that it does not have authority to access these commands.

## Steps

### 1. Ask scope

Ask the user: install for **this project only** (`.claude/settings.json`) or **all projects** (`~/.claude/settings.json`)?

### 2. Copy the hook script

The bundled script is at: [scripts/block-dangerous-git.sh](scripts/block-dangerous-git.sh)

Copy it to the target location based on scope:

- **Project**: `.claude/hooks/block-dangerous-git.sh`
- **Global**: `~/.claude/hooks/block-dangerous-git.sh`

Make it executable with `chmod +x`.

### 3. Add hook to settings

Add to the appropriate settings file:

**Project** (`.claude/settings.json`):

```json
{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
…

Read the whole file at its exact version.

How to install

No tool to install first
claude plugin marketplace add https://markdownregistry.com/mp/a/art_ioz64ga7arxkuwkh/69b291d655626a01602b998a1836fcb93c058ede68dfafddfd71e87f17074764.json

Then /plugin install git-guardrails-claude-code@markdownregistry-ioz64ga7arxkuwkh in Claude Code. It installs git:20260922.89a7f35, the one graded A here, pinned to the commit it was graded at, and leaves it there.

The exact contents, by fingerprint
mdr add jacobstephens2/thirdshift/git-guardrails-claude-code@sha256:69b291d655626a01

The line at the top of this page pins the label git:20260922.89a7f35, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_ioz64ga7arxkuwkh.svg)](https://markdownregistry.com/a/art_ioz64ga7arxkuwkh)

1 badge image fetches in 30 days. What the badge shows.

Ask from your agent
claude mcp add --transport http markdownregistry https://markdownregistry.com/mcp/registry

Then ask it: what changed in jacobstephens2/thirdshift/git-guardrails-claude-code since the version I have? It reads every saved version here, no key and no account. Any agent that speaks MCP can add it.

Got a copy of git-guardrails-claude-code from somewhere else? Ask it: where did my git-guardrails-claude-code come from, and what was changed? It names the public original, the version yours is closest to and every changed line. The text is not kept.

Versions

The registry has recorded 1 version of this file, committed on Sep 22, 2026.

Watch this file (sign in, one email per new version)

versioncommittedcommitsizeaudit
git:20260922.89a7f35 latest2026-09-22 89a7f35 2,313 BA view

Copies

Copies in other repositories

2 files in 2 other repositories hold the exact bytes of one of this file's versions, each committed after this file had them: all of them hold the newest version.

A copy does not update when this file does. Whoever holds one can learn which version it is with the Check your copy box below, or by asking their agent. Matched on exact bytes and commit dates only.

Keep it current by itself, install once

Committed this skill to a repository? Install the markdownregistry skill updates app on it, or on all of them. When the registry saves a newer version, a pull request brings your copy to it within minutes, the newest version first, then what changed and any check it newly trips. A copy you edited is never touched, and nothing is deleted.

Install on GitHub

It asks to read and write contents and pull requests, and to read metadata. No workflow file, no Actions setting, nothing runs on your runners. Uninstall it and everything the registry kept about your repository is deleted.

Keep it current by itself

Committed this skill to a repository? Add one workflow file, and when a newer version is saved, a pull request brings your copy to it, the newest version first, then what changed and any check it newly trips. A copy you edited is never touched, and nothing is deleted.

mkdir -p .github/workflows && curl -fsSL https://markdownregistry.com/ci/skill-updates.yml -o .github/workflows/skill-updates.yml

It runs daily on GitHub Actions, no key and no account. Read the workflow before you add it.

Check a whole project

From the root of your project, one line hashes each installed skill's SKILL.md, your AGENTS.md and your CLAUDE.md, and asks the registry once. Only the fingerprints and paths are sent.

sha256sum .claude/skills/*/SKILL.md AGENTS.md CLAUDE.md | curl -s --data-binary @- https://markdownregistry.com/api/v1/check-copies

In CI, add --fail-with-body: the answer is 409 when any file is behind, so the step fails and still prints which files.

sha256sum .claude/skills/*/SKILL.md AGENTS.md CLAUDE.md | curl -s --fail-with-body --data-binary @- https://markdownregistry.com/api/v1/check-copies

No sha256sum on your machine? shasum -a 256 prints the same lines.

Audit of the latest version

A  17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (2313 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

jacobstephens2/thirdshift · 3 stars · license MIT · pushed 2026-11-19 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_ioz64ga7arxkuwkh
GET https://markdownregistry.com/api/v1/resolve?ref=jacobstephens2/thirdshift/git-guardrails-claude-code
GET https://markdownregistry.com/api/v1/blob/69b291d655626a01602b998a1836fcb93c058ede68dfafddfd71e87f17074764

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from jacobstephens2/thirdshift

ask-matt SKILL.md skill
jacobstephens2/thirdshift · .agents/skills/ask-matt/SKILL.md · Ask which skill or flow fits your situation. A router over the skills in this repo.
git:20261017.63e588d · audit A · 3 stars
chief-of-staff SKILL.md skill
jacobstephens2/thirdshift · .agents/skills/chief-of-staff/SKILL.md · Pursue a long-running goal in a single session by co-ordinating subagents.
git:20261021.1b27bed · audit A · 3 stars
claude-handoff SKILL.md skill
jacobstephens2/thirdshift · .agents/skills/claude-handoff/SKILL.md · Hand the current conversation off to a fresh background agent that picks up the work immediately.
git:20261007.b944bf7 · audit A · 3 stars
code-review SKILL.md skill
jacobstephens2/thirdshift · .agents/skills/code-review/SKILL.md · Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes: Standards (does the code…
git:20261017.63e588d · audit A · 3 stars
codebase-design SKILL.md skill
jacobstephens2/thirdshift · .agents/skills/codebase-design/SKILL.md · Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find…
git:20260922.89a7f35 · audit A · 3 stars
create-formal-verification-skill SKILL.md skill
jacobstephens2/thirdshift · .agents/skills/create-formal-verification-skill/SKILL.md · Create a project-local formal verification skill for a high-risk property that tests rarely reach.
git:20261022.b93e63a · audit A · 3 stars
diagnosing-bugs SKILL.md skill
jacobstephens2/thirdshift · .agents/skills/diagnosing-bugs/SKILL.md · Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports…
git:20261105.2c67812 · audit A · 3 stars
domain-modeling SKILL.md skill
jacobstephens2/thirdshift · .agents/skills/domain-modeling/SKILL.md · Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md…
git:20261005.a2afa36 · audit A · 3 stars
explainer-video SKILL.md skill
jacobstephens2/thirdshift · .agents/skills/explainer-video/SKILL.md · Make narrated, animated explainer videos. Use when the user wants an explainer, tutorial, demo, promo or…
git:20261020.18da59c · audit A · 3 stars
fleet-steward SKILL.md skill
jacobstephens2/thirdshift · .agents/skills/fleet-steward/SKILL.md · Tend a thirdshift fleet for one tick. Triage new failures, keep work flowing, and turn repeat problems into fixes.
git:20261117.05386e7 · audit A · 3 stars
grill-me SKILL.md skill
jacobstephens2/thirdshift · .agents/skills/grill-me/SKILL.md · A relentless interview to sharpen a plan or design.
git:20260922.89a7f35 · audit B · 3 stars
grill-with-docs SKILL.md skill
jacobstephens2/thirdshift · .agents/skills/grill-with-docs/SKILL.md · A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.
git:20260922.89a7f35 · audit A · 3 stars

Every file in jacobstephens2/thirdshift

Other files named git-guardrails-claude-code

git-guardrails-claude-code SKILL.md skill
vinvcn/mattpocock-skills-zh-cn · skills/misc/git-guardrails-claude-code/SKILL.md · 设置 Claude Code hooks,在危险 git commands(push、reset --hard、clean、branch -D 等)执行前阻止它们。适用于用户想防止破坏性 git 操作、添加 git safety…
git:20261008.5be0dc1 · audit A · 5,886 stars
git-guardrails-claude-code SKILL.md skill
asymmetric-al/core · .agents/skills/git-guardrails-claude-code/SKILL.md · Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they…
git:20260923.15c9348 · audit A · 370 stars
git-guardrails-claude-code SKILL.md skill
rudycity/superagent · .agents/skills/git-guardrails-claude-code/SKILL.md · Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they…
git:20260626.019dba9 · audit A · 71 stars
git-guardrails-claude-code SKILL.md skill
akillness/jeo-skills · .agent-skills/git-guardrails-claude-code/SKILL.md · Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they…
v1.0 · audit A · 60 stars
git-guardrails-claude-code SKILL.md skill
vodailocz/kilo-kit-mcp · skills/productivity/git-guardrails-claude-code/SKILL.md · Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they…
git:20260821.05c0d52 · audit A · 28 stars
git-guardrails-claude-code SKILL.md skill
mambo-wang/codewiki-plus · .trae/skills/git-guardrails-claude-code/SKILL.md · Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they…
git:20260916.5a385b8 · audit A · 21 stars
git-guardrails-claude-code SKILL.md skill
mambo-wang/codewiki-plus · .codebuddy/skills/git-guardrails-claude-code/SKILL.md · Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they…
git:20260916.5a385b8 · audit A · 21 stars
git-guardrails-claude-code SKILL.md skill
chinkan/rustfox · .agents/skills/git-guardrails-claude-code/SKILL.md · Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they…
git:20260922.53f91f6 · audit A · 12 stars

Browse by kind, by grade A, or by owner.

Kept in .agents/skills, the folder Codex reads. More agent skills for Codex.