ansible-generator
Generate, create, or scaffold Ansible playbooks, roles, tasks, handlers, inventory, vars.
Validate, lint, audit, or check Makefiles and .mk files for errors.
$ npx -y skills add akin-ozer/cc-devops-skills --skill makefile-validator --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/makefile-validatorContext preview
The summary Claude sees to decide when to auto-load this skill.
Validate, lint, audit, or check Makefiles and .mk files for errors.
name: makefile-validator description: Validate, lint, audit, or check Makefiles and .mk files for errors.
Use this skill to validate Makefiles with a local-first, deterministic flow.
Default validator entrypoint:
bash scripts/validate_makefile.sh <makefile-path>
Validation layers:
1. Dependency preflight (`python3`, `pip3`, `make`) 2. GNU make syntax check (`make -n --dry-run`) when `make` is available 3. `mbake validate` 4. `mbake format --check` 5. Custom security, best-practice, and optimization checks 6. Optional `checkmake` and `unmake` checks when installed
Use this skill when the request includes Makefile quality, linting, validation, hardening, or troubleshooting.
Run from this skill directory for shortest commands:
cd devops-skills-plugin/skills/makefile-validator
1. Confirm target file exists and is readable. 2. Confirm whether file edits are allowed (`writable`) or only suggestions can be returned (`read-only`). 3. Prefer the default validator path first; use fallbacks only when blocked by environment constraints.
# From skill directory bash scripts/validate_makefile.sh <makefile-path> # From repository root bash devops-skills-plugin/skills/makefile-validator/scripts/validate_makefile.sh <makefile-path>
Always record:
| Exit code | Meaning | Expected summary line | Action | | --- | --- | --- | --- | | `0` | no blocking findings | `Validation PASSED` | optional improvements only | | `1` | warning-only result | `Validation PASSED with warnings` | fix recommended; merge policy dependent | | `2` | error result | `Validation FAILED - errors must be fixed` | fix required, then rerun |
Open only the docs required by the current findings.
| Finding type | Reference doc | | --- | --- | | `.PHONY`, `.DELETE_ON_ERROR`, `.ONESHELL`, variable usage, performance structure | `docs/best-practices.md` | | tabs vs spaces, dependency mistakes, credential patterns, anti-patterns | `docs/common-mistakes.md` | | `mbake` behavior, formatter flags, known `mbake` caveats | `docs/bake-tool.md` |
After applying fixes, rerun:
bash scripts/validate_makefile.sh <makefile-path>
Loop rules:
1. Stop only when no new errors are introduced. 2. If warnings remain intentionally, document why they are accepted. 3. Always report the latest rerun exit code.
Use explicit file-open commands so paths are unambiguous.
From repository root:
sed -n '1,220p' devops-skills-plugin/skills/makefile-validator/docs/best-practices.md sed -n '1,220p' devops-skills-plugin/skills/makefile-validator/docs/common-mistakes.md sed -n '1,220p' devops-skills-plugin/skills/makefile-validator/docs/bake-tool.md rg -n "PHONY|DELETE_ON_ERROR|ONESHELL|tab|credential|mbake" devops-skills-plugin/skills/makefile-validator/docs/*.md
From `devops-skills-plugin/skills/makefile-validator`:
sed -n '1,220p' docs/best-practices.md sed -n '1,220p' docs/common-mistakes.md sed -n '1,220p' docs/bake-tool.md rg -n "PHONY|DELETE_ON_ERROR|ONESHELL|tab|credential|mbake" docs/*.md
If shell commands are unavailable, use the environment's file-open/read actions on the same paths.
Use these only when the default validator path cannot run fully.
| Constraint | Fallback action | Reporting requirement | | --- | --- | --- | | `python3` or `pip3` unavailable | Run limited checks (`make -f <file> -n --dry-run` if `make` exists, plus focused `grep` checks) | State that `mbake` stages were skipped and coverage is reduced | | `pip3 install mbake` fails (offline/proxy/index issue) | Keep syntax/custom checks that still work; defer formatter/linter stages | Report install failure and request rerun in a network-enabled environment | | `make` unavailable | Continue with non-syntax stages; script already downgrades syntax stage | Explicitly note syntax coverage was skipped | | `checkmake` or `unmake` unavailable | Continue; these are optional stages | Note optional lint/portability coverage not executed | | target file is read-only | Provide patch suggestions only | Mark response as advisory only | | command execution unavailable | Provide static review from file contents and docs | Mark result as non-executed analysis |
Minimal fallback commands:
# Syntax only (when make exists) make -f <makefile-path> -n --dry-run # Focused quick checks grep -n "^\\.DELETE_ON_ERROR:" <makefile-path> grep -n "^\\.PHONY:" <makefile-path> grep -nE "^( | | )[a-zA-Z@\\$\\(]" <makefile-path>
Errors: 0 Warnings: 0 Info: 2 ✓ Validation PASSED
Errors: 0 Warnings: 3 Info: 1 ⚠ Validation PASSED with warnings
Errors: 2 Warnings: 1 Info: 0 ⚠ Validation FAILED - errors must be fixed
1. Verify required tools:
command -v python3 pip3 make
2. Isolate GNU make syntax failures:
make -f <makefile-path> -n --dry-run
3. Check likely tab-indentation violations:
grep -nE "^( | | )[a-zA-Z@\\$\\(]" <makefile-path>
4
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.