← All skills
Error Detective
Use when investigating production errors, analyzing stack traces, generating reproduction steps, and identifying root causes.
About this skill
Use when investigating production errors, analyzing stack traces, generating reproduction steps, and identifying root causes.
SKILL.md
error-detective.SKILL.mdPlace it in your Syntic skills folder. For Syntic Code, install in your local skills directory, review the contents and run it in a controlled environment first.
--- name: Error Detective description: Use when investigating production errors, analyzing stack traces, generating reproduction steps, and identifying root causes. category: QA & Testing version: 1.0.0 tools: [] --- # Error Detective ## Error Triage Process 1. Classify the error by impact: how many users, frequency, and what functionality is broken. 2. Gather context: collect the full stack trace, request payload, user session state, environment variables, and deployment version. 3. Determine if this is a new error or regression. Check error tracking history for similar stack traces. 4. Reproduce the error in a controlled environment before investigating. If reproduction fails, gather more context. 5. Identify the root cause: code bug, data issue, configuration error, infrastructure problem, or race condition. ## Stack Trace Analysis Read stack traces bottom-up: the root cause is at the bottom, the symptom is at the top. Identify the boundary between application code and library/framework code (the bug is almost always in the application code at the boundary). Look for the first application-code frame—this is where the error originated. Cross-reference line numbers with the deployed git commit. Use `git blame` to identify when the problematic code was introduced. For async stack traces (Node.js, Python asyncio), look for the `caused by` or `previous error` chain. Async errors often lose context across await boundaries. ## Reproduction Step Generation Write deterministic reproduction steps: given the same inputs and environment state, the error occurs every time. Include prerequisites: specific database data, feature flags enabled, user role/permissions, time-of-day dependencies. Minimize reproduction steps: remove unnecessary actions until only the essential sequence remains. Create automated reproduction scripts when possible: API calls with curl, browser automation with Playwright, or unit tests demonstrating the failure. Document environment requirements: specific OS, browser version, network conditions, or concurrent load needed to reproduce. ## Common Error Patterns **Null reference errors**: Trace the null value backward through the call chain. Find where the value was expected to be set but was not. **Race conditions**: Errors that occur intermittently under load. Check for shared mutable state accessed from multiple threads without synchronization. **Resource exhaustion**: Memory leaks show as gradual OOM kills. Connection pool exhaustion shows as timeout errors. File descriptor exhaustion shows as "too many open files." **Serialization errors**: Mismatched schemas between producer and consumer. Check for field type changes, missing fields, encoding mismatches. ## Error Tracking Integration Use Sentry, Datadog, or Bugsnag for centralized error collection. Configure source maps and debug symbols for readable stack traces. Group related errors by stack trace fingerprint. Set alert thresholds: alert on new error types immediately, alert on error rate spikes (3x baseline), and alert on high-frequency errors exceeding 100 occurrences per minute. Link errors to deployments. Correlate error spikes with specific releases to identify which deployment introduced the regression. ## Root Cause Investigation Tools Use distributed tracing (Jaeger, Zipkin) to follow failing requests across services. Use log aggregation (ELK, Loki) to correlate logs from multiple services around the error timestamp. Use database query logs to identify slow queries, deadlocks, or constraint violations. Use git bisect to find the exact commit that introduced a regression. Use memory profilers (Chrome DevTools, pprof, Instruments) for memory-related errors.
Install
Syntic App
- 1Create a dedicated folder for this skill in your local skills library.
- 2Place SKILL.md into that folder.
- 3Restart Syntic and invoke this skill on matching tasks.
Syntic Code (CLI)
- 1Save SKILL.md in your local Syntic Code skills directory.
- 2Keep related files in the same skill folder.
- 3Run in a safe environment and validate outputs.