Agent skill · magnus919
docker-compose
Use Docker Compose to define, run, debug, and harden multi-container applications. Load for compose.yaml design, networking, volumes, secrets, profiles, overrides, watch mode, lifecycle operations, or troubleshooting.
What it needs
About 4k tokens when loaded.
What this skill does
Docker Compose Use this skill for the whole Compose lifecycle: model the application, validate the resolved configuration, start or update services, inspect runtime state, and diagnose failures. Prefer the current Compose Specification. Do not add a top-level version key to new files: it is obsolete and does not select a schema. Operating loop 1. Discover the Compose file(s), project directory, env files, profiles, external resources, and whether the task is development, CI, staging, or production. 2. Model the application with services, named volumes for durable state, explicit networks for isolation, secrets for sensitive files, and profiles for optional services. 3. Resolve before running: 4. Operate with the narrowest command: up -d SERVICE, restart SERVICE, run --rm SERVICE COMMAND, or exec SERVICE COMMAND. Avoid down -v unless data deletion is intentional and confirmed. 5. Verify with ps, health status, logs, an in-container check, and the externally published endpoint where applicable. 6. Diagnose in order: resolved model → container state → logs → healthcheck → network membership/DNS → mounts/permissions → image/build architecture → host resources. Decision rules dependson controls creation order, not readiness. Use a real healthcheck plus condition: servicehealthy; use servicecompletedsuccessfully for migrations or jobs. Do not use sleep as readiness logic. Containers reach sibling services by service name and container port (db:5432), not host-published ports or container IPs. Use the default network for simple projects. Use separate networks to isolate tiers, internal: true for a network with no external gateway, and an explicitly named external: true network only when it is created outside the project. Use bind mounts for source/configuration during development, named volumes for state, and read-only mounts for immutable inputs. Treat host-path mounts as platform-sensitive. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills magnus919/docker-compose