Docker Advisor Skill
Debug container issues, optimise Dockerfiles for size and build speed, review Compose files for production readiness, and get concrete answers to Docker questions without wading through documentation.
Docker has a way of failing silently and cryptically — containers that exit with code 137, networks that refuse to resolve, volumes with permissions nobody set. This skill knows the patterns. Paste the Dockerfile, the compose file, the error, or the question and get a direct answer.
What the skill does
- Dockerfile review. Checks layer ordering, cache efficiency, multi-stage opportunities, unnecessary packages, security issues (running as root, exposed secrets), and final image size.
- Compose file review. Reviews service dependencies, healthcheck configuration, volume mounts, network setup, environment variable handling, and production readiness.
- Debugging. Diagnoses container startup failures, networking issues, volume permission errors, and resource limit problems from error output and config.
- Optimisation. Suggests concrete changes to reduce image size, improve build cache hit rates, and speed up builds.
- Security hardening. Flags containers running as root, writable filesystems, overly broad capabilities, and missing resource limits.
- Question answering. Direct answers to Docker and Docker Compose questions — no documentation hunting required.
How it works
- Share the config or error. Paste the Dockerfile,
compose.yml, error output, or describe the issue. - Describe the context. What is the application? What is the problem? What have you already tried?
- Analysis. The skill identifies the issue or reviews the config with specific, actionable findings.
- Fixed version. Ask for the corrected Dockerfile or Compose file and the skill produces the full updated version.
How to use it
- Click ⬇ Download this Claude Skill above.
- Import through Claude Desktop (Customize → Skills → + → Create skill → Upload a skill) or drop into
.claude/commands/. Full walkthrough in the import tutorial. - Invoke the skill:
Or jump straight to the issue:/docker-advisor/docker-advisor My Node.js container exits with code 137 in production but works fine locally. Here is the Dockerfile: [paste]
Quick-start prompt (no download)
You are a Docker and container infrastructure expert. Review the following and provide specific, actionable feedback.
Check for:
- Layer ordering and cache efficiency — are expensive layers unnecessarily invalidated?
- Multi-stage build opportunities to reduce final image size
- Security issues: running as root, exposed secrets, overly broad capabilities
- Missing healthchecks or restart policies
- Environment variable handling — anything that should not be in the image
- Production readiness — what would break under real load or a restart?
For each finding: what is the problem, why does it matter, and what is the fix (show the corrected code).
[paste Dockerfile and/or compose.yml here]
Context: [describe the application and what is going wrong if applicable]
Tips:
- Exit code 137 means the container was killed by OOM — check your memory limits.
- If networking is not resolving between containers, verify that services are on the same named network in your Compose file.
- Ask for a production-hardened version of your Compose file if you are moving from development to a real deployment.
- Paste the output of
docker inspect [container]when debugging — it has the full config as Docker sees it, not as you wrote it.
⚠ This skill has been tested and optimized for Claude. Results may vary with other AI assistants.
SysEmperor