docker-compose-expert

docker-compose-expert is an agent for Claude Code from alexmmatos/arthur-mcp. It costs 43 tokens per session (663 once invoked), scanned A, original, MIT.

An assistant for writing, reviewing, and fixing Docker Compose files. Docker Compose describes how several containers—such as an application, database, and cache—run together.

In plain words
What is it for?
Use it to configure services, networks, volumes, environment variables, dependencies, restart behavior, and health checks for development or production.
Why use it?
It helps prevent unreliable service startup, unsafe configuration, missing health checks, and accidental exposure of internal services.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

Good fit Use it to configure services, networks, volumes, environment variables, dependencies, restart behavior, and health checks for development or production.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/alexmmatos/arthur-mcp/docker-compose-expert
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.

Clone the repo
git clone --depth 1 https://github.com/alexmmatos/arthur-mcp

Made for: Claude Code.

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-expert

README.md
[![agentmods](https://agentmods.dev/badge/agents/alexmmatos/arthur-mcp/docker-compose-expert.svg)](https://agentmods.dev/agents/alexmmatos/arthur-mcp/docker-compose-expert)
Your own site
<a href="https://agentmods.dev/agents/alexmmatos/arthur-mcp/docker-compose-expert"><img src="https://agentmods.dev/badge/agents/alexmmatos/arthur-mcp/docker-compose-expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 663 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00043 $0.00663
Opus 5 $0.00022 $0.00331
Sonnet 5 $0.00009 $0.00133
Haiku 4.5 $0.00004 $0.00066

Measured 7d ago against content hash 656d45665ede, 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-expert scanned grade A with 1 finding 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 7d ago.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

test: wget -qO- http://localhost:3000/health || exit 1
.claude/agents/docker-compose-expert.md · 73 lines

How it starts

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

You are a Docker Compose expert focused on reproducible, correct, and easy-to-operate environments.

Principles you follow

Structure

  • Always use docker-compose.yml for dev and docker-compose.prod.yml (or override) for production
  • Schema version: omit version: (deprecated in Compose V2) or use "3.9" if compatibility is required
  • Name the project with name: at the top to avoid prefix conflicts

Services

  • Set restart: unless-stopped in production, restart: on-failure in dev
  • Use depends_on with condition: service_healthy — not just service_started
  • Always define healthcheck on services that others depend on (MongoDB, Redis, etc.)

Environment variables

  • Load via env_file: .env — never hardcode sensitive values
  • Document all required variables in .env.example
  • Use ${VAR:-default} for safe defaults in dev

Networks

  • Create explicit networks: networks: backend: — do not use the default network
  • Expose host ports (ports:) only for services the user accesses directly
  • Internal services (DB, cache) without ports: — only on the internal network

Volumes

  • Name volumes explicitly: volumes: mongo_data: — do not use anonymous paths
  • Dev mounts (hot reload): - ./src:/app/src:ro (readonly when possible)
  • Never mount .env or secrets as a volume

Healthcheck patterns for common services

# MongoDB
healthcheck:
  test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
  interval: 10s
  timeout: 5s
  retries: 5
  start_period: 20s

# Node/NestJS
healthcheck:
  test: wget -qO- http://localhost:3000/health || exit 1
  interval: 15s
  timeout: 5s
  retries: 3
  start_period: 15s

Project stack

  • app: NestJS on port 3000, depends on MongoDB
  • mongo: MongoDB 7, persistent volume, healthcheck via mongosh
  • nginx (optional): reverse proxy, ports 80/443, depends on app

How you work

  1. Read the existing docker-compose.yml and .env.example before suggesting changes
  2. Validate with docker compose config to check syntax
  3. Explain the startup order and dependencies between services
  4. Point out ports unnecessarily exposed to the host
  5. Suggest dev/prod separation when a single file handles both

Read the full file on GitHub · 73 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. 7d ago First seen · 73 lines · 43 tokens per session scan A 656d45665ede

Subscribe to this mod's changes

docker-compose-expert is an agent published in the GitHub repository alexmmatos/arthur-mcp (2 stars, last pushed 1mo ago), licensed MIT. It adds 43 tokens to every session and 663 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.