Claude Code Stop hook that detects uncertainty in assistant messages. When doubt keywords (likely, maybe, might, probably, etc.) are found outside of code blocks and blockquotes, the hook blocks the stop and instructs the agent to add logging, assertions, or other verification before concluding.
A Claude Code Stop hook plugin that detects uncertainty in assistant messages. When doubt keywords (likely, maybe, might, probably, etc.) appear outside of code blocks and blockquotes, the hook blocks the stop and instructs the agent to add logging, assertions, or other verification before concluding.
This ensures the agent provides concrete evidence rather than speculation.
Claude Code pipes a JSON payload to stdin on every Stop event. doubt-gate:
{"decision":"block","reason":"..."} to stdout — Claude Code re-enters the conversation and must verify its claimsA stop_hook_active guard prevents infinite loops: if the hook already fired once for the current turn, the stop is always allowed through.
likely, maybe, might, probably, possibly, not sure, not certain, uncertain, unclear, could be, appears to, seems like, I think, I believe, I suspect, it's possible, hard to say
node, not bun)--plugin-dir flag)git clone <repo-url> doubt-gate
claude --plugin-dir ./doubt-gate
cp -r doubt-gate ~/.claude/plugins/doubt-gate
Then start Claude Code with:
claude --plugin-dir ./doubt-gate
The plugin registers itself as a Stop hook automatically via .claude-plugin/plugin.json and hooks/hooks.json.
| Variable | Values | Default | Description |
|---|---|---|---|
DOUBT_GATE_LOG_LEVEL | off, info, debug | off | Controls structured JSON log output |
DOUBT_GATE_LOG_PATH | file path | /tmp/doubt-gate.log | Where log lines are written |
off — No logging (default). Zero filesystem overhead.info — Logs each allow or block decision with session ID, matched keywords, and confidence count.debug — Everything in info, plus the stripped message text (first 500 chars) and full match list.DOUBT_GATE_LOG_LEVEL=info claude --plugin-dir ./doubt-gate
{"ts":"2026-03-12T14:00:00.000Z","level":"info","event":"block","session":"abc-123","keyword":"might, probably","confidence":2}
doubt-gate/
├── .claude-plugin/
│ └── plugin.json # Plugin metadata (name, version, description)
├── hooks/
│ ├── hooks.json # Stop hook registration
│ └── doubt-gate.mjs # Compiled hook (runs via node)
├── test/
│ ├── fixtures/ # Test input payloads
│ └── plugin.test.ts # Integration tests (bun test)
├── package.json
└── README.md
cd doubt-gate
bun test
# Should output {"decision":"block","reason":"..."}
echo '{"hook_event_name":"Stop","stop_hook_active":false,"last_assistant_message":"this might be wrong","session_id":"test","transcript_path":"","cwd":"/tmp"}' | node hooks/doubt-gate.mjs
# Should produce no output (clean message, no doubt)
echo '{"hook_event_name":"Stop","stop_hook_active":false,"last_assistant_message":"the function returns 42","session_id":"test","transcript_path":"","cwd":"/tmp"}' | node hooks/doubt-gate.mjs
MIT
Based on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Complete development environment for Universe 2025 (Tufty) Badge with MonaOS app creation, deployment, and API reference
Template for creating Claude Code session hook plugins - customize to add your own session behaviors
Enforces task completion when user prompts contain thoroughness indicators like 'all', 'every', 'deep', 'thorough'
npx claudepluginhub johnlindquist/plugins --plugin doubt-gateHolds Claude Code to its word — every claim checked against the agent's own logged record; faked checks blocked, not warned (two narrow advisory self-checks excepted). Two-tier catalog (15 pre-checks, 14 Stop gates), each shipped at measured zero false positives.
Quadruple verification for Claude Code — automatically blocks placeholder code, security vulnerabilities, and ensures output quality on every operation. Built by CustomGPT.ai for production teams.
Enforce mandatory pre-action verification checkpoints to prevent pattern-matching from overriding explicit reasoning. Use this skill when about to execute implementation actions (Bash, Write, Edit) to verify hypothesis-action alignment. Blocks execution when hypothesis unverified or action targets different system than hypothesis identified. Critical for preventing cognitive dissonance where correct diagnosis leads to wrong implementation.
YES.md — PUA says NO, YES says YES. 6-layer AI governance: format → trigger → hooks → anti-slack → gates → memory. Makes AI do things RIGHT with encouragement, not pressure. Available in English, 中文, 日本語.
Easily create hooks to prevent unwanted behaviors by analyzing conversation patterns
Approach-level negative-knowledge memory for Claude Code. Mines your transcripts (Stop/PreCompact, both async and zero added latency) for approaches you TRIED and then REVERTED — with the reason, date, and estimated token cost of the detour — into a per-repo registry. On UserPromptSubmit it injects a 'you already tried this' warning card when a new prompt matches a recorded dead end; on PreToolUse (Edit|Write) it asks before an edit reintroduces a previously-reverted hunk. Review the registry any time with /dead-end-registry:dead-ends.