diagnosing-bugs
Use when facing a bug with no obvious cause, a performance regression, or 5+ test failures at once.
Skill by dekoza
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/dekoza-diagnosing-bugs
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 26, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Shell scripts
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/diagnosing-bugs
What's inside
- Skill name
diagnosing-bugs- Description
- Use when facing a bug with no obvious cause, a performance regression, or 5+ test failures at once. Triggers on: "diagnose", "debug this", "something broken", "no idea why", "flaky", "slow since", "fix multiple failing tests".
- License
- Unlicense
- Instructions
- 581 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
- Instructions call the network
Agent Skills spec issues
- body: 581 lines (spec recommends under 500)
Files (5)
- SKILL.md
- evals.json · evals/
- REFERENCE.md · references/
- feedback-loops.md · references/
- hitl-loop.template.sh · scripts/
SKILL.md (first lines)
# Diagnosing Bugs A discipline for hard bugs. Skip phases only when explicitly justified. When exploring the codebase, read the project's domain glossary — `CONTEXT.md` unless the domain doc config points elsewhere — for a mental model of the modules involved, and check the ADRs covering the area you're touching, so a hypothesis doesn't contradict a decision already made. ## Redact This skill has you show commands, outputs and captured artifacts. **Redact every secret first** — write `<REDACTED>` in its place. Build loops against env vars, so the credential stays in the environment rather than in what you show. Captured artifacts carry auth headers: quote only the lines that carry the signal. **The whole skill in one breath:** build a **tight feedback loop** — one command that is *fast (seconds), deterministic, and red-capable* (goes red on this exact bug) — then minimize the repro and test hypotheses one variable at a time. Record a representative **permanent regression observed red** for this bug's reason before **production repair**; verify it green and rerun the original scenario afterward. If 5+ failures exist at once, run Multi-Failure Triage first; otherwise start at Phase 1. ## Multi-Failure Triage (when 5+ failures exist) When multiple failures exist — broken test suites, migration fallout, dependency upgrades, non-TDD development sessions — **do not fix them one-by-one with full-suite runs between each fix.** That wastes feedback-loop time on tests you already know pass. **Full suite is a gate, not a feedback loop.** This procedure is tier-agnostic: it works for unit, integration, E2E, or any mix. Use the reference commands as templates — adapt to your project's tooling. ### Output capture rule **`| tee [filename]` is the ONLY allowed method for capturing test output** — `tail`, `head`, and bare `>`/`>>` are forbidden (test-run rule: `testing-workflow` skill; the general rule for every command whose output you read is `construction-craft` Critical rule 8). Triage-specific consequence: **after running with `| tee`, read or `grep` the log file — never re-run the same pytest command just to inspect output.** The file already has everything; re-running wastes a full-suite cycle. ### Timeout guidelines Set **both** timeout layers explicitly on every triage run — outer (harness budget) and inner (`--timeout` per test), outer > inner. The tier-by-tier floors live in the `testing-workflow` skill's timeout doctrine; for triage the floors that matter most are `--timeout 600` for E2E and an outer budget of 1 hour — a run killed by a default 60s timeout reports on the runner, not the tests, and corrupts your failure map. --- ### Step 0 — CALIBRATE (run once, before triage) **Goal:** Ensure your failure map is trustworthy. Don't triage on corrupted data. **Skip 0a and 0b if all of the following are true:** - You just ran the full suite and the failure set matches what you expect. - No recent changes to fixtures, models, or shared code. - The failures span multiple unrelated modules (unlikely to be xdist contamination). Skipping is safe because xdist contamination and flakes both produce **inconsistent** failure sets — if your set is stable across runs, the calibration step adds no value. **0a. Verify parallel stability (if you suspect xdist issues).** ``` # Serial baseline pytest tests/<tier>/ -n 1 --timeout 600 --tb=line -q | tee /tmp/serial_failures.log # Parallel run pytest tests/<tier>/ -n auto --dist loadgroup --timeout 600 --tb=line -q | tee /tmp/parallel_failures.log ``` Compare failure sets. If they differ → **xdist contamination detected.** Tests that fail under parallelism but pass serially are likely sharing state. Add `xdist_group` markers to force them onto the same worker, then re-calibrate. **Do not proceed to triage until serial and parallel failure sets match.** **0b. Quarantine flakes.** ``` pytest tests/<tier>/ --timeout 600 --count=3 -q ``` Tests that fail inconsistently are **flakes, not bugs**. Quarantine them (`xfail`, skip, or fix separately). They inflate the failure count and corrupt your cascade map. A 50%-flake test masquerades as a real failure half the time. **0c. Split by tier (if multiple tiers are failing).** If failures span unit, integration, and E2E — **fix the fastest tier first.** - **Unit tests** → run on host, feedback in seconds. Fix these first — fastest ROI. - **Integration tests** → run in Docker, feedback in tens of seconds. Keep the container warm. - **E2E tests** → run in Docker with browser, slowest. Fix last. Fixing unit tests often collapses the E2E failure count dramatically. Don't touch E2E until faster tiers are green. --- ### Step 1 — MAP (one full run, serialized) **Goal:** Build a reliable failure map. One expensive run, done right. Run the full failing tier with serialized output: ``` # With xdist (recommended) pytest tests/<tier>/ -n auto --dist loadgroup --timeout 600 --json-report -q | tee /tmp/failures_round_0.log # Without xdist pytest tests/<tier>/ --timeout 600 --json-report -q | tee /tmp/failures_round_0.log ``` **Save the output as `failures_round_0.json`.** You'll diff against this file in later rounds. Read every traceback. Group failures by **root cause**, not by file: | Grouping signal | Likely root cause | |----------------|-------------------| | Same exception type across files | Shared import, fixture, or model change | | Same module in traceback | Broken signal handler, service, or utility | | `AttributeError` / `ImportError` cluster | Renamed/moved function or missing migration | | `AssertionError` with same expected value | Changed behavior or hardcoded expectation | | Client sees wrong UI but server logs show success | Client-side state not updated, or HTMX/server-swap overwrote injected content | | Async message ordering (client sends X, server processes Y first) | Race condition in queue/sync logic | | Test passes serially but fails parallel, or vice versa | Timing dependency masked by execution order | **Expect 38 failures → ~8-12 actual problems.** One fix cascades through its cluster. ### Quick relevance check (before deep triage) Before triaging all failures, determine which are **caused by your changes** vs **pre-existing**. This prevents wasting effort on unrelated bugs. **Method: `git stash` + targeted re-run.** ``` # Run only the failures most likely related to your changes # (same module, same consumer, same template family) git stash pytest tests/<related_tier>/ -k "test_a or test_b" -n 1 --timeout 300 -q | tee /tmp/before.log git stash pop pytest tests/<related_tier>/ -k "test_a or test_b" -n 1 --timeout 300 -q | tee /tmp/after.log diff /tmp/before.log /tmp/after.log ```
From dekoza/oh-my-slop, Unlicense.
More from dekoza/oh-my-slop
- 0.614score
skill-creator
dekoza
Use when creating or editing SKILL.md files, diagnosing skill-triggering failures, or measuring whether a skill improves agent behavior.
SkillAFreshness: A★ 4Claude Code +9 - 0.609score
resolving-merge-conflicts
dekoza
Use when a git merge or rebase is stopped mid-way with conflicting files.
SkillAFreshness: A★ 4Claude Code +9 - 0.603score
setup-project-skills
dekoza
Configure project workflow bindings, preservation policy and launch gates.
SkillAFreshness: A★ 4Claude Code +9 - 0.574score
legacy-code
dekoza
Changing code that is expensive to change safely because behavior is unclear, tests are weak or missing, dependencies are hidden, or runtime/framework setup…
SkillBFreshness: B★ 4Claude Code +9 - 0.574score
construction-craft
dekoza
Use when implementation is blocked by unclear construction prerequisites or tangled routine/data shape, or when system knowledge and artifacts are drifting…
SkillBFreshness: B★ 4Claude Code +9 - 0.574score
enterprise-patterns
dekoza
Use when an enterprise app's infrastructure decisions are in play — where business logic lives, transaction and identity coordination, application-level…
SkillBFreshness: B★ 4Claude Code +9 - 0.574score
production-readiness
dekoza
Services, APIs, jobs, queues, deployment paths, and critical flows that must survive production failures, overload, latency, bad data, and operational mistakes.
SkillBFreshness: B★ 4Claude Code +9 - 0.574score
refactoring-pass
dekoza
Changing existing code structure without intending to change observable behavior.
SkillBFreshness: B★ 4Claude Code +9 - 0.574score
git-guardrails-claude-code
dekoza
Use when the user wants dangerous git commands (push, reset --hard, clean, branch -D, checkout/restore .) blocked by a Claude Code hook before they run — the…
SkillBFreshness: B★ 4Claude Code +9 - 0.574score
codebase-design
dekoza
Use when designing or restructuring a module and reaching for the shared deep-module vocabulary — interface, seam, depth, adapter, leverage, locality — to…
SkillBFreshness: B★ 4Claude Code +9 - 0.574score
data-intensive
dekoza
Systems where correctness depends on data ownership, consistency, durability, replication, partitioning, schema evolution, event flow, replay, or derived-data…
SkillBFreshness: B★ 4Claude Code +9 - 0.574score
documentation-lifecycle
dekoza
Use when documentation must stay truthful as software changes — writing or revising a spec, ADR, runbook, or API/config reference, splitting user-facing docs…
SkillBFreshness: B★ 4Claude Code +9
Signals
- Stars
- 4
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 3, 2026 (26 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Unlicense
- Repository
- github.com/dekoza/oh-my-slop
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from dekoza
- 0.614score
skill-creator
dekoza
Use when creating or editing SKILL.md files, diagnosing skill-triggering failures, or measuring whether a skill improves agent behavior.
SkillAFreshness: A★ 4Claude Code +9 - 0.609score
resolving-merge-conflicts
dekoza
Use when a git merge or rebase is stopped mid-way with conflicting files.
SkillAFreshness: A★ 4Claude Code +9 - 0.603score
setup-project-skills
dekoza
Configure project workflow bindings, preservation policy and launch gates.
SkillAFreshness: A★ 4Claude Code +9 - 0.574score
domain-driven-design
dekoza
Business complexity, model language, lifecycle rules, or cross-team/system boundaries shape the design more than generic technical organization.
SkillBFreshness: B★ 4Claude Code +9 - 0.574score
construction-craft
dekoza
Use when implementation is blocked by unclear construction prerequisites or tangled routine/data shape, or when system knowledge and artifacts are drifting…
SkillBFreshness: B★ 4Claude Code +9 - 0.574score
documentation-lifecycle
dekoza
Use when documentation must stay truthful as software changes — writing or revising a spec, ADR, runbook, or API/config reference, splitting user-facing docs…
SkillBFreshness: B★ 4Claude Code +9
Cite this page
diagnosing-bugs skill. Agent Mart. https://agentmart.dev/skills/dekoza-diagnosing-bugs (last updated 2026-10-24)