docker-compose
Skill47 starsChanged 4 months agoMITView on GitHub
Write, review, and modernize Docker Compose files against the current Compose Specification and the docker compose CLI. Use for authoring compose.yaml or docker-compose.yml, service dependency and healthcheck ordering, profiles, networks, volumes, secrets and configs, build contexts, migrating off V1 and the obsolete version key, or containers that fail to start, restart-loop, report unhealthy, or lose data between runs.
- Reads credentials
9 other projects use a version of this.
Adopted by
Most recently taken up by
- rafaelob/pragmatic-agent-skillstheir own version, first seen Nov 1, 2026
- jholhewres/devclaw-skillstheir own version, first seen Oct 9, 2026
- magnus919/agent-skillstheir own version, first seen Jul 21, 2026
- kimtth/agent-skill-100-lines-or-lesstheir own version, first seen Jun 26, 2026
- aborroy/aiup-alfrescotheir own version, first seen Jun 22, 2026
- brpaz/agent-skillstheir own version, first seen May 17, 2026
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- magnus919/agent-skills★ 172same name
- rafaelob/pragmatic-agent-skills★ 24same name
- aborroy/aiup-alfresco★ 14same name
- jholhewres/devclaw-skills★ 4same name
- JohnJBoren/claude-skills-ecosystem★ 2same name
- kimtth/agent-skill-100-lines-or-less★ 2same name
- brpaz/agent-skills★ 1same name
- harrissohail6/claude-code-config★ 1same name
- nbsp1221/agent-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. 0 are common, 6 are distinctive, and 8 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 15
Not a Kubernetes or Swarm skill.
- Very specific: line 26
Use docker compose, not the old standalone docker-compose command, unless supporting a pinned legacy environment.
- Very specific: line 27
Default file names are compose.yaml (preferred) and compose.yml.
- Distinctive: line 39
Read the existing Compose file in full before editing.
- Very specific: line 41
Read the CLI version from docker compose version, and confirm it is not the standalone V1 binary.
- Very specific: line 52
Start with services: and no version: field.
- Distinctive: line 53
Add only the networks, volumes, secrets, configs, profiles, and build settings the workflow actually needs.
- Very specific: line 55
Use healthchecks plus long-form depends_on with condition: service_healthy when startup order matters.
- Distinctive: line 59
Keep internal databases on a backend network with no host port published.
- Distinctive: line 60
Check the CLI version before using a recently added key.
- Very specific: line 70
Use profiles for optional services such as observability, admin tools, or one-off jobs.
- Very specific: line 72
Use postgres:18-alpine and redis:8-alpine for current examples unless project requirements say otherwise.
- Distinctive: line 94
Keep secrets out of committed YAML and never echo secret values into output or logs.
- Very specific: line 101
Run docker compose config to confirm the file parses and to inspect the rendered result, including variable interpolation.
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Docker Compose Expert
Scope
Writing, reviewing, and modernizing Compose files using the current Compose
Specification and the docker compose CLI, plus local multi-container
workflows.
Not a Kubernetes or Swarm skill. When a user needs production orchestration, say so rather than stretching Compose to fit.
Current Facts
Release guidance checked on 2026-11-03. Recheck the linked sources before selecting versions for a new deployment; preserve existing project pins.
- Current CLI release: Compose v5.7.0, published November 2, 2026. Existing installations may still run v2; inspect the binary before using newer features. CLI major versions are separate from obsolete Compose file-format versions.
- The top-level
versionproperty is obsolete. Compose keeps it only for backward compatibility and warns when it is used. - Compose validates against the most recent schema regardless of
version. - Use
docker compose, not the old standalonedocker-composecommand, unless supporting a pinned legacy environment. V1 reached end of life in June 2023. - Default file names are
compose.yaml(preferred) andcompose.yml;docker-compose.yamlanddocker-compose.ymlremain supported. Compose preferscompose.yamlwhen both exist. - Common top-level keys include
name,include,services,models,networks,volumes,secrets, andconfigs; validate newer keys against the installed CLI. - Recent additions gated on a CLI version: service-level
pre_startfor native init containers needs v5.3.0 (July 2026);build.no_cache_filteranddocker compose start --waitneed v5.0.0. None of these are available on Compose v2. - Jobs: v5.6 introduced partial support for manually triggered jobs. Do not assume scheduled-job support from the existence of the
jobsmodel; check the target CLI and Engine capabilities. restartacceptsno,always,on-failure[:max-retries], andunless-stopped, with no version gate on any of them. Theon-failureretry limit is long-standing; its spec wording was clarified in February 2026, which is not the same as being new.- Compose v5.0.0 removed the internal BuildKit builder and delegates builds to Docker Bake, the same path as
docker build. postgres:18-alpineandredis:8-alpineremain available example tags. These floating tags are not production pins or permission to upgrade existing database storage.
Inspect First
Establish before recommending or changing anything:
- Read the existing Compose file in full before editing. Preserve service names, networks, and volumes the user already depends on.
- Read the CLI version from
docker compose version, and confirm it is not the standalone V1 binary. The version gates which keys are available:pre_startneeds v5.3.0 or newer. - Identify which services hold persistent state and which ports are currently published to the host.
- For startup failures, read
docker compose psand the actual container logs before changing configuration. Most restart loops are an application error, not a Compose error.
Authoring Rules
- Start with
services:and noversion:field. - Add only the networks, volumes, secrets, configs, profiles, and build settings the workflow actually needs.
- Use healthchecks plus long-form
depends_onwithcondition: service_healthywhen startup order matters. Plaindepends_onwaits for the container to start, not for the service to be ready. - Bind sensitive ports to
127.0.0.1unless external access is required. - Keep internal databases on a backend network with no host port published.
- Check the CLI version before using a recently added key. A v5-only key may be rejected or ignored by older tooling; successful YAML parsing alone does not prove the requested behavior is supported.
- For migrations, permission fixes, and other init work on Compose v5.3.0 or
newer, use service-level
pre_start. Each step runs in an ephemeral container before the service starts, in declared order, and a non-zero exit fails the service and its dependents. This differs frompost_startandpre_stop, which run inside the running service container. - On Compose v2,
pre_startdoes not exist. Use a one-shot init service plusdepends_on: {init: {condition: service_completed_successfully}}instead. - Use
profilesfor optional services such as observability, admin tools, or one-off jobs. - Use
postgres:18-alpineandredis:8-alpinefor current examples unless project requirements say otherwise.
Review Checklist
- No top-level
version:. services:is plural and at the root.- Service names are stable and lowercase.
- Images are pinned for production; avoid
latestexcept in disposable examples. - Secrets are not embedded in YAML; use env vars,
.env, secret files, or platform secrets. - Persistent database state uses named volumes.
- Development bind mounts are explicit and use
:rowhen possible. - Healthchecks use commands available inside the image.
- Resource limits are explicit where runaway memory/CPU use is risky.
Safety
docker compose down -vdeletes named volumes and everything in them. Never offer it as a generic reset without stating that database contents will be destroyed, and confirm first.- A bare
5432:5432publishes the database on every host interface. Use127.0.0.1:5432:5432unless remote access is genuinely required. - Keep secrets out of committed YAML and never echo secret values into output or logs.
- Renaming a named volume silently orphans the old data rather than migrating it. Confirm before changing volume definitions on a running stack.
Verify
- Run
docker compose configto confirm the file parses and to inspect the rendered result, including variable interpolation. - Bring the stack up and confirm
docker compose psreports the expected services as healthy, not merely running. - Confirm each healthcheck command exists inside its image. A healthcheck
calling
curlin an image without curl reports unhealthy forever. - For stateful services, confirm data survives
docker compose downfollowed bydocker compose up. - Report which services you started, their health status, and anything you could not test.
Update Checklist
- Recheck Docker Compose docs for newly added keys before recommending them, for example
develop,pre_start, or the service-levelnetworks.<name>.interface_name. - Recheck upstream image tags before refreshing examples.
Sources
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

