goal-gate
Skill4 starsChanged 27 days agoMITView on GitHub
Pair native /goal (run-until-condition) with a DETERMINISTIC Stop-hook script that runs the real verification /goal's transcript-only Haiku checker cannot — exit-2-blocking the stop until the actual command (tests/build/typecheck) passes. Use when you want a loop to keep going until a condition is GENUINELY met (not just claimed in the transcript), when /goal alone would rubber-stamp a hallucinated "tests pass", or when adding a deterministic completion gate to any loop. Trigger phrases: /goal gate, deterministic stop gate, goal not really done, verify before stop, stop hook gate, run until tests actually pass.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- Adonis0123/adonis-skillstheir own version, first seen Nov 7, 2026
- I-Onlabs/claude-code-skillsword for word, first seen Oct 25, 2026
Other versions2 projects use a version of this.
Word for word · 1
- I-Onlabs/claude-code-skills★ 4100% same
Edited · 0
None found.
Wrote their own version · 1
- Adonis0123/adonis-skills★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository169 other files it gives its agents.
- epub-skill/CLAUDE.mdCLAUDE.md
- linear-cli-skill/CLAUDE.mdCLAUDE.md
- AgentDB Advanced FeaturesSkill
- AgentDB Learning PluginsSkill
- AgentDB Memory PatternsSkill
- AgentDB Performance OptimizationSkill
- AgentDB Vector SearchSkill
- agent-evalSkill
- agentic-jujutsuSkill
- agile-product-ownerSkill
- ai-tool-pickerSkill
- algorithmic-artSkill
- api-connectorSkill
- api-design-patternsSkill
- architecture-diagram-creatorSkill
- article-extractorSkill
- aws-agentic-aiSkill
- aws-cdk-developmentSkill
- aws-cost-operationsSkill
- aws-serverless-edaSkill
- biogeobearsSkill
- brainstormingSkill
- brand-guidelinesSkill
- canvas-designSkill
- capa-officerSkill
- ceo-advisorSkill
- changelog-generatorSkill
- code-auditorSkill
- codebase-documenterSkill
- code-executionSkill
- code-explainerSkill
- code-refactorSkill
- code-reviewerSkill
- code-transferSkill
- content-creatorSkill
- content-research-writerSkill
- conversation-analyzerSkill
- csv-data-summarizerSkill
- cto-advisorSkill
- d3-vizSkill
- dashboard-creatorSkill
- defense-in-depthSkill
- deploy-itSkill
- developer-growth-analysisSkill
- dispatching-parallel-agentsSkill
- doc-coauthoringSkill
- docxSkill
- domain-name-brainstormerSkill
- dwa-councilSkill
- error-fixerSkill
- escalation-reasoningSkill
- evaluator-optimizerSkill
- executing-plansSkill
- extract-from-pdfsSkill
- fda-consultant-specialistSkill
- feature-planningSkill
- file-operationsSkill
- file-organizerSkill
- finishing-a-development-branchSkill
- firebase-buddySkill
- The first 60 shown.
The file
Files
/goal Deterministic Gate
/goal keeps Claude working until a small Haiku checker reads the transcript and decides the
condition holds. Its load-bearing limit (verified, 2.1.170): the checker runs no tools and reads no
files — it can only confirm that text claiming success appears in the conversation. A maker that
hallucinates "✓ all tests passed", or runs the wrong command, sails straight through.
The fix Anthropic's docs themselves point to: push the real, deterministic check into a Stop-hook
script, and let /goal adjudicate only the semantic residue. The script actually runs the command
and exit-2-blocks the stop (feeding the failure back as guidance) until it genuinely passes.
The pattern (two layers)
/goal <semantic condition>— drives continuation and handles the fuzzy part (e.g. "the auth refactor is complete and the new endpoints are documented").- A
Stophook runninggoal-stop-gate.sh— the objective backstop: runs your verify command (pytest -q,npm test,tsc --noEmit,cargo build) and:- exit 0 → allow the stop (genuinely done);
- exit 2 → block the stop; stderr (the failing output) becomes Claude's next-turn guidance.
This is the §"force unforgeable evidence" rule from loop-designer/references/verifier-discipline.md
made mechanical — the gate reads the real exit code, not the agent's narration of it.
Install (template: templates/goal-stop-gate.sh)
Copy the template, set your verify command, make it executable, and register it as a Stop hook in
.claude/settings.json (project) — keep it project-scoped so it only gates the loop you mean:
{ "hooks": { "Stop": [ { "hooks": [
{ "type": "command", "command": "CLAUDE_GOAL_VERIFY_CMD='pytest -q' .claude/hooks/goal-stop-gate.sh", "timeout": 120000 }
] } ] } }The script respects stop_hook_active (Claude Code's loop-guard) so it blocks once per stop
attempt, never infinitely — and fails open (allows the stop) if the verify command can't run, so a
broken gate never traps the session.
When to use which
/goalalone — the condition is fully demonstrable in the transcript (the agent pastes the rawpytestoutput) and you trust it to. Cheapest./goal+ this gate — the condition must be machine-true, not transcript-claimed. Use for anything that ships, merges, or runs unattended.agent-handler Stop hook (experimental) — when the check needs a subagent to read files/run several commands and reason, not a single deterministic command.
Companions: loop-designer (the /goal gotcha + non-rotting gate), evaluator-optimizer (semantic
maker≠checker), long-running-harness (features.json verify-before-flip), quality-gates.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

