Agent skill

Docker Compose

by magnus919 in magnus919/agent-skills

Use Docker Compose to define, run, debug, and harden multi-container applications.

MITAuto-check: notesDevOps & Cloud

Install Docker Compose

skills CLI
$ npx skills add magnus919/agent-skills --skill docker-compose -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install magnus919/agent-skills docker-compose --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/magnus919/agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/docker-compose .claude/skills/docker-compose && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
docker-compose
GitHub stars
113
Token cost
~2k tokens
SKILL.md length
782 words
Files
19 (incl. scripts, references, assets)
Skills in repo
115
Repo updated
First seen
Licence
MIT

At a glance

Use Docker Compose to define, run, debug, and harden multi-container applications.

  • Works in 6 steps: Discover the Compose file(s), project… → Model the application with services,… → Resolve before running → …
  • Unrelated requests
  • SKILL.md covers Operating loop, Decision rules, Quick command card and High-value defaults, plus 4 more sections
  • Runs Shell scripts from its folder; calls docker

What it does

Docker Compose is an agent skill from magnus919/agent-skills. 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. Do not use this skill for unrelated requests; route to the nearest named specialist.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 23 other files, including scripts, reference files and assets (for example `README.md`, `assets/project-review-checklist.md` and `evals/evals.json`). Compatibility notes: Docker Compose v2 or another implementation of the Compose Specification; commands require Docker CLI.

It sits in DevOps & Cloud, covering Containers. It works with Docker. The repository describes itself as: Curated collection of AI agent skills for Hermes and other agent frameworks. The licence is MIT.

When your agent uses it

  • Unrelated requests
  • Route to the nearest named specialist

Example prompts

  • “/docker-compose”

Requirements

  • A Bash shell
  • Docker
  • Compatibility (from SKILL.md): Docker Compose v2 or another implementation of the Compose Specification; commands require Docker CLI.

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Discover the Compose file(s), project directory, env files, profiles, external resources, and whether the task is development, CI…
  2. Model the application with services, named volumes for durable state, explicit networks for isolation, secrets for sensitive files, and…
  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…
  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…

What it can do on your machine

Read from SKILL.md and the folder at commit 96fbe07. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Shell, from the files we listed), which the agent can run.

    Shell commands in SKILL.md call:

    • docker

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use docker, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Docker Compose v2 or another implementation of the Compose Specification; commands require Docker CLI.

    From compatibility in the SKILL.md frontmatter.

Context cost

