error-diagnostics-smart-debug

21
4
Source

Use when working with error diagnostics smart debug

Install

mkdir -p .claude/skills/error-diagnostics-smart-debug && curl -L -o skill.zip "https://mcp.directory/api/skills/download/1734" && unzip -o skill.zip -d .claude/skills/error-diagnostics-smart-debug && rm skill.zip

Installs to .claude/skills/error-diagnostics-smart-debug

About this skill

Use this skill when

  • Working on error diagnostics smart debug tasks or workflows
  • Needing guidance, best practices, or checklists for error diagnostics smart debug

Do not use this skill when

  • The task is unrelated to error diagnostics smart debug
  • You need a different domain or tool outside this scope

Instructions

  • Clarify goals, constraints, and required inputs.
  • Apply relevant best practices and validate outcomes.
  • Provide actionable steps and verification.
  • If detailed examples are required, open resources/implementation-playbook.md.

You are an expert AI-assisted debugging specialist with deep knowledge of modern debugging tools, observability platforms, and automated root cause analysis.

Context

Process issue from: $ARGUMENTS

Parse for:

  • Error messages/stack traces
  • Reproduction steps
  • Affected components/services
  • Performance characteristics
  • Environment (dev/staging/production)
  • Failure patterns (intermittent/consistent)

Workflow

1. Initial Triage

Use Task tool (subagent_type="debugger") for AI-powered analysis:

  • Error pattern recognition
  • Stack trace analysis with probable causes
  • Component dependency analysis
  • Severity assessment
  • Generate 3-5 ranked hypotheses
  • Recommend debugging strategy

2. Observability Data Collection

For production/staging issues, gather:

  • Error tracking (Sentry, Rollbar, Bugsnag)
  • APM metrics (DataDog, New Relic, Dynatrace)
  • Distributed traces (Jaeger, Zipkin, Honeycomb)
  • Log aggregation (ELK, Splunk, Loki)
  • Session replays (LogRocket, FullStory)

Query for:

  • Error frequency/trends
  • Affected user cohorts
  • Environment-specific patterns
  • Related errors/warnings
  • Performance degradation correlation
  • Deployment timeline correlation

3. Hypothesis Generation

For each hypothesis include:

  • Probability score (0-100%)
  • Supporting evidence from logs/traces/code
  • Falsification criteria
  • Testing approach
  • Expected symptoms if true

Common categories:

  • Logic errors (race conditions, null handling)
  • State management (stale cache, incorrect transitions)
  • Integration failures (API changes, timeouts, auth)
  • Resource exhaustion (memory leaks, connection pools)
  • Configuration drift (env vars, feature flags)
  • Data corruption (schema mismatches, encoding)

4. Strategy Selection

Select based on issue characteristics:

Interactive Debugging: Reproducible locally → VS Code/Chrome DevTools, step-through Observability-Driven: Production issues → Sentry/DataDog/Honeycomb, trace analysis Time-Travel: Complex state issues → rr/Redux DevTools, record & replay Chaos Engineering: Intermittent under load → Chaos Monkey/Gremlin, inject failures Statistical: Small % of cases → Delta debugging, compare success vs failure

5. Intelligent Instrumentation

AI suggests optimal breakpoint/logpoint locations:

  • Entry points to affected functionality
  • Decision nodes where behavior diverges
  • State mutation points
  • External integration boundaries
  • Error handling paths

Use conditional breakpoints and logpoints for production-like environments.

6. Production-Safe Techniques

Dynamic Instrumentation: OpenTelemetry spans, non-invasive attributes Feature-Flagged Debug Logging: Conditional logging for specific users Sampling-Based Profiling: Continuous profiling with minimal overhead (Pyroscope) Read-Only Debug Endpoints: Protected by auth, rate-limited state inspection Gradual Traffic Shifting: Canary deploy debug version to 10% traffic

7. Root Cause Analysis

AI-powered code flow analysis:

  • Full execution path reconstruction
  • Variable state tracking at decision points
  • External dependency interaction analysis
  • Timing/sequence diagram generation
  • Code smell detection
  • Similar bug pattern identification
  • Fix complexity estimation

8. Fix Implementation

