error-detective
Search logs and codebases for error patterns, stack traces, and anomalies. Correlates errors across systems and identifies root causes.
About this skill
Error Detective is an advanced AI agent skill designed for robust system troubleshooting and debugging. It excels at parsing through vast amounts of log data and source code to detect specific error patterns, identify critical stack traces, and flag unusual anomalies that could indicate underlying system problems. The skill intelligently correlates errors observed across disparate systems, providing a holistic view of the issue and significantly accelerating the root cause analysis process. By automating the initial stages of error investigation, it empowers developers and operations teams to resolve complex issues more efficiently, minimize downtime, and maintain system stability. Part of the `antigravity-awesome-skills` collection, this skill is built to enhance AI agents with specialized capabilities for complex data processing and interaction with critical system diagnostics.
Best use case
Automated diagnosis of production incidents. Proactive identification of emerging software bugs. Streamlining debugging workflows in development environments. Monitoring system health for deviations from normal behavior. Post-mortem analysis of system failures.
Search logs and codebases for error patterns, stack traces, and anomalies. Correlates errors across systems and identifies root causes.
Identification of specific error patterns and stack traces. Correlation of errors across multiple systems or services. Pinpointing of potential root causes for observed anomalies. Actionable steps, best practices, or guidance for resolving identified issues. Reduced time spent on manual log inspection and error analysis.
Practical example
Example input
Analyze the last 24 hours of logs for the 'user-auth-service' and 'payment-gateway' services. Look for recurring HTTP 5xx errors, database connection timeouts, or any unhandled exceptions. If found, correlate them and suggest the most probable root cause.
Example output
Analyzing logs for 'user-auth-service' and 'payment-gateway' over the past 24 hours...
**Detected Anomalies & Patterns:**
1. **Service:** `user-auth-service`
* **Error Pattern:** Frequent `HTTP 503 Service Unavailable` errors (approx. 150 instances in the last 4 hours).
* **Stack Trace Snippet:** `com.example.auth.UserAuthServiceException: Upstream service 'identity-provider' unavailable.`
2. **Service:** `payment-gateway`
* **Error Pattern:** Sporadic `DatabaseConnectionPool exhausted` errors (approx. 25 instances, peaking around 03:00 UTC).
* **Stack Trace Snippet:** `org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLTransientConnectionException: payment_db connection refused.`
**Correlation & Root Cause Hypothesis:**
* **Observation:** The `HTTP 503` errors in `user-auth-service` started approximately 30 minutes after the peak `DatabaseConnectionPool exhausted` errors in `payment-gateway`.
* **Hypothesis:** The `payment-gateway`'s database connection issues at 03:00 UTC might have led to resource contention or a cascading failure that impacted the 'identity-provider' service (an upstream dependency for `user-auth-service`), causing it to become unavailable and resulting in `HTTP 503` errors for the `user-auth-service`.
**Recommended Actionable Steps:**
1. **Investigate `payment-gateway` database:**
* Check `payment_db` health and resource utilization during 03:00 UTC.
* Review `payment-gateway` application logs around 03:00 UTC for specific queries or operations that might have exhausted the connection pool.
* Consider increasing `payment-gateway` database connection pool size or optimizing expensive queries.
2. **Verify `identity-provider` service health:**
* Check `identity-provider` service logs and metrics for the period following 03:00 UTC for any errors or increased load.
* Confirm its connectivity to `payment-gateway` if it's a direct dependency.
3. **Monitor:** Continue monitoring both services closely, especially `identity-provider` and `payment-gateway` database connectivity, for recurrence.
For detailed implementation guidance, refer to `resources/implementation-playbook.md`.When to use this skill
- When working on error detective tasks or workflows.
- When needing guidance, best practices, or checklists for error detection and root cause analysis.
- When debugging complex applications or microservices environments.
- When analyzing system logs for performance bottlenecks or security vulnerabilities.
When not to use this skill
- When the task is unrelated to error detection, debugging, or system diagnostics.
- When you need a different domain or tool outside the scope of log analysis or codebase scanning.
- For tasks requiring human intuition for non-technical problem-solving.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/error-detective/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How error-detective Compares
| Feature / Agent | error-detective | Standard Approach |
|---|---|---|
| Platform Support | Claude | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | easy | N/A |
Frequently Asked Questions
What does this skill do?
Search logs and codebases for error patterns, stack traces, and anomalies. Correlates errors across systems and identifies root causes.
Which AI agents support this skill?
This skill is designed for Claude.
How difficult is it to install?
The installation complexity is rated as easy. You can find the installation instructions above.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
SKILL.md Source
## Use this skill when - Working on error detective tasks or workflows - Needing guidance, best practices, or checklists for error detective ## Do not use this skill when - The task is unrelated to error detective - 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 error detective specializing in log analysis and pattern recognition. ## Focus Areas - Log parsing and error extraction (regex patterns) - Stack trace analysis across languages - Error correlation across distributed systems - Common error patterns and anti-patterns - Log aggregation queries (Elasticsearch, Splunk) - Anomaly detection in log streams ## Approach 1. Start with error symptoms, work backward to cause 2. Look for patterns across time windows 3. Correlate errors with deployments/changes 4. Check for cascading failures 5. Identify error rate changes and spikes ## Output - Regex patterns for error extraction - Timeline of error occurrences - Correlation analysis between services - Root cause hypothesis with evidence - Monitoring queries to detect recurrence - Code locations likely causing errors Focus on actionable findings. Include both immediate fixes and prevention strategies.
Related Skills
n8n-expression-syntax
Validate n8n expression syntax and fix common errors. Use when writing n8n expressions, using {{}} syntax, accessing $json/$node variables, troubleshooting expression errors, or working with webhook data in workflows.
mermaid-expert
Create Mermaid diagrams for flowcharts, sequences, ERDs, and architectures. Masters syntax for all diagram types and styling.
mcp-builder-ms
Use this skill when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
makepad-deployment
CRITICAL: Use for Makepad packaging and deployment. Triggers on: deploy, package, APK, IPA, 打包, 部署, cargo-packager, cargo-makepad, WASM, Android, iOS, distribution, installer, .deb, .dmg, .nsis, GitHub Actions, CI, action, marketplace
macos-menubar-tuist-app
Build, refactor, or review SwiftUI macOS menubar apps that use Tuist.
kaizen
Guide for continuous improvement, error proofing, and standardization. Use this skill when the user wants to improve code quality, refactor, or discuss process improvements.
issues
Interact with GitHub issues - create, list, and view issues.
hugging-face-tool-builder
Your purpose is now is to create reusable command line scripts and utilities for using the Hugging Face API, allowing chaining, piping and intermediate processing where helpful. You can access the API directly, as well as use the hf command line tool.
git-pushing
Stage all changes, create a conventional commit, and push to the remote branch. Use when explicitly asks to push changes ("push this", "commit and push"), mentions saving work to remote ("save to github", "push to remote"), or completes a feature and wants to share it.
git-hooks-automation
Master Git hooks setup with Husky, lint-staged, pre-commit framework, and commitlint. Automate code quality gates, formatting, linting, and commit message enforcement before code reaches CI.
gh-review-requests
Fetch unread GitHub notifications for open PRs where review is requested from a specified team or opened by a team member. Use when asked to "find PRs I need to review", "show my review requests", "what needs my review", "fetch GitHub review requests", or "check team review queue".
fp-types-ref
Quick reference for fp-ts types. Use when user asks which type to use, needs Option/Either/Task decision help, or wants fp-ts imports.