Cookies

With your permission, we use Google Analytics cookies to measure visits and improve the site. Necessary cookies are always on. You can change your choice or withdraw consent anytime in the footer, under Cookie settings. Cookie Policy

Skip to content

Agents and skills for debugging and error diagnosis

Find the root cause: stack traces, logs, incidents and memory leaks.

A bug rarely arrives with a label. It arrives as a test that fails only in continuous integration, a request that returns a 500 error once in every thousand, or memory that grows overnight until the process dies. The hard part is not writing the fix. It is proving which of ten plausible hypotheses is right before you touch the code.

The components on this page give Claude Code a method instead of guesses: reproduce first, read the stack trace from the bottom up, correlate logs across services, isolate the change with git bisect and only then propose the fix. Some investigate several hypotheses in parallel and cite file and line as evidence. Others connect the session to real production data in Sentry, Grafana or Datadog.

Start with the simplest option. If the error is local and reproducible, a method skill plus a debugger agent are enough for most cases. If the problem only happens in production, you need access to the evidence, so install the connector for the tool you already use first. Parallel investigation and incident commands make sense when the cost of downtime is high.

21 hand-picked components, from 4 different angles.

Investigation method and root cause 6

Components that impose an order on the diagnosis: reproduce, form hypotheses, gather evidence and only then fix. This is where you start.

  • debugger

    Takes the concrete error, logs and stack trace included, and works until it identifies the root cause instead of suggesting a fix based on the visible symptom.

    Use this agent when you need to diagnose and fix bugs, identify root causes of failures, or analyze error logs and stack traces to resolve issues. Spe

    Agents6,369
  • systematic-debugging

    Works as a brake: it applies as soon as a bug, a test failure or unexpected behavior appears, and it kicks in before any fix is proposed.

    Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes

    Skills906
  • debug-error

    Walks through the complete methodology step by step, from collecting the error message and building a minimal reproducible case to reading the stack trace from the bottom up.

    Remember to maintain detailed notes throughout the debugging process and consider the wider implications of both the error and the fix.

    Commands301
  • parallel-debugging

    A good fit for bugs with several possible causes and no obvious one: it raises competing hypotheses, investigates them in parallel and decides which one survives the evidence.

    Debug complex issues using competing hypotheses with parallel investigation, evidence collection, and root cause arbitration. Use this skill when debu

    Skills
  • team-debugger

    Each instance investigates a single hypothesis and returns evidence with file and line, plus a confidence level. It helps the team separate facts from assumptions.

    Hypothesis-driven debugging investigator that investigates one assigned hypothesis, gathering evidence to confirm or falsify it with file:line citatio

    Agents
  • gsd:debug

    Keeps the state of the investigation even when the session context is reset, which matters for bugs that take hours or several days to close.

    Systematic debugging with persistent state across context resets

    Skills

Logs, stack traces and production data 6

For when the error only happens on the server and the only evidence available is logs, metrics and traces. Here the limitation is usually access to the data, not the reasoning.

  • error-detective

    Correlates errors across services instead of looking at one at a time, which helps when the failure visible in one place originates somewhere completely different.

    Use this agent when you need to diagnose why errors are occurring in your system, correlate errors across services, identify root causes, and prevent

    Agents3,404
  • devops-troubleshooter

    Covers the operational side, with log analysis, deployment failures and monitoring configuration, for when suspicion falls on the infrastructure rather than the application.

    Production troubleshooting and incident response specialist. Use PROACTIVELY for debugging issues, log analysis, deployment failures, monitoring setup

    Agents1,103
  • Context

    Reads error messages, stack traces and failure patterns to get to the cause, and suggests, besides the fix, the observability steps that were missing.

    AI-assisted smart debugging - parse error messages, stack traces, and failure patterns to identify root causes and produce a fix with automated observ

    Commands
  • sentry

    The Sentry MCP connector, designed for coding workflows with human supervision. It gives the session access to the errors already recorded, instead of you having to describe them by hand.

    This service implements the Model Context Protocol (MCP) for interacting with Sentry, focused on human-in-the-loop coding agents and developer workflo

    Connectors188
  • grafana

    Connects Claude Code to Grafana dashboards and monitoring, on your own instance or on Grafana Cloud, so you can check the state of the system during the investigation.

    A Model Context Protocol server for interacting with Grafana dashboards and monitoring. Supports both self-hosted Grafana instances and Grafana Cloud.

    Connectors215
  • datadog-cli

    Searches logs, queries metrics and follows request traces from the Datadog command line. It makes sense for anyone who already has their observability concentrated in that tool.

    Datadog CLI for searching logs, querying metrics, tracing requests, and managing dashboards. Use this when debugging production issues or working with

    Skills25

Production incidents and post-incident analysis 4

