# Error Detective (agent)

> Error Detective (agent): Error tracking, stack trace analysis, reproduction step generation, and root cause identification

Error Detective (agent) is a paid AI agent skill on Agensi by Laravel Company, in Agents & Orchestration. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $2 (one-time purchase)
- Creator: [Laravel Company](https://www.agensi.io/creators/laravelcompany)
- Category: [Agents & Orchestration](https://www.agensi.io/skills/agents-orchestration)
- Version: 1.0
- Last updated: 2026-11-27
- Security: scan passed (2026-11-27); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/error-detective-agent
- Tags: ai-agents, laravel, php, data

## About this skill

Debugging Laravel applications often feels like guesswork when stack traces are incomplete or logs are noisy. This skill transforms your agent into a senior debugger that systematically breaks down errors, identifies root causes, and generates reproduction steps.

### What it does
- **Stack trace analysis** parses complex PHP and Laravel error logs to pinpoint the exact failure point.
- **Root cause identification** connects symptoms to underlying issues in business logic, environment config, or database state.
- **Reproduction step generation** creates clear, actionable instructions to trigger the error in a local environment.
- **Assumption logging** explicitly lists what is unknown about the environment rather than hallucinating facts.
- **Security auditing** checks proposed fixes against security guidelines to prevent introducing vulnerabilities.

### How it works
1. **Goal definition** where the agent restates the debugging objective based on your error report.
2. **Input audit** to identify missing logs, environment details, or context needed for a full analysis.
3. **Investigation plan** outlining the steps to trace the execution flow through the Laravel stack.
4. **Execution and verification** where the agent analyzes the code against Laravel coding standards and security protocols.
5. **Structured reporting** delivering a standardized output containing summary, details, assumptions, and risks.

### Frameworks & tools
Specifically optimized for the Laravel ecosystem, including PHP 8.x, Eloquent ORM, Blade, and common Laravel stack traces (Spatie Ignition).

### Why this beats prompting it yourself
Manual prompting often leads to agents making "best guesses" about missing context. This skill enforces a strict workflow that prioritizes accuracy, forces the declaration of assumptions, and applies specific Laravel-centric security and coding standards.

### Use cases
- Analyze cryptic production stack traces to find the failing line of code.
- Generate automated test cases or manual steps to reproduce a reported bug.
- Audit a proposed bug fix for compliance with Laravel security best practices.
- Debug database-level errors by mapping Eloquent queries to underlying SQL issues.

### Known limitations
Requires specific shared files for coding standards and output templates to be present in the agent context. Optimised for PHP/Laravel; accuracy may decrease for other languages.

## Requires

- Git

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Error Detective (agent) skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does this skill improve upon standard AI debugging for Laravel errors?

This skill acts as a senior debugger that systematically parses stack traces, identifies root causes in business logic or database states, and provides actionable reproduction steps rather than just guessing.

### What specific versions of Laravel and PHP does the Error Detective Agent support?

It is optimized for the modern Laravel ecosystem, including PHP 8.x, Eloquent ORM, and Spatie Ignition logs, though it can analyze any standard PHP-based stack trace.

### Is this skill compatible with specific AI agents or LLMs?

The skill is designed to work with any high-reasoning AI agent that supports custom system instructions and can access your project's codebase or log files.

### What assets are included in the download package?

The purchase includes the core logic for the Error Detective, the required output templates for structured reporting, and the standardized Laravel coding/security guidelines the agent uses for audits.

### Are there any specific configuration steps required to start debugging?

To achieve the highest accuracy, you will need to provide the agent with your specific coding standards and the provided output templates as shared files within your agent's context.

### Can I use this skill to debug non-Laravel PHP frameworks like Symfony or Slim?

While the agent can analyze general PHP code, it is specifically tuned for Laravel-centric patterns; its ability to map Eloquent queries and Blade templates may not translate effectively to other frameworks.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
