Gateguard
Fact-forcing PreToolUse gate that blocks first edits until the agent presents concrete investigation facts.
- CCM score
- 63 of 100
- skills.sh installs
- 10.1K
- GitHub stars
- 312.6K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers Edit, Write, Bash, MultiEdit, and NotebookEdit, gating the first attempt per file until facts are presented
- Asks for importers, public API surface, data schemas, and the user's instruction quoted verbatim, scaled to the change
- Classifies targets by class (code, instruction, test, and others) so questions fit the file rather than applying one checklist
- Designed for codebases where edits affect multiple modules and AI-generated changes must match existing patterns
Install
$ npx -y skills add affaan-m/ecc --skill gateguard -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
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:
Details
- Repository
- github.com/affaan-m/ecc
- Categories
- Agent Workflow & Planning, Code Review & Quality
- First seen
- Jul 14, 2026
Questions
What does the gateguard skill do before Claude edits files?
GateGuard is a PreToolUse hook that denies the first Edit, Write or Bash attempt until the agent presents concrete facts such as importers, data schemas and the user's verbatim instruction. Once those facts are shown, it allows the retry, which the skill's own tests found improved design depth by about 2.25 points.
How do I install the gateguard skill?
Run npx -y skills add affaan-m/ecc --skill gateguard -y inside your project. That installs the skill from the affaan-m/ecc repository so the GateGuard gate is available to your agent.
Which other skills is gateguard compared with in Agent Workflow & Planning?
gateguard sits in the Agent Workflow & Planning category alongside grill-me, grill-with-docs, setup-matt-pocock-skills, grilling and prototype. Where those focus on questioning and planning, gateguard sets itself apart by blocking first-touch edits until the agent investigates.
Who should use the gateguard skill?
It suits teams working on codebases where file edits affect multiple modules, projects with data files that have specific schemas or date formats, and workflows where Claude tends to guess instead of investigating. It is also useful when AI-generated code must match existing patterns.
More from affaan-m/ecc
All 257- Frontend Design Direction9.9K
- Fastapi Patterns9.4K
- Hermes Imports9.3K
- Blender Motion State Inspection9.3K
- Vite Patterns9.2K
- Agent Architecture Audit9.1K
- Error Handling9.1K
- Windows Desktop E2e9.1K
- Redis Patterns9.1K
- Mysql Patterns9.1K
- Production Audit9K
- Make Interfaces Feel Better9K
- Motion Patterns9K
- Motion Foundations9K
- Motion Advanced8.9K
- Ecc Guide8.9K
- Mle Workflow8.9K
- Django Celery8.8K
- Homelab Network Setup8.8K
- Ios Icon Gen8.8K
- Agentic Os8.8K
- Skill Stocktake8.8K
- Ui To Vue8.8K
- Network Interface Health8.7K
Similar to Gateguard
More Agent Workflow & Planningprediction-market-risk-reviewSkillaffaan-m/ecc7.7K installsPre-use risk review gates for prediction-market workflows covering advice, venue rules, data quality, security, and privacy.
ThumbGate — PreToolUse Agent FirewallMCP serverigorganapolsky34 starsThumbGate is a local pre-action firewall for AI coding agents that captures feedback and enforces prevention rules.
reviewSkillgarrytan/gstack532 installsPre-landing PR review that dispatches specialist reviewers and an adversarial pass before a diff lands.
codehealth-mcpSkillaffaan-m/ecc6.9K installsStructural Code Health review, score-delta checks, and commit or PR gates for AI-assisted edits.
huntSkilltw93/waza15.5K installsRoot-cause diagnosis skill that blocks any fix until a one-sentence cause is proven against every symptom.
RigourMCP serverrigour-labs29 starsA reviewer and quality gate for coding agents, drawing on the team's rules, past reviews, and lessons.