重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
qa-debugging by vasilyu1983/ai-agents-public
npx skills add https://github.com/vasilyu1983/ai-agents-public --skill qa-debugging使用系统化调试方法,将症状转化为证据,再通过回归测试和预防计划转化为已验证的修复方案。
复现:
隔离:
git bisect)。插桩:
修复:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
验证:
预防:
| 症状 | 首要行动 | 常见陷阱 |
|---|---|---|
| 崩溃/异常 | 从代码中的第一个堆栈帧开始;捕获请求/跟踪ID | 修复最后一个错误,而非第一个原因 |
| 错误输出 | 创建“已知正确与错误”的差异;隔离第一个出现分歧的状态 | 从UI向后调试,而没有缩小输入范围 |
| 间歇性/不稳定 | 启用跟踪后重新运行;通过ID关联;分类不稳定类型 | 未证明存在竞争条件就添加休眠 |
| 缓慢/超时 | 识别瓶颈(CPU/内存/数据库/网络);在更改代码前进行分析 | 没有基线测量就进行“优化” |
| 仅生产环境出现 | 比较配置/数据量/功能标志;使用安全的可观测性工具 | 没有计划就在生产环境进行交互式调试 |
| 分布式问题 | 使用端到端跟踪;跨服务跟踪单个请求 | 没有关联ID就搜索日志 |
当调试涉及URL、域名、ID或第三方负载的故障时,在下游分析器执行之前,在最早的边界处对输入进行分类和验证。
domain、display_name、uuid、slug、email、free_text)。如果没有边界规范化,无效的上游输入会变成下游的DNS/HTTP故障,从而掩盖真正的根本原因并浪费重试机会。
| 需求 | 阅读/使用 | 位置 |
|---|---|---|
| 分步RCA工作流程 | 操作模式 | references/operational-patterns.md |
| 调试方法 | 方法论 | references/debugging-methodologies.md |
| 记录什么/何时记录 | 日志记录指南 | references/logging-best-practices.md |
| 安全的生产环境调试 | 生产模式 | references/production-debugging-patterns.md |
| 内存泄漏 | 检测 + 分析 | references/memory-leak-detection.md |
| 竞争条件 | 诊断 + 并发错误 | references/race-condition-diagnosis.md |
| 分布式调试 | 跨服务RCA | references/distributed-debugging.md |
| 输入边界规范化 | 防止无效标识符传播到下游 | references/external-input-normalization-boundary.md |
| 复制粘贴检查清单 | 调试检查清单 | assets/debugging/template-debugging-checklist.md |
| 单页分类 | 调试工作表 | assets/debugging/template-debugging-worksheet.md |
| 事件响应 | 事件模板 | assets/incidents/template-incident-response.md |
| 根本原因到防护措施 | 将事件发现转化为具体的预防行动 | assets/debugging/template-root-cause-to-guardrail.md |
| 日志设置示例 | 日志模板 | assets/observability/template-logging-setup.md |
| 精选外部链接 | 来源列表 | data/sources.json |
../qa-observability/SKILL.md (监控/跟踪/日志记录基础设施)../qa-refactoring/SKILL.md (为可维护性/安全性进行重构)../qa-testing-strategy/SKILL.md (测试设计和质量门控)../data-sql-optimization/SKILL.md (数据库性能和查询调优)../ops-devops-platform/SKILL.md (基础设施/CI/CD/事件操作)../dev-api-design/SKILL.md (API行为、契约、错误处理)首先对每个故障进行分类:
path/glob:路径缺失、shell扩展、引号问题cli-contract:无效标志/不支持选项baseline:与当前更改无关的、预先存在的仓库故障logic:当前编辑引入的回归env/toolchain:运行时缺失/二进制文件/版本不匹配对于任何非零退出的命令:
在使用括号/动态路径之前:
test -e "<path>" || echo "missing path"
优先使用带引号的路径和显式的文件发现:
rg --files <root> | rg '<needle>'
当广泛的检查因无关的基线问题而失败时:
pre-existing。每个调试报告必须包含:
每周安装次数
69
仓库
GitHub 星标数
49
首次出现
2026年1月23日
安全审计
安装于
opencode54
codex53
cursor52
gemini-cli51
github-copilot49
claude-code45
Use systematic debugging to turn symptoms into evidence, then into a verified fix with a regression test and prevention plan.
Reproduce:
Isolate:
git bisect).Instrument:
Fix:
Verify:
Prevent:
| Symptom | First Action | Common Pitfall |
|---|---|---|
| Crash/exception | Start at the first stack frame in your code; capture request/trace ID | Fixing the last error, not the first cause |
| Wrong output | Create a “known good vs bad” diff; isolate the first divergent state | Debugging from UI backward without narrowing inputs |
| Intermittent/flaky | Re-run with tracing enabled; correlate by IDs; classify flake type | Adding sleeps without proving a race |
| Slow/timeout | Identify the bottleneck (CPU/memory/DB/network); profile before changing code | “Optimizing” without a baseline measurement |
| Production-only | Compare configs/data volume/feature flags; use safe observability | Debugging interactively in prod without a plan |
| Distributed issue | Use end-to-end trace; follow a single request across services | Searching logs without correlation IDs |
When debugging failures involving URLs, domains, IDs, or third-party payloads, classify and validate at the earliest boundary before downstream analyzers execute.
domain, display_name, uuid, slug, email, free_text).Without boundary normalization, invalid upstream inputs become downstream DNS/HTTP failures that hide the real root cause and waste retries.
| Need | Read/Use | Location |
|---|---|---|
| Step-by-step RCA workflow | Operational patterns | references/operational-patterns.md |
| Debugging approaches | Methodologies | references/debugging-methodologies.md |
| What/when to log | Logging guide | references/logging-best-practices.md |
| Safe prod debugging | Production patterns | references/production-debugging-patterns.md |
| Memory leaks | Detection + profiling |
../qa-observability/SKILL.md (monitoring/tracing/logging infrastructure)../qa-refactoring/SKILL.md (refactor for maintainability/safety)../qa-testing-strategy/SKILL.md (test design and quality gates)../data-sql-optimization/SKILL.md (DB performance and query tuning)../ops-devops-platform/SKILL.md (infra/CI/CD/incident operations)../dev-api-design/SKILL.md (API behavior, contracts, error handling)Classify every failure first:
path/glob: missing path, shell expansion, quotingcli-contract: invalid flag/unsupported optionbaseline: pre-existing repo failure unrelated to current changelogic: regression introduced by current editsenv/toolchain: missing runtime/binary/version mismatchOn any nonzero command:
Before using bracketed/dynamic paths:
test -e "<path>" || echo "missing path"
Prefer quoted paths and explicit file discovery:
rg --files <root> | rg '<needle>'
When broad checks fail due to unrelated baseline issues:
pre-existing.Every debugging report includes:
Weekly Installs
69
Repository
GitHub Stars
49
First Seen
Jan 23, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode54
codex53
cursor52
gemini-cli51
github-copilot49
claude-code45
代码审查与质量门控指南:五维评估确保代码正确性、安全性与性能
805 周安装
references/memory-leak-detection.md| Race conditions | Diagnosis + concurrency bugs | references/race-condition-diagnosis.md |
| Distributed debugging | Cross-service RCA | references/distributed-debugging.md |
| Input boundary normalization | Prevent invalid identifiers from propagating downstream | references/external-input-normalization-boundary.md |
| Copy-paste checklist | Debugging checklist | assets/debugging/template-debugging-checklist.md |
| One-page triage | Debugging worksheet | assets/debugging/template-debugging-worksheet.md |
| Incident response | Incident template | assets/incidents/template-incident-response.md |
| Root cause to guardrail | Convert incident findings into concrete prevention actions | assets/debugging/template-root-cause-to-guardrail.md |
| Logging setup examples | Logging template | assets/observability/template-logging-setup.md |
| Curated external links | Sources list | data/sources.json |