ansible-generator
Generate, create, or scaffold Ansible playbooks, roles, tasks, handlers, inventory, vars.
Validate, lint, audit, or fix PromQL queries and alerting rules; detects anti-patterns.
$ npx -y skills add akin-ozer/cc-devops-skills --skill promql-validator --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/promql-validatorContext preview
The summary Claude sees to decide when to auto-load this skill.
Validate, lint, audit, or fix PromQL queries and alerting rules; detects anti-patterns.
name: promql-validator description: Validate, lint, audit, or fix PromQL queries and alerting rules; detects anti-patterns.
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
When a user provides a PromQL query, follow this workflow:
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.
Run the syntax validation script to check for basic correctness:
python3 devops-skills-plugin/skills/promql-validator/scripts/validate_syntax.py "<query>"
Output parsing notes:
The script will check for:
Run the best practices checker to detect anti-patterns and optimization opportunities:
python3 devops-skills-plugin/skills/promql-validator/scripts/check_best_practices.py "<query>"
Output parsing notes:
The script will identify:
Parse and explain what the query does in plain English:
**Required Output Details** (always include these explicitly):
**Output Labels**: [list labels that will be in the result, or "None (fully aggregated to scalar)"] **Expected Result Structure**: [instant vector / range vector / scalar] with [N series / single value]
Example:
**Output Labels**: job, instance **Expected Result Structure**: Instant vector with one series per job/instance combination
When citing examples/docs in recommendations, include file path + 1-based line numbers:
examples/good_queries.promql:42 docs/best_practices.md:88
Rules:
Ask the user clarifying questions to verify the query matches their intent:
1. **Understand the Goal**: "What are you trying to monitor or measure?"
2. **Verify Metric Type**: "Is this a counter (always increasing), gauge (can go up/down), histogram, or summary?"
3. **Clarify Time Range**: "What time window do you need?"
4. **Confirm Aggregation**: "Do you need to aggregate data across labels? If so, which labels?"
5. **Check Output Intent**: "Are you using this for alerting, dashboarding, or ad-hoc analysis?"
> **IMPORTANT: Two-Phase Dialogue** > > After presenting Steps 1-4 results (Syntax, Best Practices, Query Explanation, and Intent Questions): > > **⏸️ STOP HERE AND WAIT FOR USER RESPONSE** > > Do NOT proceed to Steps 5-7 until the user answers the clarifying questions. > This ensures the subsequent recommendations are tailored to the user's actual intent.
**Only proceed to this step after the user has answered the clarifying questions from Step 4.**
After understanding the user's intent:
When relevant, mention known limitations:
Based on validation results:
A practical skill pack for DevOps work in Claude Code and Codex desktop. This repository ships 31 skills: 16 generators for scaffolding production-ready configs 14 validators for linting, security checks, and dry-run validation 1 debugger (k8s-debug) for
Repo: akin-ozer/cc-devops-skills
Generate, create, or scaffold Ansible playbooks, roles, tasks, handlers, inventory, vars.
Validate, lint, audit, or debug Ansible playbooks, roles, inventories, FQCN, tasks.
Generate/create/scaffold azure-pipelines.yml, stages, jobs, steps, or reusable templates.
Validate, lint, audit, or review azure-pipelines.yml — syntax, security, best practices.
Create, generate, write, or scaffold bash/shell scripts (.sh), automation, or CLI tools.
Validate, lint, audit, or fix bash/shell/.sh scripts via ShellCheck.