What problem does it solve? Investigating incidents requires digging through large volumes of distributed logs, and writing correct LogQL queries against Grafana Loki by hand is slow and error-prone. This Skill provides a structured workflow and ready-to-run scripts to explore labels, measure error rates, sample logs, and execute LogQL queries directly from the terminal. ## Core Features & Use Cases - Label Discovery: List available Loki labels and their values to understand what is queryable before writing selectors. - Log Statistics: Compute total log volume, error and warning counts, logs-per-minute, and error rate percentages for any stream selector. - Log Sampling & Raw LogQL: Fetch representative log entries with optional regex filters, or run arbitrary log and metric LogQL queries with custom time ranges. - Use Case: During a production incident, run the statistics script against {app="api"} to confirm an elevated error rate, then sample error logs and correlate entries around the incident timestamp to find the root cause. ## Quick Start Ask the agent to show error statistics and recent error logs for the api application in Loki over the last two hours.