diagnosing-bugs

diagnosing-bugs is a skill for Claude Code from yugasun/aiops. It costs 32 tokens per session (574 once invoked), scanned A, original, Apache-2.0.

A repeatable process for investigating difficult bugs and slowdowns. It builds a quick way to reproduce the problem and uses project context to narrow down likely causes.

In plain words
What is it for?
Use it to diagnose broken or slow behavior with tests, scripts, browser checks, traces, temporary harnesses, fuzzing, or comparisons between old and new code.
Why use it?
It replaces guesswork with a focused pass/fail check that shows whether a suspected fix works.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the aiops plugin — 23 skills shipped together

Good fit Use it to diagnose broken or slow behavior with tests, scripts, browser checks, traces, temporary harnesses, fuzzing, or comparisons between old and new code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yugasun/aiops/diagnosing-bugs
Install

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.

Any agent
npx skills add yugasun/aiops --skill diagnosing-bugs
Clone the repo
git clone --depth 1 https://github.com/yugasun/aiops

Made for: Claude Code.

Or install aiops, the plugin that ships this one along with the rest of its 23 skills.

Wrote 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.

agentmods badge for diagnosing-bugs

README.md
[![agentmods](https://agentmods.dev/badge/skills/yugasun/aiops/diagnosing-bugs/github.svg)](https://agentmods.dev/skills/yugasun/aiops/diagnosing-bugs)
Your own site
<a href="https://agentmods.dev/skills/yugasun/aiops/diagnosing-bugs"><img src="https://agentmods.dev/badge/skills/yugasun/aiops/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.

agentmods 80×15 button for diagnosing-bugs

Your own site · 80×15
<a href="https://agentmods.dev/skills/yugasun/aiops/diagnosing-bugs"><img src="https://agentmods.dev/badge/skills/yugasun/aiops/diagnosing-bugs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 574 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.00574
Opus 5.5 $0.00013 $0.00230
Sonnet 5.5 $0.00006 $0.00115
Haiku 4.5 $0.00003 $0.00057

Measured 3mo ago against content hash c776e9280d8d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 3mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/hitl-loop.template.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Try in order: failing test → curl/script → CLI fixture → headless browser → replay trace → throwaway harness → fuzz → bisect harness → differential old/new → HITL script.
skills/diagnosing-bugs/SKILL.md · 53 lines

How it starts

The opening of the file, as written. The whole thing — 53 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Diagnosing Bugs

Skip phases only when explicitly justified. Read CONTEXT.md and local ADRs for module context.

Phase 0 — Code graph query (optional, if available)

If graphify-out/graph.json exists, briefly tell the user "查询代码图谱了解影响范围" then query the code graph before starting diagnosis:

  1. /code-graph query impact <suspected-file> — find all modules affected by the suspected code area
  2. /code-graph query deps <suspected-module> — understand what the suspected module depends on
  3. /code-graph query hotspot — check if the bug area is also a known hotspot (high coupling + frequent changes)

Use these results to narrow the hypothesis space in Phase 3. If no graph exists, skip silently.

Phase 1 — Build a tight feedback loop

This is the skill. A tight pass/fail signal that goes red on this bug beats staring at code.

Try in order: failing test → curl/script → CLI fixture → headless browser → replay trace → throwaway harness → fuzz → bisect harness → differential old/new → HITL script.

Then tighten: faster, sharper assertion, more deterministic.

Non-deterministic bugs: raise reproduction rate until debuggable. If no loop is possible, stop — list what you tried, ask for env access or captured artifacts. No red-capable command, no Phase 2.

Done when one agent-runnable command is red-capable, deterministic, fast, and already run once (paste invocation + output).

Phase 2 — Reproduce + minimise

Loop goes red on the user's symptom. Shrink repro one cut at a time — every remaining piece must be load-bearing.

Phase 3 — Hypothesise

3–5 ranked, falsifiable hypotheses before testing. Show the list to the user when possible.

Phase 4 — Instrument

One variable at a time. Debugger > targeted logs. Tag logs [DEBUG-xxxx] for cleanup. Perf: measure baseline, then bisect.

Phase 5 — Fix + regression test

Regression test before fix only at a correct seam (real bug pattern at call site). No seam → document as architectural finding.

Read the full file on GitHub · 53 lines

Files

What ships with it

1 file 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.

Changes

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.

  1. 3mo ago First seen · 53 lines · 32 tokens per session scan A c776e9280d8d

Subscribe to this mod's changes

diagnosing-bugs is a skill published in the GitHub repository yugasun/aiops (4 stars, last pushed 8d ago), licensed Apache-2.0. It adds 32 tokens to every session and 574 once invoked, about $0.0001 per session on Opus 5.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.

Related

diagnosing-bugs compared with skills from other repositories

diagnosing-bugs next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
diagnosing-bugsyugasun/aiopsSkill48d agoApache-2.0A32Claude Code
windbg-diagnostic-methodmicrosoft/win-dev-skillsSkill521yesterdayMITA42Claude Code
windbg-kernel-bugcheck-triagemicrosoft/win-dev-skillsSkill521yesterdayMITA50Claude Code
windbg-user-exception-triagemicrosoft/win-dev-skillsSkill521yesterdayMITA69Claude Code
windbg-user-heap-corruption-investigationmicrosoft/win-dev-skillsSkill521yesterdayMITA46Claude Code
windbg-user-virtual-memory-exhaustionmicrosoft/win-dev-skillsSkill521yesterdayMITA54Claude Code
windbg-kernel-irp-lifecycle-triagemicrosoft/win-dev-skillsSkill521yesterdayMITA58Claude Code