Docker Compose loads about 2k tokens when it runs, and up to ~6.2k if it reads all its reference files. Until then it costs about 79 tokens; SKILL.md has 782 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~79
When it runs · the whole SKILL.md, loaded when a task matches
~2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:41
    -env-file`, which overrides the project `.env`; use `${REQUIRED:?explain}` for mandatory values and `$$` for a literal d
  • NoteMentions a .env fileSKILL.md:100
    | `.env`, interpolation, profiles, or overrides | `references/04-configuration-and-overrides.md` |

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from magnus919/agent-skills at commit 96fbe07, republished under its MIT licence (© magnus919). 782 words, ~2,006 tokens.

Download SKILL.mdSave it as .claude/skills/docker-compose/SKILL.md (or your agent's skills folder). This skill also uses 18 other files; get the full folder from GitHub.
name
docker-compose
description
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. Do not use this skill for unrelated requests; route to the nearest named specialist.
compatibility
Docker Compose v2 or another implementation of the Compose Specification; commands require Docker CLI.
license
MIT
metadata.source
https://docs.docker.com/compose/
metadata.spec
https://github.com/compose-spec/compose-spec

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:
    bash
    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.

Quick command card

bash
docker compose version
docker compose config --quiet
docker compose up -d --build
docker compose ps
docker compose logs -f --tail=100 SERVICE
docker compose exec SERVICE COMMAND
docker compose run --rm SERVICE COMMAND
docker compose restart SERVICE
docker compose stop
docker compose down                    # preserves named volumes
docker compose down --remove-orphans
docker compose pull && docker compose up -d
docker compose --profile debug up -d
docker compose up --watch
docker compose port SERVICE CONTAINER_PORT
docker network inspect PROJECT_default
docker volume inspect PROJECT_VOLUME
Show full SKILL.md (319 more words)Show less

High-value defaults

  • When compose.override.yaml exists beside compose.yaml and no -f files are supplied, Compose loads the override automatically; use explicit -f files for production combinations.
  • Destructive CI gate: never run down --volumes until docker compose -p ci-${CI_JOB_ID:?CI_JOB_ID is required} config --services confirms the isolated project name; on shared environments, omit --volumes unless the exact data scope is intentional.
  • Treat deploy resource and placement fields as target-dependent: a rendered field can be valid while the local implementation ignores it. Verify enforcement at runtime.
Base/dev/prod command matrix
bash
# Base or default development override
docker compose config --quiet
docker compose up --watch

# Explicit production model
IMAGE_TAG=release-1 docker compose -f compose.yaml -f compose.prod.yaml config --quiet
IMAGE_TAG=release-1 docker compose -f compose.yaml -f compose.prod.yaml up -d

# Optional tooling
docker compose --profile debug up -d

The default compose.override.yaml is auto-loaded; production overrides must be selected explicitly.

Rendered configuration is not runtime proof. config can confirm a secret declaration, resource limit, or healthcheck is present, but only runtime inspection proves the secret file is mounted, the healthcheck passes, or the target implementation enforces deploy limits. Verify with exec, ps, inspect, and measured behavior on the target host.

Reference routing

Load whenReference
Starting a project or choosing primitivesreferences/01-model-and-file-design.md
Dependencies, healthchecks, shutdown, or jobsreferences/02-lifecycle-and-health.md
DNS, ports, networks, volumes, or persistencereferences/03-networking-and-storage.md
.env, interpolation, profiles, or overridesreferences/04-configuration-and-overrides.md
Watch, builds, CI, or production operationsreferences/05-development-and-production.md
Secrets, least privilege, or supply-chain concernsreferences/06-security.md
A failure needs a systematic workflowreferences/07-troubleshooting.md
CLI command or field lookupreferences/08-command-playbook.md
Source coverage and freshness checksreferences/00-source-index.md

Included artifacts

  • templates/: portable base, development, production, environment, and secret-file examples.
  • assets/project-review-checklist.md: handoff and pre-deployment review checklist.
  • scripts/compose-doctor.sh: deterministic validation and runtime diagnostics with text or JSON output.

Failure boundaries

  • config --quiet proves model resolution, not image pulls, startup, or application correctness.
  • A running container is not a ready service. A passing healthcheck is not end-to-end verification.
  • docker compose down removes project containers and networks; it normally preserves named volumes. down -v is destructive.

When not to use this skill

Use an orchestrator-specific skill for Kubernetes, Swarm scheduling, or another platform's deployment controller. Compose can describe some deploy concepts, but is not a substitute for that platform's operational API.

© magnus919, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 18 other files (scripts, references, assets) in docker-compose of magnus919/agent-skills.

  • SKILL.md
  • README.md
  • assets/project-review-checklist.md
  • evals/evals.json
  • references/00-source-index.md
  • references/01-model-and-file-design.md
  • references/02-lifecycle-and-health.md
  • references/03-networking-and-storage.md
  • references/04-configuration-and-overrides.md
  • references/05-development-and-production.md
  • references/06-security.md
  • references/07-troubleshooting.md
  • references/08-command-playbook.md
  • scripts/compose-doctor.sh
  • templates/.env.example
  • templates/compose.override.yaml
  • … and 3 more

Open the folder on GitHubat commit 96fbe07

Compare with similar skills

Docker Compose next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Docker Compose compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Docker Compose this skillmagnus919/agent-skills113—~2kAutomated safety check: NotesMIT
Iron Proxy Gateway for NanoClawnanocoai/nanoclaw31k—~4.6kAutomated safety check: NotesMIT
GreptimeDB Dev Docker ImageGreptimeTeam/greptimedb6.7k—~4kAutomated safety check: NotesApache-2.0
Senior DevOps Toolkitmaslennikov-ig/claude-code-orchestrator-kit2606 repos~1.1kAutomated safety check: NotesCustom licence
LangBot Deployment Guidelangbot-app/LangBot18k—~1.2kAutomated safety check: NotesApache-2.0
Build Openshell Mxc WindowsNVIDIA/OpenShell15k—~4.9kAutomated safety check: PassApache-2.0

Similar skills

  • Installs or refreshes Iron Proxy and its Iron Control web console for NanoClaw, with a local Docker setup, database, credentials and a human approval bridge.

    31k GitHub stars~4.6k tokensUpdated 2 days ago
    DevOps & CloudAuto-check: notes
  • GreptimeDB Dev Docker Image

    GreptimeTeam/greptimedb

    Packages a locally built GreptimeDB debug binary into a development-only Docker image for local-cluster testing, with an optional push to a dev registry.

    6.7k GitHub stars~4k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • Senior DevOps Toolkit

    maslennikov-ig/claude-code-orchestrator-kit

    Comprehensive DevOps skill for CI/CD, infrastructure automation, containerization, and cloud platforms (AWS, GCP, Azure). Includes pipeline setup…

    260 GitHub starsUsed in 6 repos~1.1k tokens
    DevOps & CloudAuto-check: notes
  • LangBot Deployment Guide

    langbot-app/LangBot

    Deploys and configures a LangBot instance with Docker Compose or Kubernetes, covering config.yaml, the Box sandbox runtime, the plugin runtime and the global API key.

    18k GitHub stars~1.2k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • Official

    Maintain and validate OpenShell's build-only Windows MSVC lane for x64 and ARM64.

    15k GitHub stars~4.9k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Omnigent Docker Compose Deploy

    omnigent-ai/omnigent

    Brings up the Omnigent server and Postgres as a Docker compose stack on any Docker host, and covers the Dockerfile's runtime and host build targets for extending it to a new platform.

    11k GitHub stars~1.3k tokensUpdated today
    DevOps & CloudAuto-check: notes

More from magnus919/agent-skills

All 115 skills in this repo
  • Artifact Pyramids

    magnus919/agent-skills

    Organize durable agent research outputs as summaries, analysis, and evidence dossiers.

    113 GitHub stars~2.7k tokensUpdated yesterday
    Auto-check passed
  • Ascii City Engine

    magnus919/agent-skills

    Build portable, first-person colored ASCII city engines and small GIS-derived city packs.

    113 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Color Management

    magnus919/agent-skills

    Manage color workflows with ICC profiles, working spaces, gamut mapping, and color science.

    113 GitHub stars~2.6k tokensUpdated yesterday
    Auto-check: notes
  • Data Scientist

    magnus919/agent-skills

    A skill your agent uses for PhD-level expertise in data science, statistics, and machine learning: rigorous statistical analysis, experimental design, causal inference, advanced modeling, research…

    113 GitHub stars~4.1k tokensUpdated yesterday
    Auto-check passed
  • Fpga Development

    magnus919/agent-skills

    Design, review, simulate, and verify FPGA logic using explicit RTL contracts, clock and reset models, CDC analysis, timing constraints, and reproducible implementation evidence.

    113 GitHub stars~2.7k tokensUpdated yesterday
    Auto-check passed
  • Langgraph

    magnus919/agent-skills

    Build multi-agent AI systems with LangGraph — the low-level orchestration framework for stateful, graph-based agent workflows.

    113 GitHub stars~2.8k tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Docker Compose

What does Docker Compose do?

Use Docker Compose to define, run, debug, and harden multi-container applications. Docker Compose is an agent skill from magnus919/agent-skills. Use Docker Compose to define, run, debug, and harden multi-container applications.

When should I use Docker Compose?

Docker Compose fits situations like: unrelated requests; route to the nearest named specialist.

How do I install Docker Compose in Claude Code?

Run `npx skills add magnus919/agent-skills --skill docker-compose -a claude-code`. Or copy the skill folder (docker-compose in magnus919/agent-skills) into .claude/skills/docker-compose in your project. Claude Code loads it when a task matches its description.

How do I install Docker Compose in Codex?

Run `npx skills add magnus919/agent-skills --skill docker-compose -a codex`. Or copy the skill folder (docker-compose in magnus919/agent-skills) into .agents/skills/docker-compose in your project. Codex loads it when a task matches its description.

Can I use Docker Compose in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add magnus919/agent-skills --skill docker-compose -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/docker-compose, .gemini/skills/docker-compose, .github/skills/docker-compose and .opencode/skills/docker-compose in your project.

What does Docker Compose need to run?

Going by SKILL.md and its folder, Docker Compose needs a shell for the scripts in its folder and the command-line tools its instructions call (docker). Our summary lists: A Bash shell; Docker. Compatibility (from SKILL.md): Docker Compose v2 or another implementation of the Compose Specification; commands require Docker CLI..

Does Docker Compose access the network?

SKILL.md contains no URLs. Its commands use docker, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Docker Compose safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Docker Compose use?

Docker Compose is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Docker Compose use?

About 2k tokens (SKILL.md is roughly 8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.1k tokens, read only when the agent opens those files.

What are the alternatives to Docker Compose?

Skills that share tags, products or a category with Docker Compose: Iron Proxy Gateway for NanoClaw (nanocoai/nanoclaw, 31k stars), GreptimeDB Dev Docker Image (GreptimeTeam/greptimedb, 6.7k stars), Senior DevOps Toolkit (maslennikov-ig/claude-code-orchestrator-kit, 260 stars) and LangBot Deployment Guide (langbot-app/LangBot, 18k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Docker Compose?

magnus919 (a GitHub user) maintains it in magnus919/agent-skills, which has 113 GitHub stars. The repository holds 115 skills in this directory. The repository was last updated on October 6, 2026.

Source: magnus919/agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.