Plugin Doubt Gate banner
johnlindquist johnlindquist

Plugin Doubt Gate

Development community

Description

Claude Code Stop hook plugin that detects uncertainty in assistant messages and requests verification

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

doubt-gate

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.

How it works

Claude Code pipes a JSON payload to stdin on every Stop event. doubt-gate:

  1. Strips fenced code blocks, inline code, and blockquotes from the assistant's last message
  2. Scans the remaining prose for doubt keywords
  3. If matches are found, prints {"decision":"block","reason":"..."} to stdout — Claude Code re-enters the conversation and must verify its claims
  4. If no matches are found, exits silently — Claude Code stops normally

A `stop_hook_active` guard prevents infinite loops: if the hook already fired once for the current turn, the stop is always allowed through.

Detected keywords

`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`

Requirements

  • Node.js >= 18 (the hook runs via node, not bun)
  • Claude Code with plugin support (--plugin-dir flag)

Install

Option 1: Clone and use directly

git clone  doubt-gate
claude --plugin-dir ./doubt-gate

Option 2: Copy into your plugins directory

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`.

Environment variables

Variable Values Default Description
DOUBT_GATE_LOG_LEVEL off, info, debug off Controls structured JSON log output
`DOUBT_GAT