AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Diagnose

skill-aldianriski-lean-flow-diagnose · by aldianriski

Use when debugging a defect, unexpected behaviour, failing test, or performance regression. Runs a disciplined 6-phase loop — build a feedback loop, reproduce, hypothesise, instrument, fix with regression test, cleanup + post-mortem. Do not use for architectural analysis or planning — use /orchestrator mvp instead.

No reviews yet
0 installs
6 views
0.0% view→install

Install

$ agentstack add skill-aldianriski-lean-flow-diagnose

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access Used
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-aldianriski-lean-flow-diagnose)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
1mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Diagnose? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Diagnose

A discipline for hard bugs. The rate of feedback is your speed limit — build the loop first. Skip a phase only when you can explicitly justify it.

Phase 1 — Build a feedback loop

This is the skill — everything else just consumes the signal. Get a fast, deterministic, agent-runnable pass/fail signal for the bug and you will find the cause. Spend disproportionate effort here; be aggressive, refuse to give up.

  • Prefer an automated test at the seam that reaches the bug; then curl/HTTP, CLI snapshot-diff, headless browser, replay a captured trace, a throwaway harness, fuzz, git bisect run, or a differential loop. Full menu → ${CLAUDE_SKILL_DIR}/references/feedback-loops.md.
  • Iterate on the loop — faster, sharper signal, more deterministic. A 2-second deterministic loop beats a 30-second flaky one.
  • Non-deterministic bug? Raise the reproduction rate (loop 100×, parallelise, stress), don't chase a clean one-shot repro.
  • Genuinely can't build one? Stop, list what you tried, ask for env access / a captured artifact / instrumentation permission. Do not hypothesise without a loop.

Phase 2 — Reproduce

Run the loop; watch the bug appear. Confirm:

  • [ ] It produces the failure mode the user described — not a different nearby one (wrong bug = wrong fix).
  • [ ] Reproducible across runs (or at a high enough rate to debug against).
  • [ ] You've captured the exact symptom (error / wrong output / timing) so later phases can verify the fix.

Phase 3 — Hypothesise

Generate 3–5 ranked, falsifiable hypotheses before testing any — single-hypothesis generation anchors on the first plausible idea. Each must state a prediction:

H1: [cause] — If this is it, then [changing Y] makes the bug disappear / [Z] makes it worse.
H2: …

If you can't state the prediction, it's a vibe — sharpen or discard it. Show the ranked list to the user before testing (they re-rank instantly: "we just deployed #3"). Don't block if they're AFK.

Phase 4 — Instrument

  • Each probe maps to a specific Phase-3 prediction. Change one variable at a time.
  • Debugger / REPL > targeted logs at the distinguishing boundary > never "log everything and grep".
  • Tag every debug log with a unique prefix ([DEBUG-a4f2]) so cleanup is a single grep.
  • Perf regression? Logs are usually wrong — establish a baseline measurement, then bisect. Measure first.

Phase 5 — Fix + regression test

Write the regression test before the fix — but only if a correct seam exists (one that exercises the real bug pattern at the call site). A too-shallow seam gives false confidence. If no correct seam exists, that itself is the finding — the architecture is preventing lockdown; flag it for Phase 6. When a seam exists: failing test (RED) → minimal fix (GREEN) → re-run the Phase 1 loop against the original, un-minimised scenario → full suite still passes.

Phase 6 — Cleanup + post-mortem

  • [ ] Original repro no longer reproduces (re-run the Phase 1 loop)
  • [ ] Regression test passes (or the absence of a seam is documented)
  • [ ] All [DEBUG-…] instrumentation removed (grep the prefix); throwaway harnesses deleted
  • [ ] The winning hypothesis is stated in the commit / PR message — so the next debugger learns

Then ask: what would have prevented this? If the answer is architectural (no good seam, tangled callers, hidden coupling), file it as a TD-NNN tech-debt entry (groomed by /triage, aged at promote) and hand the specifics to /refactor-advisor to design the deepening — make the call after the fix lands, when you know the most.

Red flags

Hypothesising without a feedback loop — guessing compounds bugs; Phase 1 is non-negotiable. ❌ Fixing the wrong bug — the loop must reproduce the user's symptom, not a nearby one. ❌ Multiple simultaneous changes — violates one-variable-per-test; invalidates the diagnosis. ❌ Untagged debug logs — they survive cleanup; tag with [DEBUG-…] and grep them out. ❌ Regression test at a false seam — a shallow test that can't replicate the bug gives false confidence; no seam is a finding, not a skip.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.