code-doctor

Analyze code to identify root causes of intermittent failures and refactoring needs.

Updated Feb 14, 2026
One-click install
npx skills add https://github.com/henryhawke/skills --skill code-doctor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-doctor
Source: https://github.com/henryhawke/skills/tree/main/code-doctor
Command: npx skills add https://github.com/henryhawke/skills --skill code-doctor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses complex and intermittent code issues that go beyond surface-level fixes, aiming to identify root causes and improve overall code quality and maintainability.

Core Features & Use Cases

  • Deep Code Analysis: Holistic examination of code structure, logic, and dependencies.
  • Root Cause Identification: Traces issues back to their origin, considering edge cases and environmental factors.
  • Comprehensive Solution Design: Proposes fixes that enhance robustness, prevent recurrence, and improve maintainability.
  • Use Case: Debugging a production issue that only occurs under specific, hard-to-reproduce conditions, or refactoring a legacy module that has become unwieldy and error-prone.

Quick Start

Analyze the provided code snippet to identify the root cause of the intermittent failure.

Frequently Asked Questions about code-doctor

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

FAQPage Schema
How do I find the root cause of intermittent code failures that only happen under specific conditions?

Root cause analysis for intermittent code failures traces issues back to their origin by examining data flow, state management, dependencies, and concurrency. It identifies environmental factors and edge cases to propose fixes that prevent recurrence and minimize maintenance burden.

What is the best way to refactor a legacy module to reduce maintenance burden?

Refactoring a legacy module requires comprehensive code analysis to identify complex structural dependencies and state management issues. It designs solutions that minimize breaking changes, improve maintainability, and enhance overall robustness against edge cases.

How does deep code analysis handle concurrency and state management issues?

Deep code analysis handles concurrency and state management by holistically examining code structure, logic, and dependencies. It identifies root causes of mysterious failures and proposes optimizations that enhance robustness while considering performance impacts.

Can I use deep code analysis for performance optimization without introducing breaking changes?

Deep code analysis for performance optimization proposes solutions that explicitly minimize breaking changes and maintenance burden. It evaluates architectural improvements and edge cases to ensure fixes enhance robustness without disrupting existing functionality.

When do I need root cause analysis instead of standard debugging for production issues?

Root cause analysis is needed instead of standard debugging when production issues are complex, intermittent, or occur under hard-to-reproduce conditions. It goes beyond surface-level fixes to examine data flow and architectural improvements for comprehensive solution design.