What it does
Docker Compose Builder takes a plain-English description of your stack (e.g. "Node.js API, PostgreSQL, Redis cache, Nginx reverse proxy") and outputs a complete, annotated docker-compose.yml. Services are configured with proper health checks, restart policies, named volumes, and environment variable references — nothing is hardcoded. Networking is set up so services can communicate by hostname without exposing unnecessary ports to the host.
The skill also generates a companion .env.example file with every required variable documented, and a short README snippet explaining how to bring the stack up locally and in CI. It follows Docker Compose v3 syntax and is compatible with Docker Desktop, Docker Engine, and CI/CD runners including GitHub Actions and GitLab CI.
How to install
npx skills add user/docker-composerThe skill is stored in your project's .claude/skills/ directory and can be committed to your repo so the whole team has access.
How to use
Describe your stack in plain English and ask Claude to generate the compose file:
Generate a docker-compose.yml for: Node.js API on port 3000, PostgreSQL 16, Redis 7 cache, Nginx reverse proxy
A typical output looks like this:
services: api: build: . depends_on: db: condition: service_healthy environment: DATABASE_URL: postgres://$$DB_USER:$$DB_PASS@db:5432/$$DB_NAME db: image: postgres:16 healthcheck: test: ["CMD", "pg_isready"] volumes: - pgdata:/var/lib/postgresql/data redis: image: redis:7-alpine restart: unless-stopped
Configuration
Customise the output with follow-up prompts:
# Add Redis Sentinel for high availability Add a Redis Sentinel cluster to this compose file # Create separate staging/production overrides Generate docker-compose.override.yml for local development # Add Traefik as reverse proxy with SSL Replace Nginx with Traefik and add Let's Encrypt SSL
Tip: Commit your docker-compose.yml alongside a .env.example to the repo. New team members can run docker compose up in under a minute without any manual setup.
Related skills
Pair Docker Compose Builder with CI Pipeline Builder to wire up container builds into your CI/CD workflow. Use Security Code Scanner to audit your compose file for exposed ports and hardcoded secrets before deployment.