Skip to content

Generates LogQL queries, stream selectors, metric queries, and Loki alerting rules through a staged intake workflow.

CCM score
55 of 100
skills.sh installs
682
GitHub stars
345
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers the full query-building flow: intent capture, log source details, Loki and Grafana version discovery, plan confirmation, and final delivery
  • Includes reference patterns for stream selection, parsing, metric aggregation, IP matching, line_format, and unwrap with quantiles
  • Enforces compatibility-first syntax when Loki versions are unknown, and reads local reference files before generating complex queries
  • Designed for engineers writing Loki dashboard panels, log-based alerts, or troubleshooting investigations in Grafana

Install

$ npx -y skills add akin-ozer/cc-devops-skills --skill logql-generator -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

LogQL Query Generator

Overview

Interactive workflow for generating production-ready LogQL queries. LogQL is Grafana Loki's query language with indexed label selection, line filtering, parsing, and metric aggregation.

Trigger Hints

  • "Write a LogQL query for error rate by service."
  • "Help me build a Loki alert query."
  • "Convert this troubleshooting requirement into LogQL."
  • "I need step-by-step LogQL query construction."

Use this skill for query generation, dashboard queries, alerting expressions, and troubleshooting with Loki logs.

Execution Flow (Deterministic)

Always run stages in order. Do not skip required stages.

Stage 1 (Required): Capture Intent

Use AskUserQuestion to collect goal and use case.

Template:

  • "What is your primary goal: debugging, alerting, dashboard metric, or investigation?"
  • "Do you need a log query (raw lines) or a metric query (numeric output)?"
  • "What time window should this cover (example: last 15m, 1h, 24h)?"

Fallback if AskUserQuestion is unavailable:

  • Ask the same questions in plain text and continue.

Stage 2 (Required): Capture Log Source Details

Details

Repository
github.com/akin-ozer/cc-devops-skills
Category
DevOps & Cloud
First seen
Jun 3, 2026

Questions

What does the logql-generator skill do?

The logql-generator skill generates LogQL queries, log stream selectors, metric queries, and alerting rules for Grafana Loki. It walks through intent, log source details, and Loki and Grafana versions before producing a query.

How do I install the logql-generator skill?

Run npx -y skills add akin-ozer/cc-devops-skills --skill logql-generator -y in your project. After that, logql-generator can build Loki queries for error rates, parsed log fields, and alert expressions.

Where does logql-generator stand in the DevOps & Cloud category?

logql-generator is listed in the DevOps & Cloud category on Claude Marketplaces, next to azure-diagnostics, azure-prepare and azure-deploy. It covers Grafana Loki query work, which those Azure skills do not.

Does logql-generator check which Loki version I run?

Yes, logql-generator asks which Loki and Grafana versions you use, or infers them. If they are unknown, it uses compatibility-first syntax and gives an optional variant for Loki 3.x features.

More from akin-ozer/cc-devops-skills

All 31

Similar to Logql Generator

More DevOps & Cloud