Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计未展示

debugging-and-diagnosis调试与诊断

Agent Skill

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

总安装

643

周安装

26

GitHub Stars

公开资料未说明

下载量

202
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

AgentSkills.tonpx skills
npx skills add outfitter-dev/agents --skill "debugging-and-diagnosis"

简介

用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词快速定位候选结果时使用。

  • 适用于调试与诊断相关的任务场景。
  • 可结合来源仓库和原始 README 核验具体用法。
  • 安装前建议确认权限范围和维护状态。
  • debugging-and-diagnosis 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Systematic Debugging

Evidence-based investigation -> root cause -> verified fix.

<when_to_use>

  • Bugs, errors, exceptions, crashes
  • Unexpected behavior or wrong results
  • Failing tests (unit, integration, e2e)
  • Intermittent or timing-dependent failures
  • Performance issues (slow, memory leaks, high CPU)
  • Integration failures (API, database, external services)

NOT for: obvious fixes, feature requests, architecture planning

</when_to_use>

<iron_law>

NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST

Never propose solutions or "try this" without understanding root cause through systematic investigation.

</iron_law>

Track with TodoWrite. Phases advance forward only.

PhaseTriggeractiveForm
Collect EvidenceSession start"Collecting evidence"
Isolate VariablesEvidence gathered"Isolating variables"
Formulate HypothesesProblem isolated"Formulating hypotheses"
Test HypothesisHypothesis formed"Testing hypothesis"
Verify FixFix identified"Verifying fix"

Situational (insert when triggered):

  • Iterate -> Hypothesis disproven, loops back with new hypothesis

