diagnosing-bugs

Diagnose and fix bugs through hypothesis generation, code instrumentation, and regression testing.

Updated Jul 6, 2026
One-click install
npx skills add https://github.com/AtharvaN16/Personal-Lib --skill diagnosing-bugs-atharvan16
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: diagnosing-bugs
Source: https://github.com/AtharvaN16/Personal-Lib/tree/main/.agents/skills/diagnosing-bugs
Command: npx skills add https://github.com/AtharvaN16/Personal-Lib --skill diagnosing-bugs-atharvan16

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a structured approach to diagnose and fix hard bugs and performance regressions, streamlining the debugging process.

Core Features & Use Cases

  • Diagnosis Loop: Offers a comprehensive loop for diagnosing bugs, including feedback loop construction, tightening the loop, and handling non-deterministic bugs.
  • Reproduce + Minimise: Assists in reproducing and minimizing the bug to its smallest scenario.
  • Hypothesise: Generates and ranks hypotheses to narrow down the cause of the bug.
  • Instrument: Enables targeted debugging by instrumenting specific parts of the code.
  • Fix + Regression Test: Guides the user in writing regression tests and applying fixes.
  • Cleanup + Post-mortem: Ensures proper cleanup and documentation for future reference.

Quick Start

Use the diagnosing-bugs skill to diagnose a performance regression in your codebase by following the structured diagnosis loop.

Frequently Asked Questions about diagnosing-bugs

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

FAQPage Schema
What is a structured debugging loop for diagnosing hard bugs and performance regressions?

A structured debugging loop systematically diagnoses bugs by constructing feedback mechanisms, generating hypotheses, instrumenting code, and testing fixes. It streamlines the process of isolating and resolving complex software defects and performance issues.

How do I reproduce and minimize a non-deterministic bug for targeted code analysis?

To reproduce and minimize a non-deterministic bug, construct a tight feedback loop to reliably trigger the issue, then systematically reduce the scenario to its smallest form. This enables targeted code instrumentation and accurate hypothesis testing.

How do I generate and rank hypotheses to find the root cause of a performance regression?

Generate hypotheses by analyzing code behavior during the performance regression, then rank them by likelihood. Instrument the code to gather targeted metrics, validating or invalidating each hypothesis to isolate the exact cause.

What's the best way to write regression tests when fixing hard bugs?

The best way to write regression tests when fixing hard bugs is to create them immediately after reproducing and minimizing the issue. This ensures the test accurately captures the defect and verifies the applied fix prevents future occurrences.

Do I need a clear understanding of the codebase to use a hypothesis testing approach for bug diagnosis?

Yes, diagnosing bugs and performance regressions through hypothesis testing requires a clear understanding of the codebase and debugging techniques. This foundational knowledge is essential for effective code instrumentation and accurate root cause analysis.

Why should I conduct a post-mortem and cleanup after fixing a hard bug?

You should conduct a post-mortem and cleanup after fixing a hard bug to ensure proper code restoration and document the diagnosis process. This provides valuable future reference and prevents similar bugs from reoccurring in the codebase.