Logql Generator
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
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, andunwrapwith 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 -yInstalls 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- Fluentbit Generator679
- Fluentbit Validator676
- Loki Config Generator662
- Ansible Validator1.9K
- Terragrunt Generator1.3K
- Ansible Generator976
- K8s Debug958
- Jenkinsfile Generator914
- Dockerfile Validator834
- Bash Script Validator788
- Dockerfile Generator785
- Gitlab Ci Validator771
- K8s Yaml Validator765
- Helm Validator762
- Bash Script Generator754
- Jenkinsfile Validator752
- Terragrunt Validator747
- K8s Yaml Generator737
- Github Actions Validator734
- Azure Pipelines Generator733
- Gitlab Ci Generator728
- Github Actions Generator727
- Terraform Generator726
- Azure Pipelines Validator723
Similar to Logql Generator
More DevOps & Cloudpromql-generatorSkillakin-ozer/cc-devops-skills696 installsInteractive PromQL query generator that plans with the user before writing expressions, alerts, or dashboards.
loki-config-generatorSkillakin-ozer/cc-devops-skills662 installsGenerate production-ready Grafana Loki server configurations across monolithic, simple-scalable, and microservices modes.
lokiSkillgrafana/skills9K installsLog query language and aggregation system that indexes labels only, not full log text, for cheaper searching.
prometheusSkillgrafana/skills5.8K installsQuick-reference guide to PromQL selectors, rates, aggregations, and alerting for Prometheus and Grafana Cloud Metrics.
elastic-kibanaPluginelastic/agent-skills613 starsKibana skills — dashboards, alerting rules, connectors, Vega visualizations, Agent Builder, streams, and audit logging
log-aggregationSkillaj-geddes/useful-ai-prompts455 installsCentralized logging guide covering ELK Stack, Loki, and Splunk for collection, parsing, storage, and analysis.