skills/docker-doctor/SKILL.md
Verify Dockerfiles and Docker Compose manifests for security issues, reliability risks, optimization opportunities, syntax errors, and misconfiguration before builds or deploys. Run deterministic checks (`scripts/verify-docker.sh`, `docker compose config -q`, optional `hadolint`) and produce a 0-100 health score with prioritized fixes. Use when users ask to validate Dockerfile(s), docker-compose/compose YAML files, harden container configuration, optimize image/runtime setup, debug configuration failures, or run a pre-deploy Docker audit.
npx skillsauth add ragnarok22/agent-skills docker-doctorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Run a deterministic Docker configuration audit across Dockerfiles and Compose manifests.
Primary output is a scored report with tool-check status, categorized findings (security, reliability, optimization, maintainability, correctness), and prioritized remediation actions.
DockerfileDockerfile.**.Dockerfiledocker-compose.ymldocker-compose.yamlcompose.ymlcompose.yaml.git, node_modules, .venv, vendor, build artifacts, and generated files.If no Dockerfiles and no Compose files are found, stop and report Nothing to audit.
skills/docker-doctor/scripts/verify-docker.sh <root>docker compose config -qhadolint (if installed)docker compose up, docker run, or full image builds unless the user explicitly asks.Not Evaluated.From repository root, run:
skills/docker-doctor/scripts/verify-docker.sh .
The script emits:
SUMMARY lines for discovered files and finding countsCHECK lines for tool-backed validationsFINDING lines with severity, category, rule ID, location, issue, and fix hintIf the script cannot run, execute equivalent checks manually:
docker compose -f <compose-file> config -qhadolint <dockerfile> when availablerule_id + location.Start from 100 and deduct:
| Severity | Deduction per finding | | -------- | --------------------- | | Critical | -12 | | High | -8 | | Medium | -5 | | Low | -2 |
Rules:
0.Return a markdown report in this structure:
## Docker Doctor Report
**Health Score: XX / 100** [GRADE]
Grade thresholds: A (90-100), B (80-89), C (70-79), D (60-69), F (<60)
Audit root: `<path>`
Dockerfiles: <count>
Compose files: <count>
### Tool Checks
- verify-docker.sh: [PASS/FAIL + short summary]
- docker compose config -q: [PASS/FAIL/SKIPPED + short summary]
- hadolint: [PASS/FAIL/SKIPPED + short summary]
### Findings
#### Critical
| ID | Category | Location | Issue | Fix |
|----|----------|----------|-------|-----|
#### High
...
#### Medium
...
#### Low
...
### Not Evaluated
- [CHECK_OR_RULE_ID] Reason check was skipped or inconclusive.
### Summary
- Critical: X
- High: X
- Medium: X
- Low: X
- Security findings: X
- Reliability findings: X
- Optimization findings: X
- Maintainability findings: X
- Correctness findings: X
- **Top 3 actions to improve your score:**
1. ...
2. ...
3. ...
Omit empty severity sections. Always include Not Evaluated when any check is skipped.
If the user asks for remediation:
development
Create Git commit messages that conform to Conventional Commits 1.0.0, including type/scope/description format, optional body, trailer-style footers, and explicit BREAKING CHANGE signaling. Use when users ask to draft commit messages, commit current changes, rewrite a commit message into conventional format, or enforce conventional commit standards in a repo.
development
Optimize Django ORM performance by detecting N+1 query patterns, missing `select_related`/`prefetch_related`, and likely index gaps. Run targeted static scans, optional runtime query capture, and produce a prioritized remediation plan with expected query-count impact. Use when users ask to speed up Django endpoints, reduce database hits, investigate slow views/serializers, or audit QuerySet efficiency before release.
development
Audit Python codebases for security, performance, correctness, and architecture antipatterns. Run optional trusted runtime checks (syntax, tests, lint, typing) plus static rule scans, then output a 0-100 health score with actionable fixes. Use when users ask to inspect a Python project, run a Python health check, review backend code quality, or perform a pre-release audit.
development
Audit Django codebases for security, performance, correctness, and architecture antipatterns. Run system checks, migration drift checks, and static rule scans, then output a 0-100 health score with actionable fixes. Use when users ask to scan a Django backend, run a Django health check, review backend code quality, or perform a pre-deploy audit.