GateGuard Fact-Forcing Pre-Action Gate
A PreToolUse hook that blocks Claude's first Edit, Write, or Bash attempt until the agent presents concrete facts: every importer, the data schema, the verbatim instruction. A/B-tested at +2.25 quality points.
- What
- A PreToolUse hook that blocks Claude's first Edit, Write, or Bash attempt until the agent presents concrete facts: every importer, the data schema, the verbatim instruction. A/B-tested at +2.25 quality points.
- Cost
- Free
- Needs
- Use "GateGuard Fact-Forcing Pre-Action Gate" with your Muse.
- Install
- Copy the installer prompt below into your Muse — your agent does the rest.
Curated by Skill Harbor: a PreToolUse hook that fixes the most expensive Claude Code failure mode, the agent that edits before investigating. Instead of asking the model to self-evaluate ("are you sure?", which always gets "yes"), GateGuard runs a three-stage gate: DENY the first Edit/Write/Bash attempt, FORCE the model to gather specific facts, ALLOW the retry once the facts are presented. The Edit/MultiEdit gate demands the full list of files importing the target, the affected public functions, and the data file schema with redacted values; the Write gate demands proof no existing file serves the same purpose; the destructive Bash gate triggers on every rm -rf, git reset --hard, git push --force, or drop table and demands a one-line rollback procedure plus the verbatim user instruction. Two independent A/B tests measured +2.25 average quality points, with the difference showing in design depth, not just passing tests. Graduated controls via environment variables: ECC_GATEGUARD=off disables it entirely, GATEGUARD_EXEMPT_GLOBS skips low-signal trees like tests or generated artifacts, GATEGUARD_BASH_ROUTINE_DISABLED narrows to destructive commands only. By @affaan-m, listed here with credit to its creator. From the affaan-m/ECC repository (MIT). Honest caveats: hooks see tool calls one at a time, so in a parallel batch the first call is denied while siblings may already apply; send dependent edits to an untouched file sequentially and re-read after a denial. Tune exemptions for large repos or the gate fires constantly. Skill Harbor never reviews the code, review it yourself before use.
Version:
Install
Copy the install package below, then paste it into MuseThe install prompt below already includes the vetting steps: your agent follows the community checklist before installing anything with executable code. Want more?
Use "GateGuard Fact-Forcing Pre-Action Gate" with your Muse. Prerequisites: Claude Code with hooks support. The hook script ships with the skill (scripts/hooks/gateguard-fact-force.js); enable it via hooks.json. 1. Open the skill: https://github.com/affaan-m/ECC/blob/main/skills/gateguard/SKILL.md and copy the full SKILL.md text. 2. Paste it into a chat with Muse and add: "Enable GateGuard on this project" or "Help me configure GateGuard exemptions for [tests/, docs/, dist/]." 3. Work through the gate types with Muse: first-edit, first-write, destructive Bash, routine Bash. Set GATEGUARD_EXEMPT_GLOBS for low-signal trees. Tip: when a denial fires, do not pre-answer the gate questions; the investigation itself is what improves the result. Safety: a skill is plain-text instructions; it runs nothing by itself. The hook only gates tool calls; it never executes code on its own. If GateGuard blocks setup work, start the session with ECC_GATEGUARD=off.
Saved to your recent installs. Find it anytime on /connect.
Questions
How do I install a build?
Every product page includes a copy-paste install prompt. Paste it into your Muse and it sets the build up for you — no manual configuration.
Where does my money go?
Straight to the seller. Skill Harbor never processes payments: checkout happens on the seller’s own page, usually Stripe.
What does the ✓ next to a creator’s name mean?
It means we confirmed the identity of the person behind the listing. It says nothing about the code itself — always check a build before installing it.