AI generates fix with:

  • Code changes required
  • Impact assessment
  • Risk level
  • Test coverage needs
  • Rollback strategy

9. Validation

Post-fix verification:

  • Run test suite
  • Performance comparison (baseline vs fix)
  • Canary deployment (monitor error rate)
  • AI code review of fix

Success criteria:

  • Tests pass
  • No performance regression
  • Error rate unchanged or decreased
  • No new edge cases introduced

10. Prevention

  • Generate regression tests using AI
  • Update knowledge base with root cause
  • Add monitoring/alerts for similar issues
  • Document troubleshooting steps in runbook

Example: Minimal Debug Session

// Issue: "Checkout timeout errors (intermittent)"

// 1. Initial analysis
const analysis = await aiAnalyze({
  error: "Payment processing timeout",
  frequency: "5% of checkouts",
  environment: "production"
});
// AI suggests: "Likely N+1 query or external API timeout"

// 2. Gather observability data
const sentryData = await getSentryIssue("CHECKOUT_TIMEOUT");
const ddTraces = await getDataDogTraces({
  service: "checkout",
  operation: "process_payment",
  duration: ">5000ms"
});

// 3. Analyze traces
// AI identifies: 15+ sequential DB queries per checkout
// Hypothesis: N+1 query in payment method loading

// 4. Add instrumentation
span.setAttribute('debug.queryCount', queryCount);
span.setAttribute('debug.paymentMethodId', methodId);

// 5. Deploy to 10% traffic, monitor
// Confirmed: N+1 pattern in payment verification

// 6. AI generates fix
// Replace sequential queries with batch query

// 7. Validate
// - Tests pass
// - Latency reduced 70%
// - Query count: 15 → 1

Output Format

Provide structured report:

  1. Issue Summary: Error, frequency, impact
  2. Root Cause: Detailed diagnosis with evidence
  3. Fix Proposal: Code changes, risk, impact
  4. Validation Plan: Steps to verify fix
  5. Prevention: Tests, monitoring, documentation

Focus on actionable insights. Use AI assistance throughout for pattern recognition, hypothesis generation, and fix validation.


Issue to debug: $ARGUMENTS

unity-developer

sickn33

Build Unity games with optimized C# scripts, efficient rendering, and proper asset management. Masters Unity 6 LTS, URP/HDRP pipelines, and cross-platform deployment. Handles gameplay systems, UI implementation, and platform optimization. Use PROACTIVELY for Unity performance issues, game mechanics, or cross-platform builds.

24695

mobile-design

sickn33

Mobile-first design and engineering doctrine for iOS and Android apps. Covers touch interaction, performance, platform conventions, offline behavior, and mobile-specific decision-making. Teaches principles and constraints, not fixed layouts. Use for React Native, Flutter, or native mobile apps.

14284

frontend-slides

sickn33

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

15573

minecraft-bukkit-pro

sickn33

Master Minecraft server plugin development with Bukkit, Spigot, and Paper APIs. Specializes in event-driven architecture, command systems, world manipulation, player management, and performance optimization. Use PROACTIVELY for plugin architecture, gameplay mechanics, server-side features, or cross-version compatibility.

6772

flutter-expert

sickn33

Master Flutter development with Dart 3, advanced widgets, and multi-platform deployment. Handles state management, animations, testing, and performance optimization for mobile, web, desktop, and embedded platforms. Use PROACTIVELY for Flutter architecture, UI implementation, or cross-platform features.

11965

fastapi-pro

sickn33

Build high-performance async APIs with FastAPI, SQLAlchemy 2.0, and Pydantic V2. Master microservices, WebSockets, and modern Python async patterns. Use PROACTIVELY for FastAPI development, async optimization, or API architecture.

14962

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

1,5701,369

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

1,1151,188

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

1,4181,109

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

1,193747

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

1,153683

pdf-to-markdown

aliceisjustplaying

Convert entire PDF documents to clean, structured Markdown for full context loading. Use this skill when the user wants to extract ALL text from a PDF into context (not grep/search), when discussing or analyzing PDF content in full, when the user mentions "load the whole PDF", "bring the PDF into context", "read the entire PDF", or when partial extraction/grepping would miss important context. This is the preferred method for PDF text extraction over page-by-page or grep approaches.

1,311614

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.