
Promql Validator
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-codeInstalls into .claude/skills of the current project.
Files
How This Skill Works
This skill performs multi-level validation and provides interactive query planning:
- Syntax Validation: Checks for syntactically correct PromQL expressions
- Semantic Validation: Ensures queries make logical sense (e.g., rate() on counters, not gauges)
- Anti-Pattern Detection: Identifies common mistakes and inefficient patterns
- Optimization Suggestions: Recommends performance improvements
- Query Explanation: Translates PromQL to plain English
- 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- Fluentbit Generator640
- Logql Generator640
- Fluentbit Validator637
- Loki Config Generator622
- Ansible Validator1.6K
- Terragrunt Generator1.2K
- Ansible Generator907
- K8s Debug887
- Jenkinsfile Generator862
- Dockerfile Validator786
- Dockerfile Generator741
- Bash Script Validator734
- Gitlab Ci Validator725
- K8s Yaml Validator715
- Helm Validator712
- Bash Script Generator710
- Jenkinsfile Validator706
- Terragrunt Validator703
- K8s Yaml Generator694
- Azure Pipelines Generator692
- Github Actions Validator686
- Gitlab Ci Generator686
- Github Actions Generator684
- Terraform Validator681