Agent Gates banner
skyn9 skyn9

Agent Gates

AI community

Description

Stop telling your AI agent the rules — enforce them. Hook-based commit gates for Claude Code.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

agent-gates

**You wrote the rule in CLAUDE.md. It didn't stick. Make it mechanical instead.**

Hook-based gates for Claude Code: the commit is denied until the code has actually been reviewed, and the files your agent reads every session stay under a size budget.

[![License: MIT](https://img.shields.io/badge/license-MIT-yellow)](LICENSE) [![Claude Code](https://img.shields.io/badge/requires-Claude%20Code-8A63D2)](https://claude.com/claude-code) [![Tests](https://img.shields.io/badge/tests-88%20checks%20%2B%2010%20mutations-green)](tests/) [![CI](https://github.com/skyn9/agent-gates/actions/workflows/tests.yml/badge.svg)](https://github.com/skyn9/agent-gates/actions/workflows/tests.yml)

**English** | [中文](https://github.com/skyn9/agent-gates/blob/main/docs/README_ZH.md)


The problem this is for

You wrote *"never truncate the output of that command"* in `CLAUDE.md`.

You wrote it in the journal. You wrote it into memory. You turned it into a mechanical step.

**You still hit it four times the same day.**

Not because the rule was unclear — it was already as clear as a rule gets. Every form discipline can take had been used up. What was left was to stop asking, and start denying.

That's the whole idea. Reminders degrade. Gates don't.

The full reasoning, including the three silent failures that happened *inside* the gate while building it: [why mechanism, not discipline](docs/why-mechanism-not-discipline.md).

What it looks like

Reminder mode — one line, doesn't block:

🔍 This commit touches 1 code file (payment.py …) — review before committing:
   /open-code-review:delegate-review
   (…don't substitute "I'll just read the diff myself" — that only shows you
    the dimensions you already thought of.)

Hard gate — denied:

decision: deny

Files not yet reviewed (or edited after review): payment.py

Run /open-code-review:delegate-review first. The gate opens automatically once
it has; editing a file again requires a fresh review. The gate