/developer-standards:dockerfile-standardfrom developer-standards
Use when the user asks to write, edit, review, migrate, or optimize a Dockerfile, .dockerignore, or container image build.
Ships in developer-standards. 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; scripts run unread.
Secure, cache-efficient Dockerfiles adapted to the project in front of you. Not a template dump.
Not here: Compose topology (compose-standard), Go layout and golangci (go-project-standard), Make target names (makefile-standard), when CI builds an image (ci-standard, though the Dockerfile content is still yours). K8s, registries, and runtime secret distribution are out of scope.
Inventory before writing: languages, entrypoints, manifests and lockfiles, CGO and native deps, CA and timezone needs, writable paths, ports, health and shutdown behavior, existing Dockerfiles and ignores, Compose, CI, Make, architectures, registry and tags.
Say where you are uncertain.
Read references/rules.yaml, the source of truth for rule IDs. Then:
references/dockerfile-standard.mdGreenfield: adapt a template from assets/ and replace every Adapt… marker. Never ship an unfinished placeholder.
Migrate: references/migration-guide.md, incrementally, measuring size and behavior before and after.
Nothing here is unconditional, and none of it goes in without evidence: Alpine, scratch, or distroless; HEALTHCHECK; every architecture; pinning every distro package; one mega-RUN; stripping every shell; COPY --link; maximum provenance on a local build.
python3 scripts/validate_dockerfile.py /path/to/Dockerfile
# image checks need Docker; smoke is opt-in:
bash scripts/validate_image.sh IMAGE_REF
bash scripts/validate_image.sh IMAGE_REF --smoke --read-only --cap-drop
Prefer docker build --check . where supported. Errors = fix. Warnings = human review. A static check is not proof of runtime security.
Validator logic is hardcoded today; the checks: blocks in rules.yaml are illustrative, not executed.
Skip a line that has nothing to say rather than writing "not applicable".
# syntax=docker/dockerfile:1 unless a documented labs feature is required.latest, no unqualified FROM node.ARG, ENV, or a COPY of credentials.USER unless excepted.ENTRYPOINT and CMD. Entrypoint scripts end in exec.WORKDIR..dockerignore for any non-trivial context.# dockerfile-standard: except <rule-id> — <reason>
Every ignored MUST needs an exception line with a reason. An ignored SHOULD needs a brief rationale when it is not obvious.
assets/Dockerfile.go-node.template (opens in a new tab)assets/Dockerfile.go.template (opens in a new tab)assets/Dockerfile.node.template (opens in a new tab)assets/dockerignore.template (opens in a new tab)references/caching.md (opens in a new tab)references/dockerfile-standard.md (opens in a new tab)references/migration-guide.md (opens in a new tab)references/profiles/go.md (opens in a new tab)references/profiles/node.md (opens in a new tab)references/reproducibility.md (opens in a new tab)references/rules.yaml (opens in a new tab)references/security.md (opens in a new tab)scripts/validate_dockerfile.py (opens in a new tab)scripts/validate_image.sh (opens in a new tab)tests/fixtures/invalid/latest-tag/Dockerfile (opens in a new tab)tests/fixtures/invalid/relative-workdir/Dockerfile (opens in a new tab)tests/fixtures/invalid/root-user/Dockerfile (opens in a new tab)tests/fixtures/invalid/secret-arg/Dockerfile (opens in a new tab)tests/fixtures/invalid/shell-entrypoint/Dockerfile (opens in a new tab)tests/fixtures/invalid/shell-entrypoint/package.json (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub painhardcore/developer-standards --plugin developer-standards5 skills in this plugin
/ci-standardUse when the user asks to create, edit, or review a GitHub Actions workflow or CI under .github/workflows/./compose-standardUse when the user asks to write, edit, or review a local Docker Compose file (compose.yaml / docker-compose.yml) or a local service stack./go-project-standardUse when the user asks to create or review a Go module's layout (cmd/internal), go.mod, or golangci-lint config./makefile-standardUse when the user asks to create or edit a Makefile, add or rename a make target, or review Make target names.