Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Docker Compose Builder — Claude Code Skill

A Claude Code custom skill that generates production-ready docker-compose.yml files for any application stack.

Features

  • Auto-detects your tech stack from project files (package.json, requirements.txt, go.mod, etc.)
  • Generates complete docker-compose.yml with health checks, networks, volumes, and restart policies
  • Creates .env.example with all referenced variables and sensible defaults
  • Optionally generates a Dockerfile with multi-stage builds and non-root users
  • Supports 20+ common services out of the box

Supported Services

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

Installation

Project-level (recommended for teams)

Copy the skill directory into your project:

# From this repository
cp -r .claude/skills/docker-compose /path/to/your/project/.claude/skills/

Global (available in all projects)

mkdir -p ~/.claude/skills
cp -r .claude/skills/docker-compose ~/.claude/skills/

Usage

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

What Gets Generated

  1. docker-compose.yml — Complete service definitions with:

    • Pinned image versions (never latest)
    • Health checks on all services
    • depends_on with condition: service_healthy
    • Named volumes for persistence
    • Custom bridge network
    • Commented-out resource limits
    • restart: unless-stopped
  2. .env.example — All environment variables with:

    • Descriptive comments
    • Sensible defaults for non-sensitive values
    • Placeholders for secrets
  3. Dockerfile (if none exists) — Multi-stage build with:

    • Specific base image versions
    • Non-root user
    • Optimized layer caching

Quick Start After Generation

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 services

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors