Skip to main content
Independent directory. Not affiliated with Anthropic. Disclaimer

Docker Compose Builder

DevOps › Containers

Generates production-ready docker-compose.yml files from your tech stack description. Includes health checks, volume mounts, environment variable templating, networking, and service dependencies — with explanations for each choice.

2,200+ installs
4.7 rating
By community
MIT License
DockerDevOpsContainersInfrastructure

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

bash
npx skills add user/docker-composer

The 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:

prompt
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:

yaml
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:

prompt
# 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.