ansible-generator
Generate, create, or scaffold Ansible playbooks, roles, tasks, handlers, inventory, vars.
Validate, lint, audit, or scan a Dockerfile for security and best practices.
$ npx -y skills add akin-ozer/cc-devops-skills --skill dockerfile-validator --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/dockerfile-validatorContext preview
The summary Claude sees to decide when to auto-load this skill.
Validate, lint, audit, or scan a Dockerfile for security and best practices.
name: dockerfile-validator description: Validate, lint, audit, or scan a Dockerfile for security and best practices.
Validate Dockerfiles with deterministic stages, clear severity reporting, and explicit fallbacks when tools or network access are constrained.
Use this skill when the user asks for tasks like:
Use this skill for:
Do not use this skill for:
Run these steps in order. Do not skip steps unless a documented fallback branch applies.
Assume repo root as working directory:
cd /path/to/repo SKILL_DIR="devops-skills-plugin/skills/dockerfile-validator" TARGET_DOCKERFILE="Dockerfile" # replace when user provides a path
Validate inputs before running tools:
test -f "$SKILL_DIR/scripts/dockerfile-validate.sh" test -f "$TARGET_DOCKERFILE"
If either check fails, stop and report the exact missing path.
Use explicit file-read commands (not abstract "Read tool" wording):
sed -n '1,220p' "$TARGET_DOCKERFILE"
If needed for long files:
sed -n '220,440p' "$TARGET_DOCKERFILE"
Primary command:
bash "$SKILL_DIR/scripts/dockerfile-validate.sh" "$TARGET_DOCKERFILE"
Optional captured run for structured reporting:
bash "$SKILL_DIR/scripts/dockerfile-validate.sh" "$TARGET_DOCKERFILE" | tee /tmp/dockerfile-validator.out
Use this standard severity model:
If validation has no actionable findings:
Use fast path when all are true:
Only read references that match actual findings. Read each required file once.
Issue-to-reference mapping:
| Issue category | Trigger examples | Read this file | |---|---|---| | Secrets, root user, exposed sensitive ports, hardening gaps | `CKV_DOCKER_*`, hardcoded token/password, root runtime | `references/security_checklist.md` | | Image size, layer count, multi-stage opportunities, cache efficiency, `.dockerignore` gaps | too many `RUN`, single-stage with build deps, cache misses | `references/optimization_guide.md` | | Tag pinning, instruction usage, COPY vs ADD, WORKDIR/CMD/ENTRYPOINT conventions | `:latest`, unpinned packages, instruction-level best practices | `references/docker_best_practices.md` |
Explicit read commands:
sed -n '1,220p' "$SKILL_DIR/references/security_checklist.md" sed -n '1,220p' "$SKILL_DIR/references/optimization_guide.md" sed -n '1,220p' "$SKILL_DIR/references/docker_best_practices.md"
For targeted extraction:
rg -n "USER|secrets|EXPOSE|HEALTHCHECK" "$SKILL_DIR/references/security_checklist.md" rg -n "multi-stage|cache|layer|dockerignore" "$SKILL_DIR/references/optimization_guide.md" rg -n "FROM|COPY|ADD|WORKDIR|CMD|ENTRYPOINT|latest" "$SKILL_DIR/references/docker_best_practices.md"
Use this template for every non-fast-path run:
## Dockerfile Validation Report - Target: <path> - Command: `bash <skill-script> <target>` - Overall result: PASS | FAIL | PARTIAL (fallback) ### Critical - <issue or `None`> ### High - <issue or `None`> ### Medium - <issue or `None`> ### Low - <issue or `None`> ### Recommended Fixes - <specific code-level fix per actionable issue> ### References Used - <list only files actually read> ### Fallbacks Used - `None` or exact fallback branch + reason
After reporting:
When the primary script cannot complete, use deterministic fallback branches and report them.
Condition:
Action: 1. Report primary failure and why. 2. Run manual minimum checks:
# Basic syntax signal (if Docker is available) DOCKERFILE_DIR="$(dirname "$TARGET_DOCKERFILE")" docker build --no-cache -f "$TARGET_DOCKERFILE" "$DOCKERFILE_DIR" # High-value static checks grep -nEi "^[[:space:]]*FROM[[:space:]]+.*:latest" "$TARGET_DOCKERFILE" || true grep -nEi "^[[:space:]]*(ENV|ARG)[[:space:]].*(password|secret|token
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.