A Claude Code custom skill that generates production-ready docker-compose.yml files for any application stack.
- Auto-detects your tech stack from project files (package.json, requirements.txt, go.mod, etc.)
- Generates complete
docker-compose.ymlwith health checks, networks, volumes, and restart policies - Creates
.env.examplewith all referenced variables and sensible defaults - Optionally generates a
Dockerfilewith multi-stage builds and non-root users - Supports 20+ common services out of the box
| Category | Services |
|---|---|
| Databases | PostgreSQL, MySQL, MariaDB, MongoDB |
| Caches | Redis, Memcached, KeyDB |
| Search | Elasticsearch, OpenSearch, Meilisearch |
| Message Brokers | RabbitMQ, Kafka (KRaft), NATS |
| Reverse Proxies | Nginx, Traefik, Caddy |
| Object Storage | MinIO |
| Monitoring | Prometheus, Grafana, Jaeger |
| Auth | Keycloak |
| Mail (Dev) | Mailpit |
Copy the skill directory into your project:
# From this repository
cp -r .claude/skills/docker-compose /path/to/your/project/.claude/skills/mkdir -p ~/.claude/skills
cp -r .claude/skills/docker-compose ~/.claude/skills/Invoke the skill with a description of your stack:
/docker-compose Node.js Express API with PostgreSQL, Redis, and Nginx
/docker-compose Python Django app with MySQL, Celery, and RabbitMQ
/docker-compose Go microservice with MongoDB and NATS
/docker-compose Full monitoring stack with Prometheus and Grafana
Or invoke without arguments to auto-detect from your project files:
/docker-compose
-
docker-compose.yml— Complete service definitions with:- Pinned image versions (never
latest) - Health checks on all services
depends_onwithcondition: service_healthy- Named volumes for persistence
- Custom bridge network
- Commented-out resource limits
restart: unless-stopped
- Pinned image versions (never
-
.env.example— All environment variables with:- Descriptive comments
- Sensible defaults for non-sensitive values
- Placeholders for secrets
-
Dockerfile(if none exists) — Multi-stage build with:- Specific base image versions
- Non-root user
- Optimized layer caching
cp .env.example .env # Copy and edit with your values
docker compose up -d # Start all services
docker compose logs -f # Follow logs
docker compose down # Stop all servicesMIT