.claude/skills/bug-diagnosis/SKILL.md
Use when the user asks to debug, diagnose, fix a bug, troubleshoot errors, investigate issues, or pastes error messages/stack traces. Triggers on keywords like "bug", "error", "fix", "not working", "broken", "debug", "stack trace", "exception", "crash", "issue".
npx skillsauth add CongDon1207/AGENTS.md bug-diagnosisInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are to operate as an expert full-stack dotnet angular debugging engineer to diagnose, debug, and fix bugs.
IMPORTANT: Always think hard, plan step-by-step todo list first before execute. Always remember todo list, never compact or summarize it when memory context limit is reached. Always preserve and carry your todo list through every operation. Todo list must cover all phases, from start to end, including child tasks in each phase, everything is flattened out into a long detailed todo list.
Before every major operation:
Before claiming any relationship:
Every 10 operations:
## Metadata sectionCurrent Focus bullet point within the ## Progress sectionBefore any major operation:
Every 10 operations:
## Progress sectionEmergency:
## Metadata sectionBuild a structured knowledge model in ai_task_analysis_notes/[bug-name].ai_task_analysis_notes_temp.md.
Initialize the analysis file with a ## Metadata heading. Under it, add the full original prompt/error in a markdown box using 5 backticks:
[Full original prompt/error here]
Continue adding to the ## Metadata section: the bug description and full details of the Source Code Structure from ai-prompt-context.md. Use 6 backticks for this nested markdown:
## Bug Description
[Bug description here]
## Source Code Structure
[Full details from ai-prompt-context.md]
Create all required headings:
## Progress## Errors## Assumption Validations## Performance Metrics## Memory Management## Processed Files## File List## Knowledge Graph## Error Boundaries (debugging-specific)## Interaction Map (debugging-specific)## Platform Error Patterns (debugging-specific)Populate ## Progress with:
Additional searches to ensure no critical infrastructure is missed:
grep search patterns: .*EventHandler.*{EntityName}|{EntityName}.*EventHandlergrep search patterns: .*BackgroundJob.*{EntityName}|{EntityName}.*BackgroundJobgrep search patterns: .*Consumer.*{EntityName}|{EntityName}.*Consumergrep search patterns: .*Service.*{EntityName}|{EntityName}.*Servicegrep search patterns: .*Helper.*{EntityName}|{EntityName}.*Helper**/*.{cs,ts,html}CRITICAL: Save ALL file paths immediately as a numbered list under ## File List. Update the Total Items count in ## Progress.
ERROR_BOUNDARY_DISCOVERY: Focus on debugging-relevant patterns:
Error Tracing Analysis: Find stack traces, map error propagation paths, identify handling patterns. Document under ## Error Boundaries.
Component Interaction Debugging: Discover service dependencies, find relevant endpoints/handlers, analyze request flows. Document under ## Interaction Map.
Platform Debugging Intelligence: Find platform error patterns (PlatformValidationResult, PlatformException), CQRS error paths, repository error patterns. Document under ## Platform Error Patterns.
Discovery searches:
## File ListIMPORTANT: MUST DO WITH TODO LIST
Count total files in file list, split it into many batches of 10 files in priority order. For each batch, insert a new task in the current todo list for analyzing that batch.
File Analysis Order (by priority):
CRITICAL: You must analyze ALL files in the file list identified as belonging to the highest priority categories.
For each file, add results into ## Knowledge Graph section. The heading of each analyzed file must have the item order number in the heading.
Core fields for each file:
filePath: Full path to the filetype: Component classificationarchitecturalPattern: Design pattern usedcontent: Purpose and logic summarysymbols: Classes, interfaces, methodsdependencies: Imports/using statementsbusinessContext: Comprehensive detail of all business logic, how it contributes to requirementsreferenceFiles: Files using this file's symbolsrelevanceScore: 1-10evidenceLevel: "verified" or "inferred"uncertainties: Unclear aspectsplatformAbstractions: Platform base classes usedserviceContext: Microservice ownershipdependencyInjection: DI registrationsgenericTypeParameters: Generic type relationshipsDebugging-specific fields:
errorPatterns: Exception handling, validation logicstackTraceRelevance: Relation to stack tracesdebuggingComplexity: Difficulty to debug (1-10)errorPropagation: How errors flow through componentplatformErrorHandling: Use of platform error patternscrossServiceErrors: Cross-service error scenariosvalidationLogic: Business rule validation that could faildependencyErrors: Potential dependency failuresMessage Bus Analysis (CRITICAL FOR CONSUMERS):
messageBusAnalysis: When analyzing Consumer files (*Consumer.cs extending PlatformApplicationMessageBusConsumer<T>):
*BusMessage type usedmessageBusProducersTargeted Aspect Analysis (targetedAspectAnalysis):
For Front-End items:
componentHierarchy, routeConfig, routeGuardsstateManagementStores, dataBindingPatterns, validationStrategiesFor Back-End items:
authorizationPolicies, commands, queriesdomainEntities, repositoryPatterns, businessRuleImplementationsFor Consumer items:
messageBusMessage, messageBusProducerscrossServiceIntegration, handleLogicWorkflowMANDATORY PROGRESS TRACKING: After processing every 10 files, you MUST update Items Processed in ## Progress, run a CONTEXT_ANCHOR_CHECK, and explicitly state your progress. After each file, add its path to the ## Processed Files list.
Write comprehensive overallAnalysis: summary showing:
Prerequisites: Ensure ALL files are analyzed. Read the ENTIRE analysis notes file.
Perform systematic analysis under ## Root Cause Analysis:
potentialRootCauses ranked by probability## Fix Strategy with alternatives:
suggestedFixriskAssessmentregressionMitigationtestingStrategyrollbackPlanFirst, verify and ensure your fix strategy follows code patterns and conventions from these files:
.github/copilot-instructions.md - Platform patterns.github/instructions/frontend-angular.instructions.md - Frontend patterns.github/instructions/backend-dotnet.instructions.md - Backend patterns.github/instructions/clean-code.instructions.md - Clean code rulesThen verify and ensure your fix satisfies clean code rules.
CRITICAL: Present comprehensive root cause analysis and prioritized fix strategy for explicit approval. DO NOT proceed without it.
Once approved:
## Knowledge GraphBefore completion:
## Debugging Validation heading:
changelog.mdPlatformValidationResult and PlatformException patternsdevelopment
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications, OR when they provide screenshots/images/designs to replicate or draw inspiration from. For screenshot inputs, extracts design guidelines first using ai-multimodal analysis, then implements code following those guidelines. Generates creative, polished code that avoids generic AI aesthetics.
development
Use when the user asks to investigate, understand, explore, or explain how a feature works, asks about existing logic, or wants to understand code flow. Triggers on keywords like "how does", "explain", "investigate", "understand", "what does", "where is", "how works", "logic flow", "trace", "explore feature".
development
Use when the user asks to implement a new feature, enhancement, add functionality, build something new, or create new capabilities. Triggers on keywords like "implement", "add feature", "build", "create new", "develop", "enhancement".
development
Use when the user asks to generate comprehensive feature documentation with verified test cases, create feature README with code evidence, or document a complete feature with test verification. Triggers on keywords like "feature documentation", "document feature", "comprehensive docs", "feature README", "test verification", "verified documentation".