Help us improve
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
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.
npx claudepluginhub johnlindquist/plugins --plugin doubt-gateA 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
Share bugs, ideas, or general feedback.
Based on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
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
Complete collection of battle-tested Claude Code configs from an Anthropic hackathon winner - agents, skills, hooks, and rules evolved over 10+ months of intensive daily use
20 SEO/GEO skills and 5 commands on one shared contract for keyword research, content creation, technical audits, schema markup, monitoring, quality gates, entity truth, and campaign memory.
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'
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claim