skills/docker-compose/SKILL.md
Write and review Docker Compose files with consistent best practices and conventions (file naming, override strategy, service naming, key ordering, env handling, ports, and healthchecks). Use when creating or standardizing compose.yaml/docker-compose.yml.
npx skillsauth add nbsp1221/agent-skills docker-composeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Opinionated conventions for consistent, maintainable Docker Compose files.
compose.yaml (or compose.yml) as the canonical base file.compose.override.yaml (auto-merged by Compose).
.gitignore unless the team explicitly wants it committed (optionally keep a .example file).compose.<env>.yaml and combine with -f.version key (obsolete).container_name unless strictly required; it prevents scaling.latest); prefer digests for production..env for interpolation, env_file for container runtime values..env.example only.environment when values include special chars.environment overrides env_file (key order does not change behavior).HOST:CONTAINER port mappings to avoid YAML base-60 parsing issues../.depends_on for ordering; add healthcheck and condition: service_healthy for readiness-sensitive dependencies.profiles to gate optional services (e.g., debug, seed, admin) instead of maintaining separate files.depends_on targets must be in the same profile or always enabled; otherwise the model is invalid.name when you need stable project identifiers (network/volume names) across directories or CI.include/fragments to split large Compose files, but only if your Compose implementation supports them.x- extension fields plus YAML anchors/merge to share repeated blocks (env, volumes, labels) across services.secrets/configs at top level and explicitly grant access per service; top-level declaration alone is not enough.secrets/configs for sensitive or shared files when the platform supports them.deploy as platform-specific; some Compose implementations ignore it in local runs.deploy is required so users do not assume it applies everywhere.init: true for long-running services to handle PID 1 signal and zombie reaping correctly.name (optional)servicesnetworksvolumesconfigssecretsUse this exact order for keys within each service to keep the file consistent.
image / build, container_name, hostnamecommand, entrypoint, restartenv_file, environment, labelsports, expose, volumesdepends_on, networks, network_modehealthcheckdocker compose config before shipping changes.testing
Use when deciding whether to split a coding task into parallel exploration, bounded review fan-out, or single-writer delegated work instead of keeping it in one agent.
testing
Use when investigating a repository that is not already available locally and the user needs repository-specific understanding of its structure, implementation, maintenance, or relevant files.
testing
Use when a founder has a rough product idea and wants autonomous deep validation, market and competitor research, and an evidence-based MVP decision with minimal back-and-forth.
documentation
Detect the repo's commit convention (Conventional Commits, Gitmoji, or a custom template) and create commits. Use when asked to commit, write a commit message, stage and commit changes, or commit and push work.