Token导航 LogoToken导航

Agent Skill · 研究检索

debugging(调试)

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

debugging 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证为 MIT,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 70,604。

总安装 210周安装 9GitHub Stars 142下载 73核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/thebushidocollective/han --skill debugging

这个 Skill 是做什么的

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

debugging 用于查找、检索和筛选相关信息。适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词、任务场景或来源线索快速定位候选结果。通过 npx skills add 命令从指定 GitHub 路径安装并使用。安装前需确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

建议结合来源仓库和原始 README 核验具体用法和功能边界。

来源仓库内路径:skills/debugging

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

debugging 怎么安装?

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

debugging 支持哪些 AI 工具?

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

debugging 需要什么权限?

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

debugging 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

debugging 用的人多吗?

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

debugging 安全吗?

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

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要厂商级技术支持和 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

调试 · 本页

210142接触敏感数据MIT通过

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

SKILL.md 原文

Debugging Skill

Systematic approaches to investigating and diagnosing bugs.

Core Principle

Understand before fixing. A proper diagnosis leads to a proper fix.

The Scientific Method for Debugging

1. Observe

Gather all the facts:

  • What's the symptom? (What's happening that shouldn't?)
  • When does it happen? (Always, sometimes, specific conditions?)
  • Who's affected? (All users, some users, specific scenarios?)
  • Error messages? (Exact text, stack traces, error codes?)
  • Recent changes? (What changed before this started?)

Evidence to collect:

  • Error messages and stack traces
  • Application logs
  • User reports
  • Reproduction steps
  • Environment details (browser, OS, versions)
  • Network requests/responses
  • Database query logs

2. Form Hypothesis

Based on symptoms, what could cause this?

Common categories:

  • Logic error: Code does wrong thing
  • State management: State gets out of sync
  • Async/timing: Race condition, callback hell
  • Data issue: Unexpected input format
  • Integration: API change, service down
  • Environment: Config, permissions, network
  • Resource: Memory leak, connection pool exhausted

Prioritize hypotheses:

  1. Most likely causes first
  2. Easiest to test first (when equal likelihood)
  3. Most impactful if true

3. Test Hypothesis

Design experiment to prove/disprove:

  • Add logging to see values
  • Add breakpoints to pause execution
  • Modify input to isolate variable
  • Disable feature to rule out
  • Compare with working version

Keep notes:

**Hypothesis:** Database query timeout
**Test:** Add query timing logs
**Result:** Query completes in 50ms
**Conclusion:** Not the database ❌

**Hypothesis:** Network latency
**Test:** Check network tab, add timing
**Result:** API call takes 5 seconds
**Conclusion:** Found the issue ✅

4. Analyze Results

What did you learn?

  • Hypothesis confirmed or rejected?
  • New questions raised?
  • Unexpected findings?
  • Root cause identified?

5. Repeat or Conclude

If root cause found:

  • Document findings
  • Estimate impact
  • Plan fix

If not found:

  • Form new hypothesis
  • Repeat cycle

Debugging Strategies

Strategy 1: Add Logging

Most universally useful technique:

// Strategic console.log placement
function processOrder(order) {
  console.log('processOrder START:', { orderId: order.id })

  const items = order.items
  console.log('items:', items.length)

  const validated = validate(items)
  console.log('validation result:', validated)

  if (!validated.success) {
    console.log('validation failed:', validated.errors)
    throw new Error('Invalid order')
  }

  const total = calculateTotal(items)
  console.log('total calculated:', total)

  console.log('processOrder END')
  return total
}

Logging guidelines:

  • Log function entry/exit
  • Log branching decisions
  • Log external calls (API, database)
  • Log unexpected values
  • Include context (IDs, user info)

Strategy 2: Use Debugger

Interactive debugging:

// Browser
function buggyFunction(input) {
  debugger;  // Execution pauses here
  const result = transform(input)
  debugger;  // And here
  return result
}

// Node.js
node --inspect app.js
# Then open chrome://inspect in Chrome

Debugger features:

  • Step over (next line)
  • Step into (into function call)
  • Step out (back to caller)
  • Watch expressions
  • Call stack inspection
  • Variable inspection

Strategy 3: Binary Search

Isolate the problem area:

// 100 lines of code, bug somewhere

