This validates PromQL queries with a structured workflow that checks syntax, detects anti-patterns like using rate() on gauges or missing label filters on high-cardinality queries, and explains what your query actually does in plain English. The interactive planning is smart: it stops after initial validation to ask clarifying questions about your monitoring goals before suggesting optimizations, so you don't get generic advice that misses your intent. It cites specific lines from included examples when recommending fixes, which is more useful than vague best practice reminders. If you write a lot of Prometheus queries or review alerting rules, the semantic validation catches mistakes that are syntactically valid but operationally wrong.

skills.sh installs
646
GitHub stars
337
last updated
Aug 21, 2026

Install

$ npx -y skills add akin-ozer/cc-devops-skills --skill promql-validator --agent claude-code

Installs into .claude/skills of the current project.

Files

How This Skill Works

This skill performs multi-level validation and provides interactive query planning:

  1. Syntax Validation: Checks for syntactically correct PromQL expressions
  2. Semantic Validation: Ensures queries make logical sense (e.g., rate() on counters, not gauges)
  3. Anti-Pattern Detection: Identifies common mistakes and inefficient patterns
  4. Optimization Suggestions: Recommends performance improvements
  5. Query Explanation: Translates PromQL to plain English
  6. Interactive Planning: Helps users clarify intent and refine queries

Workflow

When a user provides a PromQL query, follow this workflow:

Working Directory Requirement

Run validation commands from the repository root so relative paths resolve correctly:

cd "$(git rev-parse --show-toplevel)"

If running from another location, use absolute paths to scripts/ files.

Step 1: Validate Syntax

Run the syntax validation script to check for basic correctness:

python3 devops-skills-plugin/skills/promql-validator/scripts/validate_syntax.py "<query>"

Sponsors

Details

Repository
github.com/akin-ozer/cc-devops-skills
Categories
DevOps & CI/CD, Code Review & Quality, Debugging
First seen
Jun 3, 2026

More from akin-ozer/cc-devops-skills

All 31
1akin-ozer avatarfluentbit-generatorakin-ozer/cc-devops-skillsGenerate/create Fluent Bit configs — INPUT, FILTER, OUTPUT, parsers, log pipeline.640skills.sh installs
2akin-ozer avatarlogql-generatorakin-ozer/cc-devops-skillsGenerate LogQL queries, log stream selectors, metric queries, and alerting rules for Grafana Loki.640skills.sh installs
3akin-ozer avatardockerfile-generatorakin-ozer/cc-devops-skillsCreate, generate, or write Dockerfiles and multi-stage Docker images. Containerize apps.741skills.sh installs
4akin-ozer avatarhelm-validatorakin-ozer/cc-devops-skillsValidate, lint, audit, check Helm charts — Chart.yaml, templates, values.yaml, CRDs, schemas.712skills.sh installs
5akin-ozer avatarjenkinsfile-validatorakin-ozer/cc-devops-skillsValidate, lint, audit, or check Jenkinsfiles and shared libraries.706skills.sh installs
6akin-ozer avatarazure-pipelines-generatorakin-ozer/cc-devops-skillsGenerate/create/scaffold azure-pipelines.yml, stages, jobs, steps, or reusable templates.692skills.sh installs