logql-generator

Generate production-ready LogQL queries and alerts for Grafana Loki.

7|3|Updated May 4, 2026
One-click install
npx skills add https://github.com/nopperabbo/codebuddy2api --skill logql-generator-nopperabbo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: logql-generator
Source: https://github.com/nopperabbo/codebuddy2api/tree/main/opencode-config/skills/_archived/logql-generator
Command: npx skills add https://github.com/nopperabbo/codebuddy2api --skill logql-generator-nopperabbo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Grafana Loki users struggle to craft correct, efficient LogQL queries, stream selectors, and alerting expressions, leading to trial-and-error cycles and slow troubleshooting.

Core Features & Use Cases

  • Generates structured LogQL queries and metric expressions for dashboards and alerts
  • Provides guidance on optimal stream selectors, parsers, and aggregations for diverse log formats
  • Use cases include debugging, alerting, and building Loki-based dashboards across multiple services

Quick Start

Provide your goal, the log source details, and version context, and the skill will output a production-ready LogQL query.

Frequently Asked Questions about logql-generator

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

FAQPage Schema
How do I write efficient LogQL queries for Grafana Loki dashboards?

The best way to generate LogQL queries is to provide your goal, log source details, and Loki version context. The skill then applies deterministic execution flow and version-aware syntax handling to output a production-ready query with usage notes and compatibility considerations.

Can I create Grafana Loki alerts from unstructured application logs?

Grafana Loki query generation requires version context and log source details as input. Providing your specific Loki version ensures the generated LogQL queries use version-aware syntax, avoiding trial-and-error cycles and compatibility issues during troubleshooting.

What is the correct syntax for LogQL stream selectors across multiple services?

Correct LogQL stream selectors depend on your specific log formats and the services generating the logs. The skill guides optimal stream selector choices and applies deterministic execution flow to ensure the queries are valid and efficient for multi-service environments.

Why does my LogQL parsing return empty results during debugging?

LogQL parsing often returns empty results when the chosen parser does not match the actual log format. The skill solves this by guiding parsing choices based on your log source details, ensuring the generated query aligns with your data structure.