← ClaudeAtlas

log-analyzerlisted

Laravel log file analyzer for expert-level bug diagnosis. Use this skill whenever the user mentions 'laravel.log', 'check the log', 'analyze logs', 'log file', 'there's an error in the log', or asks to diagnose, investigate, or fix a bug from a Laravel log file. Triggers on any mention of Laravel errors, exceptions, undefined variable errors, or stack traces from a Laravel application. This skill reads the log file, isolates actionable errors (ignoring INFO/DEBUG/routine logs), identifies the root cause by tracing into App-namespaced source files, inspects database table structure when model-related, and recommends a minimal, pattern-consistent fix. Always use this skill before attempting to diagnose any Laravel bug from a log.
digitaldreams/tuhin · ★ 0 · Code & Development · score 70
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