Workflow:

  • Start: "Collect Evidence" as in_progress
  • Transition: Mark current completed, add next in_progress
  • Failed hypothesis: Add "Iterate" task
  • Quick fixes: If root cause obvious from error, skip to "Verify Fix" (still create failing test)
  • Need more evidence: Add new evidence task (don't regress phases)
  • Circuit breaker: After 3 failed hypotheses -> escalate

<quick_start>

  1. Create "Collect Evidence" todo as in_progress
  2. Reproduce - exact steps to trigger consistently
  3. Investigate - gather evidence about what's happening
  4. Analyze - compare working vs broken, find differences
  5. Test hypothesis - single specific hypothesis, minimal test
  6. Implement - failing test first, then fix
  7. Update todos on phase transitions

</quick_start>

<phase_1_root_cause>

Goal: Understand what's actually happening.

Transition: Mark complete when you have reproduction steps and initial evidence.

Read error messages completely

  • Stack traces top to bottom
  • Note file paths, line numbers, variable names
  • Look for "caused by" chains

Reproduce consistently

  • Document exact trigger steps
  • Note inputs that cause vs don't cause
  • Check if intermittent (timing, race conditions)
  • Verify in clean environment

Check recent changes

  • git diff - what changed?
  • git log --since="yesterday" - recent commits
  • Dependency updates
  • Config/environment changes

Gather evidence

  • Add logging at key points
  • Print variable values at transformations
  • Log function entry/exit with parameters
  • Capture timestamps for timing issues

Trace data flow backward

  • Where does bad value come from?
  • Track through transformations
  • Find first place it becomes wrong

Red flags (return to evidence gathering):

  • "I think maybe X is the problem"
  • "Let's try changing Y"
  • "It might be related to Z"
  • Starting to write code before understanding

</phase_1_root_cause>

<phase_2_pattern_analysis>

Goal: Learn from working code to understand broken code.

Transition: Mark complete when key differences identified.

Find working examples

  • Search for similar functionality that works
  • rg "pattern" for similar patterns
  • Look for passing vs failing tests
  • Check git history for when it worked

Read references completely

  • Every line, not skimming
  • Full context
  • All dependencies/imports
  • Configuration and setup

Identify every difference

  • Line by line working vs broken
  • Different imports?
  • Different function signatures?
  • Different error handling?
  • Different data flow?
  • Different configuration?

Understand dependencies

  • Libraries/packages involved
  • Versions in use
  • External services
  • Shared state
  • Assumptions made

Questions to answer:

  • Why does working version work?
  • What's fundamentally different?
  • Edge cases working version handles?
  • Invariants working version maintains?

</phase_2_pattern_analysis>

<phase_3_hypothesis_testing>

Goal: Test one specific idea with minimal change.

Transition: Mark complete when specific, evidence-based hypothesis formed.

Form single hypothesis

  • Template: "X is root cause because Y"
  • Must explain all symptoms
  • Must be testable with small change
  • Must be based on evidence from phases 1-2

Design minimal test

  • Smallest change to test hypothesis
  • Change ONE variable
  • Preserve everything else
  • Make reversible

Execute and verify

  • Apply change
  • Run reproduction steps
  • Observe carefully
  • Document results

Outcomes:

  • Fixed: Confirm across all cases, proceed to Verify Fix
  • Not fixed: Mark complete, add "Iterate", form NEW hypothesis
  • Partially fixed: Add "Iterate" for remaining issues
  • Never: Random variations hoping one works

Bad hypotheses (too vague):

  • "Maybe it's a race condition"
  • "Could be caching or permissions"
  • "Probably something with the database"

Good hypotheses (specific, testable):

  • "Fails because expects number but receives string when API returns empty"
  • "Race condition: fetchData() called before initializeClient() completes"
  • "Memory leak: event listeners in useEffect never removed in cleanup"

</phase_3_hypothesis_testing>

<phase_4_implementation>

Goal: Fix root cause permanently with verification.

Transition: Root cause confirmed, ready for permanent fix.

Create failing test

  • Write test reproducing bug
  • Verify fails before fix
  • Should pass after fix
  • Captures exact broken scenario

Implement single fix

  • Address identified root cause
  • No additional "improvements"
  • No refactoring "while you're there"
  • Just fix the problem

Verify fix

  • Failing test now passes
  • Existing tests still pass
  • Manual reproduction no longer triggers bug
  • No new errors/warnings

Circuit breaker If 3+ fixes tried without success: STOP

  • Problem isn't hypothesis - problem is architecture
  • May be using wrong pattern entirely
  • Escalate or redesign

After fixing:

  • Mark "Verify Fix" completed
  • Add defensive validation
  • Document root cause
  • Consider similar bugs elsewhere

</phase_4_implementation>

<red_flags>

STOP and return to Phase 1 if you catch yourself:

  • "Quick fix for now, investigate later"
  • "Just try changing X and see"
  • "I don't fully understand but this might work"
  • "One more fix attempt" (already tried 2+)
  • "Let me try a few different things"
  • Proposing solutions before gathering evidence
  • Skipping failing test case
  • Fixing symptoms instead of root cause

ALL mean: STOP. Add new "Collect Evidence" task.

</red_flags>

When to escalate:

  1. After 3 failed fix attempts - architecture may be wrong
  2. No clear reproduction - need more context/access
  3. External system issues - need vendor/team involvement
  4. Security implications - need security expertise
  5. Data corruption risks - need backup/recovery planning

Before claiming "fixed":

  • Root cause identified with evidence
  • Failing test case created
  • Fix addresses root cause only
  • Test now passes
  • All existing tests pass
  • Manual reproduction no longer triggers bug
  • No new warnings/errors
  • Root cause documented
  • Prevention measures considered
  • "Verify Fix" marked completed

Understanding the bug is more valuable than fixing it quickly.

ALWAYS:

  • Create "Collect Evidence" todo at session start
  • Follow four-phase framework
  • Update todos on phase transitions
  • Create failing test before fix
  • Test single hypothesis at a time
  • Document root cause after fix
  • Mark "Verify Fix" complete only after tests pass

NEVER:

  • Propose fixes without understanding root cause
  • Skip evidence gathering
  • Test multiple hypotheses simultaneously
  • Skip failing test case
  • Fix symptoms instead of root cause
  • Continue after 3 failed fixes without escalation
  • Regress phases - add new tasks if needed

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

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

平台分布

Claude Code

28.77%
按下载量换算58

windsurf

24.54%
按下载量换算50

OpenCode

18.77%
按下载量换算38

Cursor

11.34%
按下载量换算23

Codex

7.66%
按下载量换算15

Antigravity

3.63%
按下载量换算7

安全审计

暂无安全审计结果可展示。

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

来源信息

继续浏览同类 Skills