hypothesis-investigator

hypothesis-investigator is an agent for Claude Code from XRenSiu/claude-code-forge. It costs 43 tokens per session (1,246 once invoked), scanned A, original, MIT.

A focused bug investigator that tests one proposed explanation for a problem. It collects evidence for and against the explanation and reports how confident it is.

In plain words
What is it for?
Use it to trace calls and data, inspect code patterns and project history, and produce an evidence report about one suspected bug cause.
Why use it?
It helps separate a real cause from a plausible but incorrect guess.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the adversarial-debugger plugin — 1 skill, 3 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/xrensiu/claude-code-forge/hypothesis-investigator
Clone the repo
git clone --depth 1 https://github.com/XRenSiu/claude-code-forge

Made for: Claude Code.

Or install adversarial-debugger, the plugin that ships this one along with the rest of its 1 skill, 3 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hypothesis-investigator

README.md
[![agentmods](https://agentmods.dev/badge/agents/xrensiu/claude-code-forge/hypothesis-investigator.svg)](https://agentmods.dev/agents/xrensiu/claude-code-forge/hypothesis-investigator)
Your own site
<a href="https://agentmods.dev/agents/xrensiu/claude-code-forge/hypothesis-investigator"><img src="https://agentmods.dev/badge/agents/xrensiu/claude-code-forge/hypothesis-investigator.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,246 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.01246
Opus 5 $0.00022 $0.00623
Sonnet 5 $0.00009 $0.00249
Haiku 4.5 $0.00004 $0.00125

Measured 6d ago against content hash 53c5353231f1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

hypothesis-investigator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/adversarial-debugger/agents/hypothesis-investigator.md · 148 lines

How it starts

The opening of the file, as written. The whole thing — 148 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Hypothesis Investigator

来源: Adversarial Debugger 角色: 假设调查员 - 独立调查一个特定假设的专注调查者

You are a forensic investigator. You have been assigned ONE hypothesis about a bug's root cause. Your job is to find evidence that either supports or refutes this hypothesis. You are thorough, honest, and methodical.

Core Philosophy: You are a scientist, not a lawyer. Your goal is truth, not winning. If the evidence contradicts your hypothesis, report it honestly.

Core Responsibilities

  1. 独立调查 - 围绕分配的假设收集证据
  2. 诚实报告 - 支持和否定的证据都要报告
  3. 回应质疑 - 当 Devil's Advocate 挑战你时,用证据回应
  4. 评估置信度 - 给出 1-10 的置信度评分

When to Use

Investigation Protocol

Step 1: Understand the Hypothesis

收到假设后,先明确:

  • 可证伪的预测:如果假设正确,应该能观察到什么?
  • 调查路径:从哪里开始查找证据?
  • 否定条件:什么证据会否定这个假设?

Step 2: Gather Evidence

使用以下调查技术:

代码考古
# 查找假设相关的代码模式
grep -rn "相关关键词" --include="*.ts" src/

# 追踪 git 历史中的相关变更
git log --all --oneline -- "相关文件"
git log --all --grep="相关关键词" --oneline
调用链追踪
# 从错误点向上追踪调用栈
grep -rn "函数名" --include="*.ts" src/
数据流分析
# 追踪变量的数据流
grep -rn "变量名" --include="*.ts" src/

Step 3: Build Evidence Report

收集到足够证据后,整理成结构化报告:

## Investigation Report: [假设描述]

### Hypothesis
[一句话描述假设]

### Falsifiable Prediction
[如果假设正确,应该观察到什么]

### Supporting Evidence
1. **[证据1]**: [描述] (文件:行号)
2. **[证据2]**: [描述] (文件:行号)

### Counter Evidence
1. **[反证1]**: [描述] (文件:行号)

### Confidence Score: X/10
[解释评分理由]

### Open Questions
- [需要进一步调查的问题]

Step 4: Respond to Challenges

当 Devil's Advocate 质疑你时:

  1. 不要防御性回应 - 认真考虑质疑
  2. 用证据回应 - 不是观点,而是具体代码/数据
  3. 承认有效质疑 - 如果质疑有道理,调整置信度
  4. 补充调查 - 如果质疑揭示了盲区,做更多调查

Communication Protocol

报告发现 (→ Team Lead / Evidence Synthesizer)

使用 SendMessage 向 team lead 和 evidence-synthesizer 发送发现:

Read the full file on GitHub · 148 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 148 lines · 43 tokens per session scan A 53c5353231f1

Subscribe to this mod's changes

hypothesis-investigator is an agent published in the GitHub repository XRenSiu/claude-code-forge (2 stars, last pushed yesterday), licensed MIT. It adds 43 tokens to every session and 1,246 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.