Skip to content
bug-diagnosis logo

Bug Diagnosis & Debugging

bug-diagnosis

Quick triage skill for initial bug assessment and user-reported issues. Use for bug reports, error reports, quick diagnosis, initial triage, "what's causing", "why is this failing". For systematic multi-file debugging with verification protocols, use `debugging` skill instead.

SKILL.md

Full skill instructions

Skill Variant: Use this skill for quick bug triage and interactive debugging with user feedback. For systematic autonomous debugging workflows with 4-phase protocol and verification gates, use debugging skill instead. For feature investigation without fixes, use feature-investigation.

Disambiguation

  • For systematic multi-file debugging with verification protocols -> use debugging
  • For feature investigation without fixes -> use feature-investigation
  • This skill focuses on quick triage of user-reported bugs

Bug Diagnosis & Debugging

You are to operate as an expert full-stack .NET Angular debugging engineer to diagnose, debug, and fix the bug described in [bug-description-or-bug-info-file-path].

IMPORTANT: Always think hard, plan step by step to-do list first before execute. Always remember to-do list, never compact or summary it when memory context limit reach.

Prerequisites: MUST READ .claude/​skills/​shared/​anti-hallucination-protocol.md before executing.


PHASE 1: EXTERNAL MEMORY-DRIVEN BUG ANALYSIS

Build a structured knowledge model in a Markdown analysis file at .ai/​workspace/​analysis/[semantic-name].analysis.md.

PHASE 1A: INITIALIZATION AND DISCOVERY

  1. Initialize the analysis file with: Metadata, Progress, Errors, File List, Knowledge Graph sections
  2. Discovery searches: Semantic and grep search all error keywords. Prioritize: Domain Entities, Commands, Queries, Event Handlers, Controllers, Background Jobs, Consumers, Frontend Components

PHASE 1B: SYSTEMATIC FILE ANALYSIS

  1. Count total files, split into batches of 10 in priority order
  2. For each file, document: filePath, type, content, symbols, dependencies, businessContext, errorPatterns, stackTraceRelevance, validationLogic

PHASE 1C: OVERALL ANALYSIS

Write comprehensive summary showing: end-to-end workflows, error propagation paths, integration points and failure points.


PHASE 2: ROOT CAUSE ANALYSIS & FIX STRATEGY

Root Cause Dimensions

  1. Technical: Code defects, architectural issues
  2. Business Logic: Rule violations, validation failures
  3. Data: Data corruption, integrity violations
  4. Integration: API contract violations, communication failures

Generate Fix Strategy

Document alternatives with: suggestedFix, riskAssessment, regressionMitigation, testingStrategy, rollbackPlan.


PHASE 3: APPROVAL GATE

CRITICAL: Present root cause analysis and fix strategy for explicit user approval before implementation.


PHASE 4: DEBUGGING EXECUTION

Once approved: execute fix plan, make minimal targeted changes, follow platform patterns.


Platform Error Patterns Reference

Backend Validation

return base.Validate()
    .And(_ => condition, "Error message")
    .AndAsync(async req => await ValidateAsync(req));

await repository.GetByIdAsync(id).EnsureFound($"Not found: {id}");
await entity.ValidateAsync(repository, ct).EnsureValidAsync();

Frontend Error Handling

this.apiService.getData().pipe(
    this.observerLoadingErrorState('loadData'),
    this.tapResponse(
        data => this.updateState({ data }),
        error => this.handleError(error)
    ),
    this.untilDestroyed()
).subscribe();

Quick Verification Checklist

Before removing/​changing ANY code:

  • Searched static imports?
  • Searched string literals?
  • Checked dynamic invocations?
  • Read actual implementations?
  • Traced dependencies?
  • Declared confidence level?

If confidence < 90% -> REQUEST USER CONFIRMATION


Common Bug Categories

CategoryExamples
Data IssuesMissing null checks, race conditions, stale cache
ValidationMissing rules, bypassed validation, async not awaited
Cross-ServiceMessage bus failures, sync ordering, API contract mismatches
FrontendLifecycle issues, state bugs, missing error handling
AuthorizationMissing role checks, wrong company context

Related

  • debugging
  • code-review

IMPORTANT Task Planning Notes (MUST FOLLOW)

  • Always plan and break work into many small todo tasks
  • Always add a final review todo task to verify work quality and identify fixes/​enhancements

More Productivity & Planning skills

brainstorming logo
Productivity & Planning

brainstorming

Structured design dialogue that validates ideas before implementation begins.

295.4K 385.7K
View
ui-ux-pro-max logo
Productivity & Planning

ui-ux-pro-max

Comprehensive design intelligence for web and mobile UI/UX across 10 technology stacks.

133.1K 383.9K
View
writing-plans logo
Productivity & Planning

writing-plans

Comprehensive implementation plans for multi-step tasks, breaking down specs into bite-sized, testable steps.

295.4K 268K
View
using-superpowers logo
Productivity & Planning

using-superpowers

Introduction to the obra skills system with mandatory skill invocation rules and best practices.

295.4K 259.8K
View
executing-plans logo
Productivity & Planning

executing-plans

Execute a written implementation plan with critical review and task checkpoints.

295.4K 229.1K
View
dispatching-parallel-agents logo
Productivity & Planning

dispatching-parallel-agents

Delegate independent tasks to specialized agents working concurrently with isolated context.

295.4K 206.3K
View
using-git-worktrees logo
Productivity & Planning

using-git-worktrees

Isolated git worktrees with smart directory selection and safety verification.

295.4K 205.2K
View
webapp-testing logo
Productivity & Planning

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

179.7K 170.6K
View
content-strategy logo
Productivity & Planning

content-strategy

Plan searchable and shareable content that drives traffic, builds authority, and generates leads.

53.3K 150.9K
View
repo-intake-and-plan logo
Productivity & Planning

repo-intake-and-plan

README-first repository scanner that extracts commands and classifies reproduction candidates without executing them.

497 139.6K
View
marketing-ideas logo
Productivity & Planning

marketing-ideas

Brainstorm and prioritize marketing strategies tailored to your SaaS stage, budget, and goals.

53.3K 137.2K
View
site-architecture logo
Productivity & Planning

site-architecture

Plan and optimize your website's page hierarchy, navigation, URL structure, and internal linking.

53.3K 112.8K
View

Productivity AI tools

Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View
SaveDay logo
Productivity

SaveDay

Capture, organize, and utilize your knowledge effortlessly.

Free
View
Any Summary logo
Productivity

Any Summary

Instant Summaries of Audio & Video Interviews with AnySummary

Freemium
View
M
Productivity

Map This

Transform PDFs into engaging mind maps.

Freemium
View
ChatPDF logo
Productivity

ChatPDF

Chat with any PDF instantly

Free
View
I
Productivity

intellisay

Create an optimal daily plan using your voice

Paid
View
A
Productivity

Aurora AI

A productivity platform to centralize organizational knowledge and workflows with contextual AI assistance.

Paid
View
AskYourPDF logo
Productivity

AskYourPDF

AskYourPDF Pricing Plans: Tailored to Your Needs

Free
View