Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计通过

debug-investigator调试调查员

Agent Skill

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

总安装

461

周安装

19

GitHub Stars

217

下载量

150
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/mathews-tom/praxis-skills --skill debug-investigator

简介

debug-investigator 采用假设驱动法替代随机尝试,系统化捕获症状、分析证据与生成修复策略。

  • 适用于偶发性 bug、复杂竞态条件、深层内存泄漏等非直观错误场景的调查处理。
  • 自动设计二分策略与 instrumentation 插入点,输出最小化复现用例与回归测试方案。
  • 每个步骤详细记录避免重复劳动,形成可追溯的调试知识图谱供后续问题复用。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Debug Investigator

Structured debugging methodology that replaces ad-hoc exploration with hypothesis-driven investigation. Captures symptoms, analyzes evidence (stacktraces, logs, state), generates ranked hypotheses, designs bisection strategies, identifies instrumentation points, and produces minimal reproductions — documenting every step so dead ends are never revisited.

When to use this skill vs native debugging: The base model handles straightforward debugging (clear stacktraces, obvious errors) natively. Use this skill for non-obvious bugs requiring systematic investigation: intermittent failures, bugs with no clear stacktrace, performance regressions, or issues requiring git bisection and hypothesis ranking.

Reference Files

FileContentsLoad When
references/stacktrace-patterns.mdException taxonomy, traceback reading, common Python/JS error signaturesStacktrace or exception present
references/hypothesis-templates.mdBug category catalog, probability ranking, confirmation/refutation testsAlways
references/bisection-guide.mdgit bisect workflow, binary search debugging, narrowing techniquesBug appeared after a change
references/log-analysis.mdLog pattern extraction, anomaly detection, timeline correlationLog output available
references/instrumentation-points.mdStrategic logging placement, breakpoint strategy, state inspection techniquesInvestigation plan needed

Prerequisites

  • git — for bisection and history analysis
  • Access to source code — cannot debug opaque binaries
  • Reproducible environment — or at minimum, error output (stacktrace, logs)

Workflow

Phase 1: Symptom Capture

Before touching code, document the observable problem:

  1. What is happening? — Describe the observed behavior precisely. "It crashes" is insufficient. "Raises KeyError('user_id') on line 42 of auth.py when calling get_current_user() with a valid session token" is actionable.
  2. What should happen? — Define the expected behavior. If unknown, state that.
  3. Reproducibility — Always, intermittent (with frequency), or one-time? Intermittent bugs require different strategies than deterministic ones.
  4. Recency — When did this start? Correlate with recent changes: git log --oneline -20. If the bug appeared after a specific commit, bisection is the fastest path.
  5. Environment — Python version, OS, dependency versions, configuration differences between working and broken environments.

Phase 2: Evidence Analysis

Examine all available evidence before forming hypotheses:

  1. Stacktrace interpretation — If a traceback exists, read it bottom-up. The last frame is where the error manifested, but the cause is often several frames up. Identify:

- Exception type and message - The frame where the error originated vs. where it was raised - Any familiar patterns (see references/stacktrace-patterns.md)

  1. Log pattern extraction — Search logs for:

- Temporal anomalies (timestamps out of sequence, gaps) - Repeated errors (same error appearing in bursts) - State transitions that didn't complete - Correlation with external events (deploys, config changes)

  1. State inspection — If the system is running, inspect:

- Variable values at the failure point - Database state (missing rows, unexpected values) - Configuration values (environment variables, config files) - External dependency status (API availability, DB connectivity)

  1. Code diff analysis — If the bug is recent:

- git diff HEAD~5 — what changed? - Focus on files touched by the error's call chain - Look for typos, wrong variable names, missing null checks

Phase 3: Hypothesis Generation

Generate ranked hypotheses — never start fixing without a hypothesis:

  1. List 3-5 hypotheses ranked by likelihood. Each hypothesis must include:

- A concrete claim about what is wrong - What evidence supports it - What evidence would confirm it (a test you can run) - What evidence would refute it

  1. Rank by likelihood using:

- Proximity to recent changes (most bugs are in new code) - Simplicity (typos before race conditions) - Evidence fit (does the hypothesis explain ALL symptoms?)

  1. Common bug categories (see references/hypothesis-templates.md):

- State bugs: wrong value, missing initialization, stale cache - Logic bugs: off-by-one, wrong operator, inverted condition - Integration bugs: API contract mismatch, serialization error - Concurrency bugs: race condition, deadlock, resource starvation - Environment bugs: missing dependency, wrong config, version mismatch

Phase 4: Investigation Plan

Design specific steps to test each hypothesis:

  1. Test H1 first — Always test the most likely hypothesis first. Design a single action that will confirm or refute it.
  2. Bisection — If the bug appeared after a change and H1 fails:

- Identify the known-good and known-bad commits - Run git bisect start <bad> <good> - Define the test command for each commit - See references/bisection-guide.md for workflow

  1. Isolation — Remove variables one at a time:

- Simplify input data - Disable features/plugins - Replace external calls with hardcoded values - Run in a clean environment

  1. Instrumentation — Add targeted logging/breakpoints:

- At function entry/exit points in the call chain - Before and after state mutations - At decision points (if/else branches) - See references/instrumentation-points.md

Phase 5: Execution

