git-guardrails-claude-code SKILL.md skillC

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

Install it, pinned
mdr add ctaxnagomi/agent-kd-skill/git-guardrails-claude-code@git:20260826.54f6831

Pins git:20260826.54f6831 in mdr.lock. Pin the fingerprint instead.

Audit grade
C, 15 of 17 checks passed
Kind
SKILL.md skill
Repository
ctaxnagomi/agent-kd-skill
Path
skills/custom/git-guardrails-claude-code/SKILL.md
Versions recorded
3
Latest version
git:20260826.54f6831, committed Aug 26, 2026
First version recorded
Aug 24, 2026
Size
2,175 bytes
Repository stars
3
License
none declared

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

# Git Guardrails (Claude Code)

Set up Claude Code hooks to block dangerous git commands before they execute.

## 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 .

## Steps

1. **Ask scope** — This project only or all projects?
2. **Copy the hook script** — To .claude/hooks/ or ~/.claude/hooks/.
3. **Add hook to settings** — PreToolUse hook in settings.json.
4. **Ask about customization** — Add or remove patterns.
5. **Verify** — Test with a blocked command.

## Credit

This skill is based on the work of **Matt Pocock** ([@mattpocock](https://github.com/mattpocock)). Original source: [mattpocock/skills](https://github.com/mattpocock/skills). Licensed under MIT.

---

## How to use?

### 1. Download
Go to the [AGENT KD SKILL gallery](https://ctaxnagomi.github.io/agent-kd-skill/) and find this skill card. Click **Download** to save the SKILL.md file to your computer.

### 2. Install
Copy the downloaded SKILL.md into your agent's skills directory:

| Agent | Path |
|-------|------|
| **opencode** | ~/.config/opencode/skills/<skill-name>/SKILL.md |
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add ctaxnagomi/agent-kd-skill/git-guardrails-claude-code@sha256:4472244759bb7f1d

The line at the top of this page pins the label git:20260826.54f6831, 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_miuxliixvu6vay67.svg)](https://markdownregistry.com/a/art_miuxliixvu6vay67)

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

Versions

The registry has recorded 3 versions of this file, between Aug 24, 2026 and Aug 26, 2026, more than one a day.

versioncommittedcommitsizeaudit
git:20260826.54f6831 latest2026-08-26 54f6831 2,175 BC view · diff
git:20260824.dfd64f32026-08-24 dfd64f3 2,177 BC view · diff
git:20260824.da779f92026-08-24 da779f9 1,113 BC view

Audit of the latest version

C  15 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • fail: Frontmatter declares a name
  • fail: Frontmatter declares a description
  • pass: Frontmatter block present
  • pass: Size between 200 bytes and 200 KB (2175 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

Starting a new one? Use a template for SKILL.md on mdpantry, which passes every one of these checks and says what to change in it.

Source

GitHub

ctaxnagomi/agent-kd-skill · 3 stars · license none declared · pushed 2026-10-14 · branch master

API

GET https://markdownregistry.com/api/v1/artifacts/art_miuxliixvu6vay67
GET https://markdownregistry.com/api/v1/resolve?ref=ctaxnagomi/agent-kd-skill/git-guardrails-claude-code
GET https://markdownregistry.com/api/v1/blob/4472244759bb7f1d2d7b0d3747101c9b87dfec10bb999cc43703b9f24f0371f1

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 ctaxnagomi/agent-kd-skill

grill-me SKILL.md skill
ctaxnagomi/agent-kd-skill · skills/agent-sub/grill-me/SKILL.md
git:20260826.54f6831 · audit C · 3 stars
agent-memory SKILL.md skill
ctaxnagomi/agent-kd-skill · skills/custom/agent-memory/SKILL.md
git:20260826.54f6831 · audit C · 3 stars
ask-matt SKILL.md skill
ctaxnagomi/agent-kd-skill · skills/custom/ask-matt/SKILL.md
git:20260826.54f6831 · audit C · 3 stars
code-review SKILL.md skill
ctaxnagomi/agent-kd-skill · skills/custom/code-review/SKILL.md
git:20260826.54f6831 · audit C · 3 stars
codebase-design SKILL.md skill
ctaxnagomi/agent-kd-skill · skills/custom/codebase-design/SKILL.md
git:20260826.54f6831 · audit C · 3 stars
deepseek-harness SKILL.md skill
ctaxnagomi/agent-kd-skill · skills/custom/deepseek-harness/SKILL.md · Fetch, harness, and deploy Deepseek models with full repo instructions, file management, and agent integration.
git:20260826.fc8b2a5 · audit B · 3 stars
design SKILL.md skill
ctaxnagomi/agent-kd-skill · skills/custom/design/SKILL.md · UI/UX design system — skewed glass cards, neon border-trace buttons, translucent iOS aesthetic with per-category color…
git:20260826.f28e6ab · audit B · 3 stars
diagnosing-bugs SKILL.md skill
ctaxnagomi/agent-kd-skill · skills/custom/diagnosing-bugs/SKILL.md
git:20260826.54f6831 · audit C · 3 stars
domain-modeling SKILL.md skill
ctaxnagomi/agent-kd-skill · skills/custom/domain-modeling/SKILL.md
git:20260826.54f6831 · audit C · 3 stars
grill-with-docs SKILL.md skill
ctaxnagomi/agent-kd-skill · skills/custom/grill-with-docs/SKILL.md
git:20260826.54f6831 · audit C · 3 stars
grilling SKILL.md skill
ctaxnagomi/agent-kd-skill · skills/custom/grilling/SKILL.md
git:20260826.54f6831 · audit C · 3 stars
handoff SKILL.md skill
ctaxnagomi/agent-kd-skill · skills/custom/handoff/SKILL.md
git:20260826.54f6831 · audit C · 3 stars

Every file in ctaxnagomi/agent-kd-skill

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,110 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 · 379 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 · 52 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 · 48 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 · 20 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 · 20 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 · 10 stars

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