/polymath-devops:audit-composefrom polymath-devops
Audit docker-compose.yaml — image pinning, named volumes, networks, secret injection, depends_on health-conditioning.
Ships in polymath-devops. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Spot the patterns in a compose file that bite when you actually run it: floating images, host-mount surprises, secrets in ENV, missing health gates.
Mode: analytical — judgment inside a fixed frame. Keep the output shape; every verdict cites its evidence; unknowns are marked [TBD] or [VERIFY], never filled in.
docker-compose.yaml / compose.yaml is new, changed in a PR, or about to be used beyond a laptop.compose.override.yaml, -f stacks) — findings depend on the merged result (docker compose config prints it).image: pinning. Each service should be digest-pinned for production-shaped compose; tag-pinned for dev is fine if the tag is specific (postgres:16.3, not postgres:latest).volumes: ['/host/path:/container/path'] outside ./ is suspicious.default works but services accidentally pick it up. For DB + app separation, two networks (db_net, web_net) limit lateral exposure.secrets: top-level + secrets: per-service) over environment: for credentials.env_file: .env is fine for dev; in CI/prod surface a warning.depends_on with condition: service_healthy — services must wait until dependents pass healthcheck, not just "started". Plain depends_on: [db] only orders startup, not readiness.restart: policy. Production: unless-stopped or on-failure. Dev: no is fine.deploy.resources.limits (Swarm) or runtime cpus: / mem_limit: (compose-direct). Without limits, one container can starve others on the host.ports: exposure. 127.0.0.1:5432:5432 over 5432:5432 for local-only services. Without the bind address, the port is open to the host's external interfaces.profiles: for optional services (profiles: [dev]); keeps a single compose file from running everything in prod.privileged: true; mounting /var/run/docker.sock (root on the host); network_mode: host or pid: host; broad cap_add (SYS_ADMIN, NET_ADMIN); security_opt: [seccomp:unconfined].audit-compose
File: docker-compose.yaml (3 services: web, db, redis)
Issues
- web.image: app:latest ✗ floating tag
- db.image: postgres:16.3 ✓ tag-pinned (acceptable for dev)
- web.depends_on: [db] ⚠ no health condition
Fix: depends_on: { db: { condition: service_healthy } }
- db.ports: "5432:5432" ⚠ exposed to host external interface
Fix: "127.0.0.1:5432:5432"
- db.environment.POSTGRES_PASSWORD: "secret" ✗ plain-text in compose
Fix: use Compose secrets or env_file.
- No memory limits on any service.
Fix: deploy.resources.limits.memory per service.
Recommendation: 5 fixes; prod readiness requires all addressed.
image: foo:latest. Reproducibility fail.environment:. Show up in docker inspect.depends_on without condition: service_healthy for stateful deps. Race conditions on startup.profiles / overrides.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub mohammadbafkar/polymath --plugin polymath-devops5 skills in this plugin
/audit-dockerfileAudit a Dockerfile for base-image hygiene, layer order, multi-stage discipline, secret leakage, and missing healthcheck/USER directives./ci-pipeline-githubAuthor a GitHub Actions workflow — lint/test/build/deploy with caching, concurrency control, OIDC for cloud auth, minimal permissions./dockerizeWrite a multi-stage Dockerfile — distroless or minimal base, build/runtime split, deterministic layer order, non-root user, no secrets baked in.Other plugins' skills for the same job