With the system down, the problem is no longer just technical: you need to classify severity, coordinate the response and record afterwards what you learned.

  • incident-responder

    Made for the moment production goes down: it coordinates the debugging, applies the fix and leaves the post-mortem documented instead of putting it off indefinitely.

    Handles production incidents with urgency and precision. Use IMMEDIATELY when production issues occur. Coordinates debugging, implements fixes, and do

    Agents350
  • incident-commander

    Brings the complete SRE framework, with severity classification, timeline reconstruction and post-incident review. It also helps set up on-call rotations for a new service.

    Comprehensive incident response framework from detection through resolution and post-incident review. Battle-tested SRE/DevOps practices: severity cla

    Skills
  • postmortem-writing

    Writes blameless post-mortems, with root cause, timeline and concrete actions. It is the piece that keeps you from repeating the same incident within three months.

    Write effective blameless postmortems with root cause analysis, timelines, and action items. Use when conducting incident reviews, writing postmortem

    Skills
  • pagerduty-incident-responder

    For teams that already get alerts through PagerDuty: it cross-references the incident context with recent code changes and proposes the fix as a pull request on GitHub.

    Responds to PagerDuty incidents by analyzing incident context, identifying recent code changes, and suggesting fixes via GitHub PRs.

    Agents48

Regressions, flaky tests and memory leaks 5

Three families of bugs with their own diagnosis, where the question is not what is wrong, but since when, or where the memory is getting stuck.

  • git-bisect-helper

    Runs automated git bisect sessions with a test run at each step, to answer the question of which commit caused the failure.

    Use PROACTIVELY to guide automated git bisect sessions for finding regression commits with smart test execution

    Commands47
  • test-runner

    Runs the suite, reads the results and diagnoses the cause of the failures, delivering concrete fixes instead of a report full of red tests.

    Executes tests, analyzes results, identifies failures, diagnoses root causes, and provides actionable fixes for failing tests

    Agents364
  • Test Debugger Agent

    Specialized in flaky or failing Playwright tests, with a systematic taxonomy that separates a badly written test from a real bug in the application.

    Diagnoses flaky or failing Playwright tests using systematic taxonomy. Invoked by /pw:fix when a test needs deep analysis including running tests. Age

    Agents
  • performance-profiler

    Tackles performance bottlenecks and memory leaks with load tests and monitoring, for when the application does not crash but keeps degrading over the course of the day.

    Performance analysis and optimization specialist. Use PROACTIVELY for performance bottlenecks, memory leaks, load testing, optimization strategies, an

    Agents913
  • optimize-memory-usage

    Leak detection, garbage collection tuning and memory profiling brought together in a single command. It applies when the process grows until it has to be restarted.

    Comprehensive memory usage optimization with leak detection, garbage collection tuning, and memory profiling

    Commands190

How to install and where each piece fits

Agents, skills and commands are Markdown files that live in your repository, inside .claude/agents/, .claude/skills/ and .claude/commands/. Copy the file to the right folder and Claude Code recognizes it in the next session: agents and skills are triggered by their description, commands are invoked with a slash. MCP connectors work differently, they need an entry in the configuration file and their own credentials, for example the instance URL and a service account token in the case of Grafana. Start with a debugger agent and a method skill. Add connectors only when you really need production data inside the session.

A working order that avoids blind fixes

The order matters more than the tool you choose. First reproduce: without a minimal case that fails consistently, any fix is a guess. Then gather the evidence: the full stack trace, the logs from before and after the error, the environment where it happens. Only then form hypotheses, and if there is more than one plausible hypothesis it is worth investigating them in parallel instead of testing them one after another. If the problem is recent and the old code worked, bisect gives you an answer faster than reading the code. The fix comes last, together with a test that used to fail and now passes.

Limits of what these components can see

None of these components sees what it is not given. A debugger agent works on the code, logs and tests it has access to. If the error only shows up with real data or under load, you will need to connect the session to your observability tool or reproduce the scenario locally. MCP connectors also raise the question of access: a Sentry or Grafana token gives read access to sensitive information, so use service accounts with minimal permissions. And always be wary of a root cause presented without evidence; ask for the file, the line and the test that confirms it.

Keep reading

Frequently asked questions

The agent is an executor with its own context: it receives the problem, investigates and returns a diagnosis. The skill is knowledge that changes the way Claude Code approaches the task, for example by making it reproduce the error before proposing fixes. In practice they are used together: the skill defines the method and the agent does the work.

Sources

Prompts and resources curated from international sources, normalized and categorized: over 11 thousand. A Doutor AI bot checks the sources every day and brings in what is new.

  • Daily updates
  • Over 11 thousand resources
  • Normalized and categorized

Need a tailor-made solution?

Not sure where to start with AI in your business? Get a free assessment and a tailored plan - no commitment.

Save hours every week with AI, no hassle

Doutor AI gives you 1,859 ready-to-copy AI prompts, by industry and in plain English - plus a complete technical library for those who want to go further.

See plans