Docker Development
Docker Development is an opinionated skill that optimizes Dockerfiles, generates docker-compose configurations, and audits container security. It produces smaller, faster, and more secure production-grade containers through multi-stage builds, layer caching, and best practices.
✨ What it does
- Analyzes Dockerfiles for anti-patterns, layer count, and base image issues.
- Generates optimized Dockerfiles with multi-stage builds and inline comments.
- Creates docker-compose files with healthchecks, networks, volumes, and resource limits.
- Audits Dockerfile and runtime security, flagging issues like running as root or secrets in ENV.
- Provides CLI tools (dockerfile_analyzer.py, compose_validator.py) for static analysis and validation.
- Includes proactive triggers to flag common mistakes like using :latest or missing .dockerignore.
🎯 When to use it
- When the user wants to optimize an existing Dockerfile for size, speed, or layer caching.
- When the user needs to create or improve a docker-compose.yml with healthchecks, networks, and volumes.
- When the user asks to audit a Dockerfile or running container for security issues.
- When the user wants to implement multi-stage builds or reduce Docker image size.
- When the user requests Docker best practices for a specific language or framework.
🚀 How to use
Trigger: /app
Trigger the skill with slash commands like /docker:optimize, /docker:compose, or /docker:security, or by asking for Dockerfile optimization, compose configuration, or security audit. Provide the Dockerfile or project context. Example prompts:
Optimize this Dockerfile for my Node.js app.
Create a docker-compose.yml for a web app with PostgreSQL and Redis.
Audit my Dockerfile for security issues.
📄 Output: Optimized Dockerfiles, docker-compose.yml files, security audit reports, and validation results.
📦 Add this skill to Claude Code
# 1. Get the skills repo
git clone --depth 1 https://github.com/alirezarezvani/claude-skills /tmp/claude-skills
# 2. Copy this skill into your project (or ~/.claude/skills for all projects)
mkdir -p .claude/skills
cp -r /tmp/claude-skills/engineering/docker-development/skills/docker-development .claude/skills/docker-developmentSkill source: engineering/docker-development/skills/docker-development/SKILL.md
❓ FAQ
What does the /docker:optimize command do?
It analyzes your Dockerfile and applies optimizations like using specific base image tags, combining RUN commands, ordering layers for cache efficiency, and implementing multi-stage builds to reduce image size.
How does the skill handle secrets in Dockerfiles?
It flags secrets in ENV or ARG as critical and recommends using BuildKit secret mounts (--mount=type=secret) to avoid baking secrets into image layers.
Does the skill provide tools for validation?
Yes, it includes scripts/dockerfile_analyzer.py and scripts/compose_validator.py for static analysis and validation of Dockerfiles and compose files, with options for JSON output and security focus.
🤖 Overview, features, install steps and FAQ were generated from the project's SKILL.md on Sep 4, 2026. Always check the original source before running commands.