Diagnose Skill
Builds a feedback loop to diagnose bugs systematically instead of guessing.
by AgentVoltv1.0.0Published 1y ago1 install
Free to sign up · every skill included with AgentVolt Pro
Before & after
Same prompt, same agent — the only difference is the skill.
Prompt“This test fails maybe one run in twenty. I cannot pin it down.”
Beforegeneric AI agent
Flaky tests are frustrating. Here are common causes: - **Timing/race conditions** — async operations completing in different orders - **Shared state** — tests polluting each other when run in sequence - **Test order dependency** — passing alone but failing in a suite - **External dependencies** — network calls, real time, filesystem - **Random data** — faker or random seeds producing edge cases occasionally Try running the test in isolation many times to see if it fails alone. If it only fails in the suite, it's likely shared state or ordering. Adding retries can hide the problem, so I'd avoid that until you understand the cause. What does the test do?
Afterwith Diagnose Skill
One in twenty means you can't verify a fix by running it once — that's
the actual problem, and it's the first thing to solve.
BUILD THE LOOP BEFORE TOUCHING THE CODE
1. Reproduce on demand. Run it 200× in a loop, capture failures.
If it fails ~10 times, you now have a signal.
If it never fails alone, it's suite interaction — go to step 3.
2. Establish a baseline failure rate. Write the number down. Every
"fix" gets measured against it, not against a single green run.
3. Bisect the environment, not the code:
alone, 200× → isolates the test itself
full suite, random order → shared state or ordering
full suite, fixed seed → random data
full suite, --workers=1 → concurrency
Whichever column changes the rate is your class of bug. This is
four experiments and it eliminates three of four possibilities.
INSTRUMENT THE FAILURE, DON'T READ IT
On failure only, dump: wall-clock timestamps per step, the random
seed, test execution order, and any shared fixture state. A flake you
can't reproduce is a flake you didn't record enough about.
THEN FORM ONE HYPOTHESIS
State it so it can be wrong: "the assertion runs before the debounce
fires." Change exactly one thing. Re-run 200×. Compare to baseline.
10/200 → 0/200 is a fix.
10/200 → 3/200 is a different bug underneath, not partial success.
WHAT NOT TO DO
Don't add a retry, don't add a sleep, don't mark it skip. Each one
converts a reproducible signal into a silent one, and you'll pay for
it when the same race shows up in production where there's no retry.
What does the loop give you at 200 runs — does it fail alone?About this skill
name: diagnose-skill description: Use when Builds a feedback loop to diagnose bugs systematically instead of guessing.
Diagnose Skill
Structures a systematic diagnostic process for tracking down bugs, building a feedback loop rather than relying on trial and error fixes.
What you get
- SKILL.md within the the original author public skills repo.
Customize your output
- Adaptable to any codebase or bug type.
Example output
A structured diagnosis with a clear root cause and fix path.
Best for
Developers debugging complex issues with Claude Code.
SKILL.md preview
SKILL.md
---
name: diagnose-skill
description: Use when a bug needs systematic diagnosis through a feedback loop rather than trial-and-error fixes.
version: 1.0.0
category: Security & QA / Testing and QA
author: AgentVolt
license: proprietary
tags:
- security-qa
- testing-and-qa
- standard
---
# Diagnose Skill
Structures a systematic diagnostic feedback loop for tracking down bugs, replacing trial-and-error guessing with hypothesis-test-refine.
## When to use
… (sign up to view the full skill)Sign up to view, copy, and install the full skill
More development skills
View all Development skills →Pre-mortem Skill
Analyzes your codebase and predicts bugs that have not happened yet but will in production.
Development
TDD Skill
Enforces vertical slice test driven development with tracer bullets.
Development
Dogfood Skill
Uses an agent browser CLI to walk through your app page by page and capture bugs.
Development
Business Automation Stack
A connected set of agents that handle the repetitive ops work — follow-ups, summaries, and handoffs.
Development