Execute the investigation plan, updating hypotheses as evidence arrives:

  1. Test one variable at a time — Changing multiple things simultaneously makes results uninterpretable.
  2. Record results — Document what each test revealed, even negative results. Dead-end documentation prevents revisiting failed paths.
  3. Update probabilities — After each test, re-rank hypotheses. If H1 is refuted, H2 becomes the new priority.
  4. Know when to escalate — If all hypotheses are exhausted, the bug is in a category you haven't considered. Step back and re-examine assumptions.

Phase 6: Resolution Documentation

After finding the root cause:

  1. Root cause — What was actually wrong, precisely.
  2. Fix — What was changed and why.
  3. Prevention — How to prevent recurrence (test, lint rule, type check, etc.).
  4. Lessons — What was learned that applies beyond this specific bug.

Output Format

## Debug Investigation: {Brief Description}

### Symptom
**Observed:** {What is happening — precise description}
**Expected:** {What should happen}
**Reproducibility:** {Always | Intermittent (~N% of attempts) | Once}
**First noticed:** {Date/time or triggering event}
**Environment:** {Relevant versions and configuration}

### Evidence Analysis

#### Stacktrace
- **Exception:** {type}: {message}
- **Origin:** {file}:{line} in {function}
- **Call chain:** {caller} → {caller} → {failure point}
- **Key insight:** {What the traceback reveals about the cause}

#### Logs
- **Anomaly:** {What is unusual}
- **Timeline:** {When the anomaly started}
- **Correlation:** {Related events}

#### Code Changes
- **Recent commits:** {relevant commits since last known-good state}
- **Files in error path:** {which changed files appear in the traceback}

### Hypotheses

| # | Hypothesis | Likelihood | Confirming Test | Refuting Test |
|---|------------|------------|-----------------|---------------|
| H1 | {Specific claim} | High | {What to check} | {What would disprove} |
| H2 | {Specific claim} | Medium | {What to check} | {What would disprove} |
| H3 | {Specific claim} | Low | {What to check} | {What would disprove} |

### Investigation Plan

#### Step 1: Test H1 — {action}
- **Command/action:** {specific step}
- **If confirmed:** {next action — fix}
- **If refuted:** proceed to Step 2

#### Step 2: Bisection
- **Good commit:** {hash}
- **Bad commit:** {hash}
- **Test:** {command to verify each commit}
- **Command:** `git bisect start {bad} {good}`

#### Step 3: Isolation
- **Remove:** {variable to eliminate}
- **Expected change:** {what should happen}

### Instrumentation Points
1. {file}:{line} — log {variable/state} to observe {what}
2. {file}:{line} — breakpoint to inspect {what}

### Minimal Reproduction

Minimal code that triggers the bug

{code}


### Resolution

**Root cause:** {What was wrong} **Fix:** {What was changed — file:line, diff summary} **Prevention:** {Test added, lint rule, type annotation, etc.} **Lessons:** {What generalizes beyond this bug}

Configuring Scope

ModeScopeDepthWhen to Use
quickSingle errorH1 test + fixClear stacktrace, obvious cause
standardFull investigation3 hypotheses + bisection planDefault for non-obvious bugs
deepSystemic analysis5+ hypotheses + instrumentation + reproductionIntermittent bugs, no stacktrace, production issues

Calibration Rules

  1. Hypotheses before code changes. Never start modifying code without at least one

explicit hypothesis. "Let me try this" is not debugging — it's guessing.

  1. One variable at a time. Each investigation step should change exactly one thing.

If you change two things and the bug disappears, you don't know which fixed it.

  1. Document dead ends. Failed hypotheses are valuable — they narrow the search space.

Record what was tested and what was learned.

  1. Simplest explanation first. Test typos, wrong variable names, and missing imports

before considering race conditions, compiler bugs, or cosmic rays.

  1. Reproduce before fixing. If you cannot reproduce the bug in a controlled environment,

any fix is speculative. Invest in reproduction first.

  1. Root cause, not symptoms. A fix that addresses the symptom (adding a null check)

without understanding the root cause (why was it null?) leaves the real bug alive.

Error Handling

ProblemResolution
No stacktrace availableFocus on log analysis and state inspection. Use instrumentation to generate diagnostic output.
Bug is intermittentAdd persistent logging at key decision points. Run under stress (high load, concurrent requests) to increase reproduction rate.
Cannot reproduce locallyCompare environments systematically: versions, config, data, timing. Use docker or VM to mirror production.
Multiple hypotheses equally likelyDesign a single test that distinguishes between them. Binary decision: "If X, then H1; if Y, then H2."
Fix attempted but bug persistsThe hypothesis was wrong. Revert the fix, update hypothesis rankings, and proceed to the next hypothesis. Do not stack fixes.
Bug is in a dependencyConfirm with a minimal reproduction that uses only the dependency. Check issue trackers. Pin to last known-good version while awaiting upstream fix.

When NOT to Investigate

Push back if:

  • The error message already contains the fix ("missing module X" → install X)
  • The issue is a known environment setup problem (wrong Python version, missing env var)
  • The "bug" is actually a feature request or design disagreement — redirect to ADR or discussion
  • The code is not under the user's control (third-party SaaS, managed service) — file a support ticket instead
  • The user wants to debug generated/minified code — debug the source, not the output

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.83%
按下载量换算51

Claude

29.82%
按下载量换算45

Cursor

17.61%
按下载量换算26

Gemini CLI

8.77%
按下载量换算13

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

来源信息

继续浏览同类 Skills