Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add asherzj/ashers-agent-skills --skill diagnosing-bugsgit clone --depth 1 https://github.com/asherzj/ashers-agent-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/asherzj/ashers-agent-skills/diagnosing-bugs)<a href="https://agentmods.dev/skills/asherzj/ashers-agent-skills/diagnosing-bugs"><img src="https://agentmods.dev/badge/skills/asherzj/ashers-agent-skills/diagnosing-bugs/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/asherzj/ashers-agent-skills/diagnosing-bugs"><img src="https://agentmods.dev/badge/skills/asherzj/ashers-agent-skills/diagnosing-bugs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00048 | $0.02453 |
| Opus 5 | $0.00024 | $0.01226 |
| Sonnet 5 | $0.00010 | $0.00491 |
| Haiku 4.5 | $0.00005 | $0.00245 |
Grade A, and why
diagnosing-bugs scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
当回路**紧凑**且**能变红**时,阶段 1 完成:你能说出**一条命令**(脚本路径、一次测试调用、一条 curl),并且你**已经至少运行过一次**(展示该调用及其输出,已脱敏),而且它满足: How it starts
The opening of the file, as written. The whole thing — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.
诊断 bug
针对疑难 bug 的一套纪律。只有在有明确理由时才可跳过阶段。
探索代码库时,阅读 CONTEXT.md(如果存在),对相关模块建立清晰的心智模型,并检查你所触碰区域内的 ADR。
脱敏
本技能会让你展示命令、输出和捕获的工件。先对每个密钥脱敏:在原位写 <REDACTED>。针对环境变量构建回路,让凭据留在环境里,而不是留在你展示的内容里。捕获的工件带有 auth 头:只引用携带信号的那些行。
如果脱敏后的输出不足以诊断 bug,请如实说明并询问用户。
阶段 1:构建反馈回路(feedback loop)
这才是本技能的核心。其余一切都是机械操作。如果你有一个针对该 bug 的紧凑通过/失败信号(一个能在_这个_ bug 上变红的信号),你就能找到原因;二分、假设检验和插桩都只是消费这个信号。如果没有,盯再多代码也无济于事。
在这里投入不成比例的精力。要激进。要有创造力。绝不放弃。
构建回路的方法,大致按以下顺序
- 在任何能触达 bug 的接缝(seam)上写失败测试:单元、集成、e2e。
- Curl / HTTP 脚本,打到一个运行中的 dev server。
- CLI 调用,输入用 fixture,把 stdout 与已知正确的快照做 diff。
- 无头浏览器脚本(Playwright / Puppeteer),驱动 UI 并对 DOM/console/network 断言。
- **重放捕获的 trace。**把真实的网络请求 / 负载 / 事件日志存到磁盘;在隔离环境中将其重放穿过代码路径。
- **一次性测试装置。**拉起系统的一个最小子集(单个服务、mock 掉依赖),用一次函数调用驱动 bug 代码路径。
- **性质 / 模糊测试循环。**如果 bug 是「有时输出错误」,跑 1000 个随机输入,寻找失败模式。
- **二分装置。**如果 bug 出现在两个已知状态之间(commit、数据集、版本),把「在状态 X 启动、检查、重复」自动化,这样就能
git bisect run。 - **差分循环。**把同一输入分别跑旧版本和新版本(或两份配置),对输出做 diff。
- **HITL bash 脚本。**最后手段。如果必须有人来点击,就用
scripts/hitl-loop.template.sh驱动_他们_,让回路仍然有结构。捕获的输出会反馈给你。
构建出正确的反馈回路,bug 就修好了 90%。
收紧回路
把回路当作产品对待。一旦有了_一个_回路,就收紧它:
- 能让它更快吗?(缓存 setup、跳过无关初始化、收窄测试范围。)
- 能让信号更锐利吗?(断言具体症状,而不是「没有崩溃」。)
- 能让它更确定吗?(固定时间、固定 RNG 种子、隔离文件系统、冻结网络。)
一个 30 秒还不稳定的回路,比没有回路好不了多少;一个 2 秒且确定的回路才是紧凑的,是调试的超能力。
非确定性 bug
目标不是干净的最小复现,而是更高的复现率。把触发条件循环 100 次、并行化、加压、收窄时间窗口、注入 sleep。50% 概率闪现的 bug 可以调试;1% 的不行,所以要持续提高复现率,直到可以调试。
当你确实无法构建回路时
停下来,并明确说明。列出你尝试过什么。向用户请求:(a) 能复现问题的环境的访问权限,(b) 一份脱敏后的捕获工件(HAR 文件、日志转储、core dump、带时间戳的屏幕录像),或 (c) 添加临时生产插桩的许可。没有回路就不要进入假设阶段。
完成标准:一个能变红的紧凑回路
当回路紧凑且能变红时,阶段 1 完成:你能说出一条命令(脚本路径、一次测试调用、一条 curl),并且你已经至少运行过一次(展示该调用及其输出,已脱敏),而且它满足:
- 能变红:它驱动真正的 bug 代码路径并断言用户描述的确切症状,因此能在这个 bug 上变红、修复后变绿。不是「运行不报错」;它必须能_抓住这个特定的 bug_。
- 确定性:每次运行结论一致(不稳定 bug:如上所述,固定的高复现率)。
- 快速:以秒计,而不是分钟。
- 代理可运行:你可以无人值守地运行;人工介入仅通过
scripts/hitl-loop.template.sh。
如果你发现自己在该命令存在之前就开始读代码、构建理论,**停下:直接跳到假设正是本技能要防止的那种失败。**没有能变红的命令,就没有阶段 2。
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago First seen · 139 lines · 48 tokens per session scan A 871f38c796c8
diagnosing-bugs is a skill published in the GitHub repository asherzj/ashers-agent-skills (2 stars, last pushed 12d ago), licensed MIT. It adds 48 tokens to every session and 2,453 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
debug-optimize-lcp
Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…
systematic-debugging
Use when debugging a failing test, build error, or runtime issue that isn't immediately obvious. Guides a 4-phase root cause analysis instead of random fix attempts.
diagnose
Trace from a reproduced symptom to the source code that causes it. Pin the specific file and approximate line, rate confidence in the cause and clarity of the fix independently, and always propose a concrete fix.
repro-admin
Reproduce an EmDash admin UI bug. Attach a container, start the demo dev server, drive the admin with agent-browser using the dev-bypass session, and capture the reproduction as screenshots plus a replayable transcript.
log-error-digest
Analyze log files to troubleshoot errors, identify peak error periods, and produce error clustering, frequency statistics, and time distribution reports. Supports JSON, syslog, and Nginx formats with automatic detection. Use when a user uploads a .log file and asks to analyze errors, find patterns, debug issues, or…
byted-util-volcengine-detect-retry
An orchestration workflow for Volcengine Cloud Detect, a service that checks websites or network endpoints from test locations.