affaan-m avatar

Gateguard

This is a pre-action hook that blocks Claude's first edit or file write and forces it to gather concrete facts first: what imports this file, what the data schema actually looks like, what the user literally asked for. The claim is that investigation beats self-evaluation, backed by two A/B tests showing a 2.25 point quality jump. MultiEdit gets gated per file, destructive bash commands get gated every time, routine commands once per session. The hook is included and you flip it on via hooks.json, or install the full package for per-project config. If you work on codebases where Claude guesses at date formats or misses downstream callers, this adds friction in exactly the right place.

skills.sh installs
5.4K
GitHub stars
300.3K
last updated
Aug 21, 2026

Install

$ npx -y skills add affaan-m/ecc --skill gateguard --agent claude-code

Installs into .claude/skills of the current project.

Files

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:

1. DENY  — block the first Edit/Write/Bash attempt
2. FORCE — tell the model exactly which facts to gather
3. ALLOW — permit retry after facts are presented

No competitor does all three. Most stop at deny.

Evidence

Two independent A/B tests, identical agents, same task:

Sponsors

Details

Repository
github.com/affaan-m/ecc
Categories
Code Review & Quality, CLI & Terminal
First seen
Jul 14, 2026

More from affaan-m/ecc

All 263
1affaan-m avatarcisco-ios-patternsaffaan-m/eccCisco IOS and IOS-XE review patterns for show commands, config hierarchy, wildcard masks, ACL placement, interface hygiene, and safe change-window verification.5.4Kskills.sh installs
2samber avatarconventional-gitsamber/cc-skillsConventional Commits v1.0.0 branch naming, worktree naming, and commit message standards for GitHub and GitLab projects. Use when creating branches, naming work5.4Kskills.sh installs
3affaan-m avatarsanta-methodaffaan-m/eccMulti-agent adversarial verification with convergence loop. Two independent review agents must both pass before output ships.5.4Kskills.sh installs
4affaan-m avatarquarkus-patternsaffaan-m/eccQuarkus 3.x LTS architecture patterns with Camel for messaging, RESTful API design, CDI services, data access with Panache, and async processing. Use for Java Q5.4Kskills.sh installs
5forcedotcom avataragentforce-d360-analyzeforcedotcom/sf-skillsData Cloud 360° view of a single Agentforce session. TRIGGER when user asks to trace, inspect, summarize, or describe a specific Agentforce session by session i5.4Kskills.sh installs
6affaan-m avatarquarkus-verificationaffaan-m/eccVerification loop for Quarkus projects: build, static analysis, tests with coverage, security scans, native compilation, and diff review before release or PR.5.4Kskills.sh installs