Skill: ops-docker
Docker and Docker Compose containerization. Trigger when the user wants to dockerize an application or create containers.
Configuration
| Property | Value |
|---|---|
| Context | inline |
| Pre-approved tools | None declared: the project's permission settings apply |
| Trigger | manual only — run /ops-docker |
Detailed description
Docker Containerization (pointer)
Docker Inc. publishes its own agent skills at docker/skills (Apache-2.0, pin v0.3.1). Four of them cover what this skill used to teach — multi-stage builds, non-root users, .dockerignore, HEALTHCHECK, BuildKit secrets and cache mounts, Compose healthchecks and depends_on: service_healthy:
| Skill | Use it when |
|---|---|
docker-project-foundations | Dockerizing a project, local dev with containers |
docker-build-strategies | Writing, slimming or hardening a Dockerfile |
docker-compose-patterns | Wiring services, adding a database, Compose debugging |
docker-destructive-guardrails | Before any docker command that deletes or resets state |
# pinned release (Docker's README documents the tree/<tag> form)
npx skills add https://github.com/docker/skills/tree/v0.3.1 --skill docker-project-foundations --yes
npx skills add https://github.com/docker/skills/tree/v0.3.1 --skill docker-build-strategies --yes
npx skills add https://github.com/docker/skills/tree/v0.3.1 --skill docker-compose-patterns --yes
npx skills add https://github.com/docker/skills/tree/v0.3.1 --skill docker-destructive-guardrails --yes
The repo's other seven skills (Docker Agent, Docker Sandboxes) are product-specific; install them only if you use those products. The three skills that ship a scripts/verify-*.sh only build the image and validate the Compose file.
Recipe entry: docs/recipes/recommended-vendor-skills.md §"Docker".
Foundation discipline the vendor skills leave out
- Scan the image before it ships: none of the four mentions vulnerability scanning. Gate the push on
trivy image <image>(or Docker Scout, Grype) failing on HIGH/CRITICAL — theops-ciskill wires it;qa-securityowns the policy. - Lint the Dockerfile in CI:
hadolint Dockerfileas a blocking step, also absent from the vendor skills. - Never bake secrets: no
COPY .env, no credentials inENVor build args — BuildKit--mount=type=secretat build time, orchestrator-injected env at run time (.claude/rules/security.md).
See also
/ops:ops-deploy— deployment checklist consumes the built image/ops:ops-database— Compose patterns for DB servicesqa-security— image scanning gate before pushops-ci— Hadolint + image scan as CI steps
Manual invocation only
This skill carries disable-model-invocation: true, so Claude cannot load it —
not when keywords match, and not from inside the same-named command either.
Start it yourself with /ops-docker.
Context inline
Inline means the skill runs in the conversation (the default, no context key):
- Sees the full history
- Its work is visible as it happens
- Right for almost every skill