Agent skill · software engineering · affaan-m

gateguard

PreToolUse fact-forcing gate that denies the first Edit/Write/Bash (including MultiEdit and NotebookEdit) attempt until the agent presents concrete facts (importers, data schemas, verbatim user instruction), then allows retry; A/B-tested at +2.25 quality points. Use when enabling or configuring the GateGuard hook, exempting paths via env vars, or handling first-touch denials.

Why this skill is useful

Adds a comprehensive pre-action gating mechanism that requires specific investigative facts before allowing edits, fundamentally enhancing code quality and safety.

What it needs

Requires node installed locally. About 12k tokens when loaded. Last updated 2026-08-06. 238,342 stars on the source repository.

What this skill does

GateGuard — Fact-Forcing Pre-Action Gate A PreToolUse hook that forces Claude to investigate before editing. Instead of self-evaluation ("are you sure?"), it demands concrete facts. The act of investigation creates awareness that self-evaluation never did. When to Activate Working on any codebase where file edits affect multiple modules Projects with data files that have specific schemas or date formats Teams where AI-generated code must match existing patterns Any workflow where Claude tends to guess instead of investigating Core Concept LLM self-evaluation doesn't work. Ask "did you violate any policies?" and the answer is always "no." This is verified experimentally. But asking "list every file that imports this module" forces the LLM to run Grep and Read. The investigation itself creates context that changes the output. Three-stage gate: No competitor does all three. Most stop at deny. Evidence Two independent A/B tests, identical agents, same task: Task Gated Ungated Gap --- --- --- --- Analytics module 8.0/10 6.5/10 +1.5 Webhook validator 10.0/10 7.0/10 +3.0 Average 9.0 6.75 +2.25 Both agents produce code that runs and passes tests. The difference is design depth. Gate Types Edit / MultiEdit Gate (first edit per file) MultiEdit is handled identically — each file in the batch is gated individually; entries without their own filepath are gated as the call's filepath. NotebookEdit is gated as an Edit of its notebookpath: same class, checked key, credit and cap rules, the full questions (the cell change is not read), and never a comment-only pass. The questions depend on the target's class (see Questions by target class). For code targets the Edit gate asks: These four are the full set, asked whenever the change cannot be read with confidence. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills affaan-m/gateguard--0e8b01

View the source on GitHub

Browse the @skills marketplace