docker-compose

docker-compose is a skill for Claude Code, Codex from magnus919/agent-skills. It costs 61 tokens per session (1,696 once invoked), scanned A, original, MIT.

A guide for Docker Compose, a tool that defines and runs applications made of multiple containers. Containers package software and its dependencies into isolated, repeatable environments.

In plain words
What is it for?
Use it to design compose.yaml files, configure networks, volumes, secrets, profiles, and overrides, operate services, and troubleshoot runtime problems.
Why use it?
It helps developers model services, check configuration, run containers, inspect their state, and diagnose failures safely.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to design compose.yaml files, configure networks, volumes, secrets, profiles, and overrides, operate services, and troubleshoot runtime problems.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/magnus919/agent-skills/docker-compose
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add magnus919/agent-skills --skill docker-compose
Clone the repo
git clone --depth 1 https://github.com/magnus919/agent-skills

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin docker-compose/plugin install docker-compose after adding the marketplace above.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for docker-compose

README.md
[![agentmods](https://agentmods.dev/badge/skills/magnus919/agent-skills/docker-compose.svg)](https://agentmods.dev/skills/magnus919/agent-skills/docker-compose)
Your own site
<a href="https://agentmods.dev/skills/magnus919/agent-skills/docker-compose"><img src="https://agentmods.dev/badge/skills/magnus919/agent-skills/docker-compose.svg" alt="Measured on agentmods" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,696 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00061 $0.01696
Opus 5 $0.00030 $0.00848
Sonnet 5 $0.00012 $0.00339
Haiku 4.5 $0.00006 $0.00170

Measured 4d ago against content hash fb6a8eb75fe8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

docker-compose scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/compose-doctor.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docker-compose/SKILL.md · 122 lines

How it starts

The opening of the file, as written. The whole thing — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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:
    docker compose -f compose.yaml config --quiet
    docker compose -f compose.yaml config
    docker compose -f compose.yaml config --services
    
  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

  • depends_on controls creation order, not readiness. Use a real healthcheck plus condition: service_healthy; use service_completed_successfully 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.
  • Put credentials in Compose secrets or an external secret manager, not in images, Git, or ordinary environment variables. Grant each secret only to services that need it. Compose secrets are mounted at /run/secrets/<name>.
  • Use profiles for optional tools such as debugging, migrations, observability, or GPU workloads. Core services should have no profile.
  • Resolve interpolation explicitly. Shell variables override --env-file, which overrides the project .env; use ${REQUIRED:?explain} for mandatory values and $$ for a literal dollar sign. For example, write test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER}"] when the container shell, not Compose, must expand the variable. Check with docker compose config --environment.
  • In multi-file merges, later files are applied to the base. Relative paths resolve from the first/base file. Inspect the result with docker compose config; use !reset or !override when ordinary merge behavior is not what you want.
  • Compose Watch is for services built from local source. Use sync for hot-reloadable source, sync+restart for configuration, and rebuild for dependency or image changes. The container user must be able to write to the target path.
  • Treat deploy fields as implementation-dependent. Verify what the target Compose implementation enforces; the specification explicitly allows partial support.

Read the full file on GitHub · 122 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago Changed · +1 lines · +16 tokens per session fb6a8eb75fe8
  2. 8d ago First seen · 121 lines · 45 tokens per session scan A 70cd9ac12080

Subscribe to this mod's changes

docker-compose is a skill published in the GitHub repository magnus919/agent-skills (74 stars, last pushed today), licensed MIT. It adds 61 tokens to every session and 1,696 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

deployment-patterns

Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications.

deepelementlab/clawcode · 31 tokens

docker-patterns

Docker and Docker Compose patterns for local development, container security, networking, volume strategies, and multi-service orchestration.

deepelementlab/clawcode · 27 tokens

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens