diagnosing-bugs

Diagnose hard bugs and performance regressions through a structured six-phase feedback-loop workflow.

Updated Aug 11, 2026
One-click install
npx skills add https://github.com/Kunj-Sharma03/agent-contextify --skill diagnosing-bugs-kunj-sharma03
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: diagnosing-bugs
Source: https://github.com/Kunj-Sharma03/agent-contextify/tree/main/skills-main/skills/engineering/diagnosing-bugs
Command: npx skills add https://github.com/Kunj-Sharma03/agent-contextify --skill diagnosing-bugs-kunj-sharma03

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Hard bugs and flaky performance regressions resist casual code reading and guesswork. This Skill enforces a disciplined diagnosis loop that builds a tight, deterministic reproduction signal before any hypothesis is tested, preventing wasted time on wrong fixes. ## Core Features & Use Cases - Feedback Loop Construction: Builds a red-capable, deterministic, fast reproduction command using failing tests, curl scripts, headless browsers, trace replay, fuzz loops, or bisection harnesses. - Structured Six-Phase Process: Guides reproduction and minimization, ranked falsifiable hypothesis generation, one-variable-at-a-time instrumentation, regression-test-first fixing, and cleanup with post-mortem. - Human-in-the-Loop Fallback: Ships a bash template script for driving a human through manual reproduction steps when automation is impossible, capturing observations as parseable output. - Use Case: A user reports that an export endpoint intermittently throws a 500 error. The Skill builds a curl-based loop that reproduces the failure at a high rate, minimizes the input, tests ranked hypotheses with tagged debug logs, and lands a fix with a regression test. ## Quick Start Ask the agent to diagnose the bug where the export button throws an error, and have it build a reproduction loop before proposing any fix.

Frequently Asked Questions about diagnosing-bugs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I diagnose a bug that only happens sometimes?

For non-deterministic bugs, raise the reproduction rate instead of seeking a clean repro. Loop the trigger 100 times, parallelize, add stress, narrow timing windows, or inject sleeps until the failure rate is high enough to debug against.

How to debug an issue when I cannot reproduce it locally?

Ask for access to the environment that reproduces it, a redacted captured artifact like a HAR file or log dump, or permission to add temporary production instrumentation. Do not proceed to hypothesize without a working feedback loop.

What is a red-capable feedback loop in debugging?

A red-capable loop is a single command that drives the actual bug code path and asserts the user's exact symptom, so it goes red on this bug and green once fixed. It must be deterministic, fast, and runnable unattended.

Should I write a regression test before or after fixing a bug?

Write the regression test before the fix, but only if a correct seam exists where the test exercises the real bug pattern as it occurs at the call site. If no correct seam exists, document that as an architectural finding.

Why does logging everything fail when debugging performance regressions?

For performance regressions, broad logging is usually wrong because it lacks a baseline. Instead, establish a measurement baseline with a timing harness, profiler, or query plan, then bisect. Measure first, fix second.