debug

GitHub

提供系统化的错误调试方法,涵盖复现、定位、理解、修复和验证五个步骤。针对常见错误模式给出排查建议,指导开发者高效解决代码中的意外行为和缺陷。

picoagents/src/picoagents/skills/debug/SKILL.md victordibia/designing-multiagent-systems

Trigger Scenarios

遇到程序报错或异常 需要排查代码逻辑错误 分析堆栈跟踪信息

Install

npx skills add victordibia/designing-multiagent-systems --skill debug -g -y
More Options

Non-standard path

npx skills add https://github.com/victordibia/designing-multiagent-systems/tree/main/picoagents/src/picoagents/skills/debug -g -y

Use without installing

npx skills use victordibia/designing-multiagent-systems@debug

指定 Agent (Claude Code)

npx skills add victordibia/designing-multiagent-systems --skill debug -a claude-code -g -y

安装 repo 全部 skill

npx skills add victordibia/designing-multiagent-systems --all -g -y

预览 repo 内 skill

npx skills add victordibia/designing-multiagent-systems --list

SKILL.md

Frontmatter
{
    "name": "debug",
    "triggers": "debug, error, bug, fix, not working, broken",
    "description": "Systematic approach to debugging errors and unexpected behavior"
}

Debug Skill

Debugging Process

1. Reproduce

  • Get the exact error message
  • Find the minimal steps to trigger it
  • Note the environment (Python version, OS, dependencies)

2. Locate

  • Read the full stack trace (bottom = where it crashed, top = root cause)
  • Find the relevant file and line
  • Read surrounding code for context

3. Understand

  • What was the code trying to do?
  • What input caused the failure?
  • What assumption was violated?

4. Fix

  • Make the minimal change that fixes the issue
  • Don't refactor while debugging
  • Add a test that would have caught this

5. Verify

  • Run the failing case again
  • Run the full test suite
  • Check for similar patterns elsewhere

Common Patterns

NoneType errors: Something returned None unexpectedly. Check the call chain.

Import errors: Missing dependency or circular import. Check requirements and import order.

Key/Index errors: Accessing something that doesn't exist. Add existence checks.

Type errors: Wrong type passed. Check function signatures and callers.

Workflow

  1. grep for the error message in codebase
  2. Read the stack trace bottom-to-top
  3. Read the failing function
  4. Add logging/print if needed to trace values
  5. Fix and verify

Version History

  • 1aebb31 Current 2026-07-24 16:09

Same Skill Collection

picoagents/src/picoagents/skills/code-review/SKILL.md

Metadata

Files
0
Version
dab42b2
Hash
8bc92ef9
Indexed
2026-07-24 16:09

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-16 23:04
浙ICP备14020137号-1 $mapa de visitantes$