analyze-logs

Analyzes structured NDJSON wide-event logs from evlog file system drains to debug errors and performance issues.

Updated Sep 5, 2023
One-click install
npx skills add https://github.com/eyenalxai/dotfiles --skill analyze-logs-eyenalxai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: analyze-logs
Source: https://github.com/eyenalxai/dotfiles/tree/main/.agents/skills/analyze-logs
Command: npx skills add https://github.com/eyenalxai/dotfiles --skill analyze-logs-eyenalxai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Debugging application errors and investigating slow requests often requires digging through unstructured logs. This Skill reads structured wide-event logs written by evlog's file system drain and turns them into actionable answers about errors, latency, and request patterns. ## Core Features & Use Cases - Error Analysis: Filters events by level or status code, reads error.data.why and error.data.fix fields, and explains root causes with suggested remediations. - Performance Investigation: Parses duration strings to find slow requests, identifies slow endpoints, and computes error rates per path. - Format Handling: Detects and parses both NDJSON and pretty-printed JSON log formats, and can fall back to evlog's memory drain endpoint when no log files exist. - Use Case: A user reports that checkout is failing. The Skill reads the latest .jsonl file, filters for errors on /api/checkout, and reports the failing status code, the error.data.why explanation, and the suggested fix. ## Quick Start Analyze the recent logs in .evlog/logs and tell me why the checkout endpoint is returning errors.

Frequently Asked Questions about analyze-logs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze application logs to debug errors?

Read the most recent .jsonl file in the .evlog/logs directory and parse each line as an independent JSON event. Filter for level equal to error or status codes of 400 and above, then inspect error.message, error.data.why, and error.data.fix for the cause and suggested remediation.

How do I find slow requests in evlog logs?

Parse the duration field of each event, which is a string like "706ms", extract the numeric part, and filter values above your threshold such as 1000ms. Sort results descending and group by path to identify slow endpoints or time-of-day patterns.

What log format does the evlog file system drain write?

The drain writes .jsonl files named by date, such as 2026-03-14.jsonl, in the .evlog/logs directory. It supports NDJSON mode with one compact JSON object per line by default, and a pretty mode with multi-line indented JSON when pretty is set to true.

What should I do if the .evlog/logs directory is empty or missing?

Run npx @evlog/cli doctor --json to check whether evlog is installed and a log sink exists. If the fs drain is not wired, use npx @evlog/cli init to set it up, or query the memory drain endpoint if the app uses createMemoryDrain from evlog/memory.

Can I trace a single request across the logs?

Yes, filter events by the requestId field to retrieve the complete wide event for that request. Each event is self-contained, so one line includes all context such as method, path, status, duration, and application-specific fields.