Token导航 LogoToken导航

Agent Skill · 研究检索

debug-hypothesis(调试假设)

debug-hypothesis 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

debug-hypothesis 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 55,495。

总安装 475周安装 20GitHub Stars 196下载 166核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:debug-hypothesis(调试假设)
来源仓库:https://github.com/lichamnesia/lich-skills
仓库路径:skills/debug-hypothesis
安装命令:
npx skills add https://github.com/lichamnesia/lich-skills --skill debug-hypothesis
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/lichamnesia/lich-skills --skill debug-hypothesis

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

debug-hypothesis 将调试过程转化为假设驱动调查,拒绝盲目尝试仅在有证据时实施修复。适用于间歇性失败、回归 bug、未知崩溃等需系统性排除干扰因素的场景。每个阶段设置明确目标与规则,配套理性化表格防止跳过关键验证步骤。必须获得用户确认才能进入下一阶段,确保双方对调查方向达成共识后再推进。

适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/debug-hypothesis

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/lichamnesia/lich-skills --skill debug-hypothes…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

debug-hypothesis 怎么安装?

在终端执行 npx skills add https://github.com/lichamnesia/lich-skills --skill debug-hypothesis。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

debug-hypothesis 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

debug-hypothesis 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

debug-hypothesis 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

debug-hypothesis 用的人多吗?

公开数据是累计安装 475 次,近一周安装 20 次,下载 166 次,GitHub 196 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

debug-hypothesis 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
debug-hypothesis

调试假设 · 本页

475196只读未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Hypothesis-Driven Debugging

A four-phase loop that turns debugging from "try random fixes and hope" into a disciplined investigation. Each phase has a goal, hard rules, and a rationalization table for the excuses an agent will invent to skip it.

The core principle: you may not write a fix until you have evidence that your hypothesis is correct. Guessing is not debugging.

When to Use

  • A test fails and the cause is not immediately obvious
  • The same bug has been "fixed" twice and came back
  • The agent tried a fix that didn't work — stop it from trying another
  • A crash or error message you haven't seen before
  • Performance regression with no obvious culprit
  • Behavior differs between environments (local vs CI, dev vs prod)
  • The agent is stuck in a loop, applying the same wrong fix

When NOT to Use

  • Typos, missing imports, or syntax errors — just fix them
  • Build failures with an obvious single-line cause
  • Compiler/linter messages that tell you exactly what and where
  • You already know the root cause and just need to write the fix

If the bug survived one fix attempt, switch to this skill immediately.

The Debug Loop

  OBSERVE  ──▶  HYPOTHESIZE  ──▶  EXPERIMENT  ──▶  CONCLUDE
     │              │                  │               │
     ▼              ▼                  ▼               ▼
  Gather          List 3-5         One minimal       Root cause
  symptoms,       possible         test per          confirmed
  reproduce       causes +         hypothesis,       or loop
  reliably        evidence         max 5 lines       back
     │              │                  │               │
     └──────────────┴──────────────────┴───────────────┘
              write everything to DEBUG.md

Hard rules:

  1. Everything gets written to DEBUG.md. Context compaction will eat your reasoning if it only lives in the conversation.
  2. You may not write fix code during Observe, Hypothesize, or Experiment.
  3. You may not skip Hypothesize. "I think I know what it is" is a hypothesis — write it down and test it like the others.
  4. Each experiment changes at most 5 lines. If your experiment needs more, your hypothesis is too vague — split it.

Phase 1: OBSERVE

Goal. Collect raw facts. Reproduce the bug. Separate what you *know* from what you *assume*.

Steps.

  1. Reproduce the bug. Get the exact error message, stack trace, or wrong output. If you cannot reproduce it, that is your first finding.
  2. Find the minimal reproduction. Strip away unrelated code until the bug still appears.
  3. Record the environment: OS, runtime version, dependencies, config.
  4. Note what *does* work. The boundary between working and broken is where the bug lives.
  5. Write all observations to DEBUG.md under ## Observations.

Exit criteria.

  • Bug reproduced (or documented as non-reproducible with conditions)
  • Exact error message or wrong behavior recorded
  • Minimal reproduction identified
  • Observations written to DEBUG.md

Common Rationalizations

ExcuseReality
"I already know what's wrong"Then write it as a hypothesis and prove it. If you're right, it takes 2 minutes.
"Let me just try this quick fix first"That's how you end up 45 minutes deep with 6 failed attempts.
"The error message is clear enough"Error messages describe symptoms, not causes. NullPointerException tells you what died, not why.
"I don't need to reproduce it, I can see the bug in the code"Can you? Then why hasn't it been fixed yet?

Phase 2: HYPOTHESIZE

Goal. Generate 3-5 possible root causes. For each, list supporting and conflicting evidence from Phase 1. Rank by likelihood.

Steps.

  1. List 3-5 hypotheses. Not 1. Not "I think it's X." Three minimum. Think across categories:

- Data: wrong input, missing field, type mismatch, encoding - Logic: wrong condition, off-by-one, race condition, wrong order - Environment: config, version, dependency, permissions - State: stale cache, leaked state, initialization order

  1. For each hypothesis, write:

- Supports: evidence from observations that backs this theory - Conflicts: evidence that argues against it - Test: the minimal experiment that would prove or disprove it

  1. Mark the ROOT HYPOTHESIS — the one with supporting evidence and no conflicting evidence. If multiple qualify, pick the easiest to test.
  2. Write everything to DEBUG.md under ## Hypotheses.

Example format in DEBUG.md:

## Hypotheses

### H1: Race condition in session middleware (ROOT HYPOTHESIS)
- Supports: only happens under concurrent requests, timing-dependent
- Conflicts: none yet
- Test: add mutex lock around session read, check if bug disappears

### H2: Stale cache returning expired token
- Supports: works after restart (cache cleared)
- Conflicts: cache TTL is 5min, bug appears within 30s
- Test: disable cache, reproduce

### H3: Wrong env variable in CI
- Supports: works locally, fails in CI
- Conflicts: env diff shows identical values
- Test: print actual runtime value in CI logs

Exit criteria.

  • At least 3 hypotheses written
  • Each has supporting/conflicting evidence
  • Each has a specific, minimal test
  • ROOT HYPOTHESIS identified
  • All written to DEBUG.md

Common Rationalizations

ExcuseReality
"I only have one theory"You have one *favorite* theory. Think harder. What if it's not that?
"Writing this down is slow"Debugging without writing is slower. You'll forget hypothesis 2 after compaction eats it.
"The first hypothesis is obviously right"Then proving it takes 2 minutes. If you skip proof, you'll spend 30 minutes when it turns out wrong.
"I don't have conflicting evidence"That means you haven't looked hard enough, or it really is the root cause. Either way, test it.

Phase 3: EXPERIMENT

Goal. Test the ROOT HYPOTHESIS with the smallest possible change. You are a scientist — you are trying to falsify, not confirm.

Steps.

  1. Write the experiment before running it. What will you change? What result confirms the hypothesis? What result rejects it?
  2. Make the change. Maximum 5 lines. If you need more, your hypothesis is too vague.
  3. Run the reproduction from Phase 1.
  4. Record the result in DEBUG.md under ## Experiments.

Experiment rules.

  • One variable at a time. Do not combine two fixes "to save time."
  • Do not write production fix code. Write diagnostic code: log statements, assertions, simplified logic, hardcoded values.
  • Revert the experiment after recording results. Keep the tree clean.
  • If the experiment is inconclusive, that's a result — record it and test the next hypothesis.

Exit criteria.

  • Experiment executed (one change, one variable)
  • Result recorded: confirmed, rejected, or inconclusive
  • Experimental code reverted
  • Results written to DEBUG.md

Common Rationalizations

ExcuseReality
"Let me just fix it instead of testing"Fixing without confirming the cause is how you ship a wrong fix that breaks something else.
"I'll test two things at once to save time"When both change and the bug disappears, which one fixed it? Now you have to test again.
"5 lines isn't enough"5 lines is enough to add a log, an assertion, a hardcoded value, or a short-circuit. If it isn't, your hypothesis is "something is wrong somewhere" — not a hypothesis.
"I don't need to revert, the fix is basically the experiment"The experiment is diagnostic. The fix is production code. They have different quality bars.

Phase 4: CONCLUDE

Goal. Confirm root cause, write the real fix, and add a regression test.

Steps.

  1. If ROOT HYPOTHESIS confirmed:

- Write the root cause in one sentence in DEBUG.md. - Now — and only now — write production fix code. - Add a regression test that fails without the fix and passes with it. - Commit fix and test together.

  1. If ROOT HYPOTHESIS rejected:

- Record the rejection and evidence in DEBUG.md. - Promote the next hypothesis to ROOT. Return to Phase 3. - If all hypotheses rejected, return to Phase 1 with new observations.

  1. Update DEBUG.md with the final ## Root Cause and ## Fix sections.

Exit criteria.

  • Root cause identified and written in one sentence
  • Fix committed
  • Regression test committed
  • DEBUG.md complete with full investigation trail
  • Original reproduction case now passes

Common Rationalizations

ExcuseReality
"I don't need a regression test, it's a simple fix"Simple fixes for simple bugs don't need this skill. You're here because it wasn't simple. Add the test.
"The DEBUG.md is just for debugging, I'll delete it"Keep it. Future-you debugging the same area will thank present-you.
"All hypotheses failed, I'm stuck"Go back to Observe. You missed something. The bug exists, therefore a cause exists.

The Anti-Bulldozer Rule

The #1 failure mode of AI debugging: the agent forms a theory, writes 150 lines of "fix" code, it doesn't work, so it writes another 150 lines going deeper into the same wrong theory.

This skill exists to prevent that. If you catch yourself or the agent:

  • Writing more than 5 lines before confirming a hypothesis → STOP. Back to Phase 2.
  • Trying the same approach a second time → STOP. The hypothesis is rejected. Next one.
  • Ignoring conflicting evidence → STOP. Write it down. Re-rank hypotheses.
  • Feeling "almost there" after 3 failed attempts → STOP. You are bulldozing.

Write it down. Test it. Prove it. Then fix it.

平台分布

Codex

34.6%
按下载量换算57

Claude

31.31%
按下载量换算52

Cursor

20.49%
按下载量换算34

Gemini CLI

10.24%
按下载量换算17

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills