スキル一覧に戻る
vasilyu1983

qa-debugging

by vasilyu1983

25🍴 6📅 2026年1月23日
GitHubで見るManusで実行

SKILL.md


name: qa-debugging description: Systematic debugging methodologies, troubleshooting workflows, logging strategies, error tracking, performance profiling, stack trace analysis, and debugging tools across languages and environments. Covers local debugging, distributed systems, production issues, and root cause analysis.

Debugging & Troubleshooting (Jan 2026) — Quick Reference

This skill provides execution-ready debugging strategies, troubleshooting workflows, and root cause analysis techniques.

Core references: Google SRE troubleshooting patterns (Effective Troubleshooting) and SLO-driven reliability/triage (Service Level Objectives); observability standards via OpenTelemetry (Docs) and W3C Trace Context (Spec).


Core QA (Default)

Workflow (Reproduce → Isolate → Instrument → Fix → Verify → Regress)

Reproduce:

  • Capture exact failure signature: error message, stack trace, request ID/trace ID, timestamp, build SHA, environment, user/tenant, seed/test data IDs.
  • Quantify reproducibility: “fails 3/20 runs” is different from “fails 20/20”.

Isolate:

  • Reduce scope: minimal input, minimal config, smallest component boundary.
  • Bisect changes (git bisect / feature flags) when it started “recently”.

Instrument:

  • Prefer structured logs + correlation IDs and traces over ad-hoc print statements (OpenTelemetry, W3C Trace Context).
  • Add assertions/guards to fail fast at the true boundary.

Fix:

  • Fix root cause, not symptoms; avoid “papering over” with retries/sleeps.

Verify:

  • Add regression test at the lowest effective layer; validate in CI-like conditions.

Regress:

  • Record the narrative: trigger, root cause, fix, prevention, and what signal would have caught it earlier (Effective Troubleshooting).

Debugging Ergonomics (Make Failures Cheap)

  • Standardize a failure bundle:
    • Logs (structured), trace links, key metrics snapshot, and repro steps.
    • Test artifacts (screenshots/trace/video for UI; core dumps/crash reports where relevant).
  • REQUIRED: every automated suite defines what artifacts are produced on failure and where they live.

Flaky/Intermittent Failures (Test and Prod)

  • Treat flakes as reliability debt, not “noise”.
  • First action: classify the flake type:
    • Timing/race: missing waits, async hazards, eventual consistency.
    • Environment: CPU/memory pressure, timezones/locales, throttling.
    • Data: shared state, ordering dependency, non-deterministic fixtures.
  • Use controlled repetition: run the test N times with tracing enabled; correlate failures via request/trace IDs.

Debugging Checklist (Universal)

Before debugging:
[ ] Can you reproduce it consistently?
[ ] Do you have logs/error messages?
[ ] Do you have a minimal test case?
[ ] Do you know when it started?

During debugging:
[ ] Form hypothesis before making changes
[ ] Test one variable at a time
[ ] Document what you've tried
[ ] Use version control (commit working states)

After debugging:
[ ] Fix verified in all environments?
[ ] Regression test added?
[ ] Root cause documented?
[ ] Team notified of findings?

Do / Avoid

Do:

  • Start with the smallest reliable reproducer
  • Use evidence to support hypotheses (logs, traces, metrics, stack traces)
  • Add guardrails and regression tests as part of the fix
  • Document the fix for future reference

Avoid:

  • Adding sleeps to "stabilize" tests without proving the underlying race
  • Disabling tests or lowering assertions to make CI green
  • Debugging directly in production without a safe, scoped plan (feature flags, sampling, read-only probes)
  • Making random changes without a hypothesis

Quick Reference

SymptomTool/TechniqueCommand/ApproachWhen to Use
Application crashesStack trace analysisCheck error logs, identify first line in your codeUnhandled exceptions
Slow performanceProfiling (CPU/memory)node --prof, Chrome DevTools, cProfileHigh CPU, latency issues
Memory leakHeap snapshotsnode --inspect, compare snapshots over timeMemory usage grows
Database slowQuery profilingEXPLAIN ANALYZE, slow query logSlow queries, high DB CPU
Production-only bugLog analysis + feature flagsgrep "ERROR", enable verbose logging for userCan't reproduce locally
Distributed system issueDistributed tracingOpenTelemetry, Jaeger, trace request IDMicroservices, async workflows
Intermittent failuresLogging + monitoringAdd detailed logs, monitor metricsRace conditions, timeouts
Network timeoutNetwork debuggingcurl, Postman, check firewall/DNSExternal API failures

Decision Tree: Debugging Strategy

Issue type: [Problem Scenario]
    ├─ Application Behavior?
    │   ├─ Crashes immediately? → Check stack trace, error logs
    │   ├─ Slow/hanging? → CPU/memory profiling
    │   ├─ Intermittent failures? → Add logging, reproduce consistently
    │   └─ Unexpected output? → Binary search (add logs to narrow down)
    │
    ├─ Performance Issues?
    │   ├─ High CPU? → CPU profiler to find hot functions
    │   ├─ Memory leak? → Heap snapshots, track over time
    │   ├─ Slow database? → EXPLAIN ANALYZE, check indexes
    │   ├─ Network latency? → Trace external API calls
    │   └─ Frontend slow? → Lighthouse, Web Vitals profiling
    │
    ├─ Production-Only?
    │   ├─ Can't reproduce? → Analyze logs for patterns
    │   ├─ Environment difference? → Compare configs, data volume
    │   ├─ Need safe debugging? → Feature flags for verbose logging
    │   └─ Recent deployment? → Git bisect to find regression
    │
    ├─ Distributed Systems?
    │   ├─ Multiple services involved? → Distributed tracing (Jaeger)
    │   ├─ Request lost? → Search logs by request ID
    │   ├─ Service dependency? → Check health checks, circuit breakers
    │   └─ Async workflow? → Trace message queue, event logs
    │
    └─ Error Type?
        ├─ TypeError/NullPointer? → Check object existence, defensive coding
        ├─ Network timeout? → Check external service health, retry logic
        ├─ Database error? → Check connection pool, query syntax
        └─ Unknown error? → Systematic debugging workflow (observe, hypothesize, test)

When to Use This Skill

Use this skill when a user reports:

  • Application crashes or errors
  • Unexpected behavior or bugs
  • Performance issues (slow queries, memory leaks, high CPU)
  • Production incidents requiring root cause analysis
  • Stack trace or error message interpretation
  • Debugging strategies for specific scenarios
  • Log analysis and pattern detection
  • Distributed system debugging (microservices, async workflows)
  • Memory leaks and resource exhaustion
  • Race conditions and concurrency issues
  • Network connectivity problems
  • Database query optimization
  • Third-party API integration issues

Operational Deep Dives

See references/operational-patterns.md for systematic debugging workflows, logging strategy details, stack trace and performance profiling guides, and language-specific tooling checklists.


Templates (Copy-Paste Ready)

Production templates organized by workflow type:


Resources (Deep-Dive Guides)

Operational best practices by domain:

  • Operational Patterns: references/operational-patterns.md - Core debugging workflows, stack trace triage, profiling guides, tool selection, tail sampling strategies, async trace propagation
  • Debugging Methodologies: references/debugging-methodologies.md - Scientific method, binary search, delta debugging, rubber duck, time-travel debugging, observability-first approaches, debugging retrospectives (team practice)
  • Logging Best Practices: references/logging-best-practices.md - Structured logging, log levels, what to log/not log, implementations by language, request ID propagation, performance optimization
  • Production Debugging: references/production-debugging-patterns.md - Safe production debugging techniques, log analysis, metrics, distributed tracing, feature flags, incident response workflow

Resources

Templates

Data


AI-Assisted Debugging (2026 Standard)

AI-powered debugging is now core practice, not optional. Use AI to accelerate triage while maintaining evidence-based rigor.

IDE-Integrated AI Debugging

ToolUse CaseCommand
VS Code CopilotAutomated breakpoint analysis"Debug with Copilot" on failing test
CursorMulti-file RCA with codebase context⌘K + describe the error
JetBrains AIException analysis and fix suggestionsAlt+Enter on error

Workflow:

1. Test fails → Right-click → "Debug with Copilot"
2. AI analyzes test, code, and recent changes
3. Forms hypothesis, applies fix, re-runs test
4. Iterates until pass or hands back to developer

LLM Application Debugging

For AI/LLM applications, use specialized observability:

ToolPurposeKey Features
LangfuseLLM observabilityTraces, prompt management, evals, cost tracking
LangsmithLangChain debuggingChain visualization, playground, datasets
Weights & BiasesML experiment trackingPrompts, completions, metrics
OpenTelemetry GenAIStandardized tracingSemantic conventions for AI agents

LLM Debugging Checklist:

[ ] Trace full prompt chain (system + user + context)
[ ] Log token counts and latencies per call
[ ] Capture model responses with timestamps
[ ] Track cost per request
[ ] Version prompts separately from code
[ ] Use evals to catch regressions

AI-Assisted RCA Best Practices

Do:

  • Use reasoning models (o1, Claude) for complex RCA — they step through codebase layers systematically
  • Summarize logs/traces and cluster failures; include "evidence snippets" (IDs, timestamps, top errors)
  • Generate hypotheses, then test them with targeted instrumentation
  • Let AI suggest fixes, but verify with evidence before applying

Avoid:

  • Accepting AI root cause without corroborating evidence (logs, traces, metrics)
  • Copying suggested fixes without adding regression tests
  • Using AI for production changes without human review
  • Trusting AI-generated code that accesses external systems without validation

External Resources

See data/sources.json for:

  • Debugging tool documentation
  • Error tracking platforms (Sentry, Rollbar, Bugsnag)
  • Observability platforms (Datadog, New Relic, Honeycomb)
  • Profiling tutorials and guides
  • Production debugging best practices

Quick Decision Matrix

SymptomLikely CauseFirst Action
Application crashesUnhandled exceptionCheck error logs and stack trace
Slow performanceDatabase/network/CPU bottleneckProfile with performance tools
Memory usage growsMemory leakTake heap snapshots over time
Intermittent failuresRace condition, network timeoutAdd detailed logging around failure
Production-only bugEnvironment difference, data volumeCompare prod vs dev config/data
High CPU usageInfinite loop, inefficient algorithmCPU profiler to find hot functions
Database slowMissing index, N+1 queriesRun EXPLAIN ANALYZE on slow queries

Anti-Patterns to Avoid

  • Random changes - Making changes without hypothesis
  • Inadequate logging - Can't debug what you can't see
  • Debugging in production - Always reproduce locally when possible
  • Ignoring stack traces - Stack trace tells you exactly where error occurred
  • Not writing tests - Fix today, break tomorrow
  • Symptom fixing - Treating symptoms instead of root cause
  • No monitoring - Flying blind in production
  • Skipping postmortems - Not learning from incidents

This skill works with other skills in the framework:

Development & Operations:

  • git-workflow - Git bisect for finding regressions, version control workflows
  • dev-api-design - API debugging, error handling, REST patterns, status codes

Infrastructure & Platform:

  • ops-devops-platform - CI/CD pipelines, monitoring, incident response, SRE practices, Kubernetes ops
  • data-sql-optimization - Database query optimization, EXPLAIN ANALYZE, index tuning, slow query debugging

Success Criteria: Issues are diagnosed systematically, root causes are identified accurately, fixes include regression tests, and debugging knowledge is documented for future reference.

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です