// Comment out lines 50-100
// Bug still happens? It's in lines 1-50

// Comment out lines 25-50
// Bug disappears? It's in lines 25-50

// Comment out lines 37-50
// Bug still happens? It's in lines 25-37

// Continue until isolated to specific lines

Strategy 4: Rubber Duck Debugging

Explain the problem out loud:

  1. "This function is supposed to calculate shipping cost"
  2. "It takes the weight and destination"
  3. "First it... wait, it's using price instead of weight!"
  4. *(Bug found)*

Why this works: Forces you to examine assumptions.

Strategy 5: Compare Working vs Broken

What's different?

Version comparison:

# Find which commit broke it
git bisect start
git bisect bad HEAD
git bisect good v1.0.0
# Git checks out middle commit
npm test
git bisect good/bad
# Repeat until found

Environment comparison:

  • Works locally but not production?
  • Works for some users but not others?
  • Worked yesterday but not today?

What changed?

Strategy 6: Simplify

Reduce to minimal reproduction:

// Complex case with bug
processUserOrderWithDiscountsAndShipping(user, cart, promo, address)

// Simplify inputs one at a time
processUserOrderWithDiscountsAndShipping(user, [], null, null)
// Still breaks? Not discount or address

processUserOrderWithDiscountsAndShipping(null, [], null, null)
// Works now? It's the user object

// What about the user object causes it?

Strategy 7: Check Assumptions

Question everything:

// Assumption: API returns array
const users = await api.getUsers()
users.forEach(...)  // Crashes

// Check assumption
console.log(typeof users)  // "undefined"
console.log(users)          // undefined

// Assumption was wrong!

Common wrong assumptions:

  • Function returns expected type
  • Variable is defined
  • Array is not empty
  • API will always respond
  • Async operation has completed
  • State is up to date

Debugging by Symptom

"Intermittent failure"

Likely causes:

  • Race condition (timing-dependent)
  • Data-dependent (certain inputs trigger it)
  • Resource leak (happens after N operations)
  • External service flakiness

Investigation:

  • Add extensive logging
  • Look for async operations
  • Check timing between operations
  • Look for shared state
  • Run many times to see pattern

"Works locally, fails in production"

Check differences:

  • Environment variables
  • Data (production has different/more data)
  • Network (CORS, SSL, proxies)
  • Dependencies (versions, OS)
  • Resources (memory, connections)

"Slow performance"

Don't guess - profile:

Frontend:

  • Chrome DevTools > Performance tab
  • Look for long tasks (> 50ms)
  • Check for layout thrashing
  • Look for memory leaks

Backend:

  • Add timing logs around operations
  • Check database query time (EXPLAIN ANALYZE)
  • Check external API call time
  • Profile with APM tool

"Memory leak"

Investigation:

// Take heap snapshot
// Do operation that leaks
// Take another heap snapshot
// Compare - what increased?

Common causes:

  • Event listeners not removed
  • Closures holding references
  • Global variables accumulating
  • Intervals not cleared
  • Cache growing unbounded

"Crash/Exception"

Read the stack trace:

Error: Cannot read property 'map' of undefined
    at processUsers (app.js:42:15)
    at handleRequest (app.js:23:3)
    at Server.<anonymous> (server.js:12:5)

Stack trace tells you:

  • Line 42: Where it crashed
  • Line 23: Where it was called from
  • Line 12: Origin of the request

Then:

  • Go to line 42
  • Check what's undefined
  • Trace back why it's undefined

Common Bug Patterns

Null/Undefined

// Bug
function process(user) {
  return user.name.toUpperCase()  // Crashes if user is null
}

// Investigation
console.log('user:', user)  // undefined - why?
// Trace back to where user comes from

Off-by-One

// Bug
for (let i = 0; i <= array.length; i++) {  // <= instead of <
  process(array[i])  // Crashes on last iteration
}

// Investigation
console.log('i:', i, 'length:', array.length)
// Notice i === array.length causes array[i] === undefined

Async Timing

// Bug
let data
fetchData().then(result => {
  data = result
})
console.log(data)  // undefined - async not complete

// Investigation
console.log('1. Before fetch')
fetchData().then(result => {
  console.log('3. Got result')
  data = result
})
console.log('2. After fetch call')
// Output: 1, 2, 3 - async completes later

