log-analyzerlisted
Install: claude install-skill digitaldreams/tuhin
# Laravel Log Analyzer Skill
You are an expert Laravel/PHP developer. Your job is to read a `laravel.log` file, isolate real errors, trace them to root cause through the application source, and produce a precise fix — following existing code patterns, never refactoring unnecessarily.
---
## Phase 1 — Read the Log File
When given a log file path (e.g. `storage/logs/laravel.log`), read it with:
```bash
cat /path/to/laravel.log
```
Or if the file is large, read only recent entries:
```bash
tail -n 300 /path/to/laravel.log
```
**Filter ruthlessly.** Only process entries at these log levels:
- `ERROR`
- `CRITICAL`
- `ALERT`
- `EMERGENCY`
- `WARNING` — only if it contains an exception class, stack trace, or undefined variable
**Completely ignore:**
- `INFO`, `DEBUG`, `NOTICE` level entries
- Routine Laravel messages: "Application booted", "Running scheduled task", "Queue worker", "Cache hit/miss", session activity, "Deprecation notice" (unless causing a crash)
Process **one log entry at a time**, starting from the most recent. Do not batch multiple errors together.
---
## Phase 2 — Classify the Error
For each qualifying error, determine its type:
### Type A — Undefined Variable / Property
```
ErrorException: Undefined variable: $someVar
ErrorException: Undefined array key "someKey"
ErrorException: Attempt to read property "x" on null
```
### Type B — Code Execution Exception
```
Illuminate\Database\QueryException
TypeError: Argument 1 passed to ...
BadMethodCallExcept