SuperAPIAI Directory

claude-code-claim-check

github.com · Other AI tools

claim-check is a Stop hook for Claude Code that checks whether there is actual verification evidence in the session when an AI agent claims "done", "fixed", or "tests pass". If evidence is missing, it sends the agent back to keep working. Developed by Balance Zhao under the MIT license, the tool requires Python 3.9+ and has no dependencies. It determines whether verification holds by checking whether a non-read-only command, MCP tool, URL fetch, or subagent was run after the last code edit. It supports claim detection in English and Chinese, can be installed as a Claude Code plugin or manually configured as a Stop hook, and also offers a skill installation method for agents such as Codex. It will not block twice in a row, and if the hook crashes it allows the turn to end. Users can view block statistics by replaying historical sessions, and a log-only mode is supported.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)

About this tool

claim-check is a Stop hook for Claude Code designed to solve the problem of AI agents claiming a task is complete without verification. When an agent tries to end a turn with claims such as "done", "fixed", "deployed", or "tests pass", the hook checks the current session transcript to confirm whether any actual verification action was run after the last code edit. If not, the hook blocks the turn from ending, tells the agent what evidence is missing, and requires it to keep working.

Main capabilities include: detecting completion-type claims in English and Chinese (such as "done", "fixed", "tests pass", "已修复", "测试通过", etc.) as well as "does not exist"-type claims; checking whether a non-read-only command, MCP tool, URL fetch, or subagent was run after the last code edit; ignoring claims in contexts such as code blocks, quotes, questions, and Markdown table rows; supporting cancellation logic for conditionals and negations; not blocking twice in a row, to avoid trapping the agent in a loop; and allowing the turn to end if the hook itself crashes.

Usage: it can be installed as a Claude Code plugin, or claim_check.py can be manually added as a Stop hook in ~/.claude/settings.json. For other agents such as Codex, the rules can be installed as a skill via npx skills add Balance0014/claude-code-claim-check, but the skill is only textual guidance and has no enforcement power. Users can clone the repository and run python3 claim_check.py replay to replay historical sessions and see how many claims the hook would block; run python3 claim_check.py report to view the last ten block records. By default, the hook writes block records to ~/.claude/claim-check/blocks.jsonl. Log-only mode (log_only set to true) and full disabling (enabled set to false) are supported; these options can be set in Claude Code's /config or via claude plugin configure claim-check.

Use cases: suitable for developers using Claude Code for long sessions, especially those concerned about agents claiming completion without actual verification. The author based this on their own 3,977-turn sessionThe history was measured, of which 406 turns ended with a completion-type declaration, and the old version would block 86.

Limitations: The tool is based on fixed phrase matching and cannot recognize non-standard expressions such as "I believe this works"; some common closing phrases (such as "Fixed the redirect loop" and "I'm done") may not be captured; sentences beginning with conditional words are not treated as declarations; an honest "unverified" declaration will let the entire reply pass; any 7- to 40-digit hexadecimal string is treated as a commit hash; any MCP tool call or subagent counts as a check, even if read-only; in turns with no edits, any check from a previous turn may be counted; running a command cannot prove that the correct content was tested; for "does not exist" declarations, only checking that the two lookup types differ cannot determine whether the second lookup would find it; only English and Chinese are supported; Markdown table rows are skipped; discovery statements using declarative words may be falsely blocked; files modified via shell commands (such as sed -i) are not treated as edits; asynchronous write records in Claude Code may cause checked declarations to be blocked; on Windows, if python3 is not in PATH, it must be changed to python.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools