Token导航 LogoToken导航

Agent Skill · 研究检索

debugging-code(调试代码)

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

debugging-code 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 23,724。

总安装 4,194周安装 173GitHub Stars 260下载 1,370核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/almogbaku/debug-skill --skill debugging-code

这个 Skill 是做什么的

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

交互式暂停程序执行并读取实时变量值与调用栈的快照式调试器。适用于崩溃瞬间的状态捕获或复杂控制流路径的可视化追踪需求。通过 DAP 协议与后台守护进程通信实现跨语言调试能力统一封装。首次使用需初始化 dap 守护进程并完成目标语言的适配器配置。

debugging-code 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/debugging-code

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

debugging-code 怎么安装?

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

debugging-code 支持哪些 AI 工具?

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

debugging-code 需要什么权限?

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

debugging-code 是免费的吗?

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

debugging-code 用的人多吗?

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

debugging-code 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

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

值得选的地方

  • 同时适配 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调用外部服务未明确有提醒
debugging-code

调试代码 · 本页

4,194260需要联网未明确有提醒

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

SKILL.md 原文

Interactive Debugger

Use when a program crashes, produces wrong output, or you need to understand exactly how execution reached a particular state — and running it again with more print statements won't give you the answer fast enough.

You can pause a running program at any point, read live variable values and the call stack at that exact moment, step forward line by line or jump to the next breakpoint, and evaluate arbitrary expressions against the live process — all without restarting.

Setup

This skill uses dap, a CLI tool that background daemon to interact with the debugger via the DAP Protocol, maintain the debugger state, so you can simply interact with it with multiple calls.

If dap isn't installed (check: command -v dap), install it NOW. Ask/notify the user before proceeding to install it.

From Homebrew (macOS)

brew install AlmogBaku/tap/dap

Installer script:

bash scripts/install-dap.sh

Install from sources:

go install github.com/AlmogBaku/debug-skill/cmd/dap@latest

This tool is open-sourced and available on GitHub, maintained and follows best practices.

Supports natively Python, Go, Node.js/TypeScript, Rust, C/C++, and any other language that supports DAP.

If a debugger backend is missing or fails to start, see references/installing-debuggers.md

For all commands and flags: dap --help or dap <cmd> --help.

Starting a Session

dap debug <file> launches the program under the debugger. Backend is auto-detected from the file extension.

Choose your starting strategy based on what you know:

  • Have a hypothesis — set a breakpoint where you expect the bug: dap debug script.py --break script.py:42
  • Conditional breakpoint — only stop when a condition is met: dap debug script.py --break "script.py:42:x > 5" (always quote specs with conditions)
  • Multi-file app — breakpoints across modules: --break src/api/routes.py:55 --break src/models/user.py:30
  • No hypothesis, small program — walk from entry: dap debug script.py --stop-on-entry (avoid for large projects — startup code is noisy; bisect with breakpoints instead)
  • Exception, location unknown — dap debug script.py --break-on-exception raised (Python) / all (Go/JS)
  • Remote process — dap debug --attach host:port --backend <name>
  • Process already running (stuck server, live issue) — attach without restarting: dap debug --pid <PID> --backend <name> macOS + Go gotcha: dlv --pid requires SIP disabled (csrutil disable). Prefer starting the program under the debugger instead or attaching to a remote debugger!

Session isolation: --session <name> keeps concurrent agents from interfering. Tip: You might want to use your session id(${CLAUDE_SESSION_ID}) if available.

Run dap debug --help for all flags, backends, and examples.

The Debugging Mindset

Reach for a debugger when reading source alone can't validate the root cause. A debugger lets you *observe* what *does* happen: actual values, actual path, actual state. When that diverges from what *should* happen, you've found your bug.

Two strikes, rethink. If two hypotheses fail at the same location, your mental model is wrong. Re-read the code, form a *completely different* theory with different breakpoints.

Escalate gradually. Start with dap eval to test a quick hypothesis. Use conditional breakpoints to filter noise. Fall back to full breakpoints + stepping only when you need interactive control.

Mimic the user journey. If you're debugging a user flow, set breakpoints along the path you expect the code to take. If you expected compute() to be called, but it never is, then the bug is in the caller — not compute(), but whatever was supposed to call it.

Set breakpoints instead of prints. When you feel the urge to print something, set a breakpoint instead.

Know Your State

Every dap execution command returns full context automatically: current location, source, locals, call stack, and output. At each stop, ask:

  • Do the local variables have the values I expected?
  • Is the call stack showing the code path I expected?
  • Does the output so far reveal anything unexpected?

Trace causation up the stack. If a value is wrong at frame 0, check dap eval "<expr>" --frame 1 to see what the caller passed. Keep going up (--frame 2, --frame 3) until you find the frame where the value first became wrong — that's the origin of the bug, not the symptom.

Example output at a stop:

Stopped at compute() · script.py:41
  39:   def compute(items):
  40:       result = None
> 41:       return result
Locals: items=[]  result=None
Stack:  main [script.py:10] → compute [script.py:41]
Output: (none)

If the program exits before hitting your breakpoint:

Program terminated · Exit code: 1

→ Move breakpoints earlier, or restart with --stop-on-entry.

Forming a Hypothesis

Before setting a breakpoint: *"I believe the bug is in X because Y."* A good hypothesis is falsifiable — your next observation will confirm or disprove it. No hypothesis yet? Bisect with two breakpoints to narrow the search space, or see starting strategies above.

Setting Breakpoints Strategically

  • Set where the problem *begins*, not where it *manifests*
  • Exception at line 80? Root cause is upstream — start earlier
  • Uncertain? Bisect: --break f:20 --break f:60 — wrong state before or after halves the search space

Where to break:

  • Boundaries — where data crosses a format, representation, or module boundary; state is cleanest here
  • State transitions — the line that assigns or mutates the corrupted value
  • Wrong branch — the condition whose inputs led to the bad path
  • Antipatterns — don't break inside library code; break at the call site instead. Don't use unconditional breaks in tight loops — use conditions.

Managing Breakpoints Mid-Session

As you learn more, add breakpoints deeper in the suspect code and remove ones that have served their purpose — progressive narrowing without restarting:

dap continue --break app.py:50              # add breakpoint deeper, then continue
dap continue --remove-break app.py:20       # drop a breakpoint you're done with
dap break add app.py:42 app.py:60           # add multiple breakpoints at once
dap break list                              # see what's set
dap break clear                             # start fresh

If a breakpoint is on an invalid line or the adapter adjusts it, dap warns you in the output.

Conditional Breakpoints

Stop only when a condition is true — essential for loops, hot paths, and specific input values. Syntax: "file:line:condition" (always quote).

dap debug app.py --break "app.py:42:i == 100"            # skip 99 iterations, stop on the one that matters
dap debug app.py --break "app.py:30:user_id == 123"      # reproduce a user-specific bug
dap continue --break "app.py:50:len(items) == 0"         # catch the empty-list case mid-session

Invariant Breakpoints

Conditional breakpoints as runtime assertions — stop the *moment* something goes wrong:

dap debug app.py --break "bank.py:68:balance < 0"          # catch the overdraft
dap debug app.py --break "pipe.py:30:type(val) != int"     # type violation

Navigating Execution

At each stop, choose how to advance based on what you suspect:

If you're stepping more than 3 times in a row, you need a breakpoint, not more steps.

dap step                         # step over — trust this call, advance to next line
dap step in                      # step into — suspect what's inside this function
dap step out                     # step out — you're in the wrong place, return to caller
dap continue                     # jump to next breakpoint
dap continue --to file:line      # run to line (temp breakpoint, auto-removed)
dap context                      # re-inspect current state without stepping
dap output                       # drain buffered stdout/stderr without full context
dap inspect <var> --depth N      # expand nested/complex objects
dap pause                        # interrupt a running/hanging program
dap restart                      # restart with same args and breakpoints
dap threads                      # list all threads
dap thread <id>                  # switch thread context

Each stop shows the current file:line so you always know where you are.

Use dap eval "<expr>" to probe live state without stepping:

dap eval "len(items)"
dap eval "user.profile.settings"
dap eval "expected == actual"       # test hypothesis on live state
dap eval "self.config" --frame 1    # frame 1 = caller (may be a different file)

Avoid eval expressions that call methods with side effects — they mutate program state and can corrupt your debugging session. Stick to read-only access unless you're intentionally testing a fix.

Skipping Ahead

When you need a quick look at a specific line without committing to a permanent breakpoint, use dap continue --to file:line. It's a disposable breakpoint — stops once, then vanishes. Good for "I just want to see what x looks like at line 50" without managing breakpoint lifecycle.

Advanced Scenarios

For advanced scenarios — hangs, concurrency bugs, deeply nested state, loop bisection — see ${CLAUDE_SKILL_DIR}/references/advanced-techniques.md.

Walkthrough

Bug: compute() returns None

Hypothesis: result not assigned before return
→ dap debug script.py --break script.py:41
  Locals: result=None, items=[]   ← wrong, and input is also empty

New hypothesis: caller passing empty list
→ dap eval "items" --frame 1      → []   ← confirmed
→ dap step out                    → caller at line 10, no guard for empty input
→ dap continue --break script.py:8 --remove-break script.py:41
  ← narrowing: add breakpoint at data source, drop the one we're done with
  Stopped at main():8, items loaded from config as []

Root cause: missing guard. Fix → dap stop.

No hypothesis (exception, unknown location):

Exception: TypeError, location unknown
→ dap debug script.py --break-on-exception raised
  Stopped at compute():41, items=None
Root cause: None passed where list expected.

Verify Your Fix

While paused at the bug, use eval to test your proposed fix expression against the live state. If it works in eval, it'll work in code. Then edit and dap restart to confirm end-to-end.

After applying a fix, re-run the same scenario to verify. dap restart re-runs with the same args and breakpoints — a fast feedback loop. Don't trust that a fix works until you've observed the correct behavior at the same breakpoint where you found the bug.

Cleanup

The dap session is usually automatically terminated when the program exits or after an idle timout. When the app is not closed properly (e.g. you killed it while debugging), you can terminate it manually: dap stop.

平台分布

Codex

34.91%
按下载量换算478

Claude

29.39%
按下载量换算403

Cursor

18.83%
按下载量换算258

Gemini CLI

8%
按下载量换算110

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

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

安装前确认

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

继续浏览同类 Skills