State Mutation

// Bug
function addItem(cart, item) {
  cart.items.push(item)  // Mutates input!
  return cart
}

const originalCart = { items: [] }
const newCart = addItem(originalCart, item)
// originalCart was modified - unexpected!

// Investigation
console.log('before:', originalCart)
const newCart = addItem(originalCart, item)
console.log('after:', originalCart)  // Changed!

Scope Issues

// Bug
for (var i = 0; i < 3; i++) {
  setTimeout(() => console.log(i), 100)
}
// Prints: 3, 3, 3 (expected 0, 1, 2)

// Investigation
// var is function-scoped, i is shared
// By time timeout fires, loop is done, i === 3

// Fix: Use let (block-scoped) or capture i

Debugging Tools

Browser Developer Tools

Console:

  • console.log() - Print values
  • console.table() - Display arrays/objects as table
  • console.trace() - Print stack trace
  • console.time() / console.timeEnd() - Measure duration

Debugger:

  • Set breakpoints
  • Step through code
  • Inspect variables
  • Watch expressions
  • Call stack

Network:

  • View all requests
  • See request/response headers and bodies
  • Measure timing
  • Replay requests

Performance:

  • Record profile
  • See function call tree
  • Identify bottlenecks
  • Check memory usage

Command Line Tools

# Search for text in files
grep -r "error" logs/

# Follow log file
tail -f logs/app.log

# Search with context
grep -B 5 -A 5 "ERROR" logs/app.log

# Find large files
du -sh *

# Check disk space
df -h

# Check memory
free -m

# Check running processes
ps aux | grep node

Database Debugging

-- PostgreSQL
EXPLAIN ANALYZE SELECT * FROM users WHERE email = 'test@example.com';

-- Show slow queries
SELECT * FROM pg_stat_statements ORDER BY total_time DESC LIMIT 10;

-- Check table size
SELECT pg_size_pretty(pg_total_relation_size('users'));

-- Check indexes
\d users

Debugging Checklist

Before Starting

  • Can reproduce the issue reliably?
  • Have error message or symptom description?
  • Know when it started happening?
  • Checked if recent changes related?
  • Checked logs for clues?

During Investigation

  • Formed clear hypothesis?
  • Testing hypothesis systematically?
  • Taking notes on findings?
  • Not making random changes hoping to fix?
  • Questioning assumptions?

After Finding Root Cause

  • Understand WHY it happens?
  • Can explain it to someone else?
  • Documented findings?
  • Estimated impact?
  • Identified proper fix?

Anti-Patterns

❌ Random Code Changes

BAD: "Maybe if I change this... nope, try this... nope, try this..."
GOOD: "Hypothesis: X causes Y. Test: Change X. Result: Y still happens.
       Conclusion: X is not the cause."

❌ Assuming Without Verifying

BAD: "The API must be returning valid data"
GOOD: "Let me log the API response to see what it actually returns"

❌ Stopping at Symptoms

BAD: "The page is blank. Fixed by adding a null check."
GOOD: "The page is blank because user is null. User is null because
       authentication token expired. Root cause: token not being refreshed."

❌ Debugging in Production

BAD: "Let me add console.log to production to see..."
GOOD: "Let me reproduce locally and debug there, or use proper logging"

❌ No Reproduction Steps

BAD: "It crashed once, let me guess why"
GOOD: "Let me find reliable way to reproduce it first"

Integration with Other Skills

  • Use proof-of-work skill to document evidence
  • Use test-driven-development skill to add regression test after fix
  • Use explainer skill when explaining bug to others
  • Use boy-scout-rule skill while fixing (improve surrounding code)

Remember

  1. Reproduce first - If you can't reproduce, you can't debug
  2. Gather evidence - Don't guess, look at data
  3. Form hypothesis - What do you think is wrong?
  4. Test systematically - Prove or disprove hypothesis
  5. Find root cause - Not just symptoms
  6. Document - Help future you and others

Debugging is detective work. Be methodical, not random.

平台分布

Claude Code

25.31%
按下载量换算18

OpenCode

22.48%
按下载量换算16

Codex

17.88%
按下载量换算13

Antigravity

12.43%
按下载量换算9

Gemini CLI

7.81%
按下载量换算6

Cursor

3.42%
按下载量换算2

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills