dockerfile-review
Skill0 starsChanged 41 days agoMITView on GitHub
Use when reviewing a Dockerfile or image build for size, security, caching, or reproducibility. Mention "review this dockerfile", "container image review", or "why is my image huge"; use supply-chain-security for signing/provenance after build and pr-review for a diff with no image-build focus.
- Pipes a download into a shell
- Reads credentials
- Deletes or force-pushes
1 other project uses a version of this.
Adopted by
Most recently taken up by
- ihoru/skillstheir own version, first seen Oct 15, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- ihoru/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository45 other files it gives its agents.
- admission-policy-reviewSkill
- alert-rule-reviewSkill
- architecture-reviewSkill
- argocd-applicationsetSkill
- argocd-debugSkill
- argocdSkill
- cert-manager-debugSkill
- cicd-reviewSkill
- cilium-debugSkill
- ciliumSkill
- cluster-backupSkill
- dast-reviewSkill
- english-technical-messageSkill
- git-messageSkill
- gitops-reviewSkill
- go-bugfixSkill
- go-code-reviewSkill
- go-testing-reviewSkill
- grafana-dashboardsSkill
- helm-reviewSkill
- homelab-change-planSkill
- incident-analysisSkill
- ingressSkill
- interview-system-designSkill
- istio-debugSkill
- istioSkill
- kubernetes-autoscalingSkill
- kubernetes-debugSkill
- kubernetes-securitySkill
- kubernetes-yaml-reviewSkill
- migration-planSkill
- observability-reviewSkill
- observability-stackSkill
- production-readinessSkill
- pr-reviewSkill
- root-cause-analysisSkill
- runbook-writerSkill
- runtime-security-reviewSkill
- secrets-managementSkill
- storage-debugSkill
- supply-chain-securitySkill
- terraform-reviewSkill
- upgrade-readinessSkill
- vaultSkill
- vulnerability-triageSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Read the Dockerfile, build context, lockfiles, and supplied image metadata.
- Distinctive: line 22
Do not copy build-only tools or secrets into the final stage.
- Distinctive: line 26
Follow the Workflow, Safety rules, and Quality checklist below.
- Distinctive: line 36
Use when reviewing a Dockerfile (or Containerfile) before it ships — new images, base image changes, or "the image is too big / too slow to …
- Very specific: line 38
Use supply-chain-security instead for signing and provenance after build, and pr-review for a diff without a specific image-build focus.
- Very specific: line 86
Never echo a secret discovered in a Dockerfile, .env, or image history — describe the exposure and the fix without quoting the value.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Dockerfile Review
TL;DR checklist
- Inspect base image, build stages, final user, and copied artifacts.
- Check reproducibility, cache behavior, image size, and secret exposure.
- Report concrete changes to the final image or build.
Key read-only checks
- Read the Dockerfile, build context, lockfiles, and supplied image metadata.
Common pitfalls
- Do not copy build-only tools or secrets into the final stage.
Agent procedure
Follow the Workflow, Safety rules, and Quality checklist below.
Quick references
- references/examples.md
Last verified: unverified
When to use
Use when reviewing a Dockerfile (or Containerfile) before it ships — new images, base image
changes, or "the image is too big / too slow to build / flagged by the scanner" complaints.
Use supply-chain-security instead for signing and provenance after build, and pr-review
for a diff without a specific image-build focus.
Goal
Catch image-build mistakes that cause bloated images, broken caching, security findings, or non-reproducible builds — with the concrete fix for each.
Workflow
- Base image — pinned to a specific version (ideally a digest), not
latest; minimal variant where practical (-slim, distroless, alpine — noting musl caveats for Go/CGO and native deps); official or org-approved source. - Multi-stage builds — build toolchain (compilers, dev headers, npm/go caches) stays in a builder stage; final stage copies only artifacts. A Go/Java/Node app shipping its compiler is the most common bloat finding.
- Non-root user — final stage sets
USERto a non-root UID; file ownership (COPY --chown) matches. Flag images that only work as root. - Layer hygiene — related
RUNcommands chained where it saves layers; package-manager caches cleaned in the same layer they're created (apt-get clean/rm -rf /var/lib/apt/lists/*,--no-cachefor apk); no "delete in a later layer" pattern (the data is still in the earlier layer). - Cache ordering — dependency manifests (
go.mod,package.json,requirements.txt) copied and installed before copying the full source, so code changes don't bust the dependency cache. - Secrets — no secrets via
ARG/ENV/COPY(all end up readable in image history or layers); build-time secrets use BuildKit--mount=type=secret;.dockerignoreexcludes.env,.git, credentials. - COPY vs ADD —
COPYunless the auto-extract/URL behavior ofADDis genuinely needed (it almost never is). - Runtime contract —
EXPOSEdocuments the port;HEALTHCHECKpresent where the orchestrator doesn't provide probes (plain Docker/Compose);ENTRYPOINT/CMDuse exec form (JSON array) so signals reach the process (PID 1 must handle SIGTERM for graceful shutdown). - Reproducibility — dependency versions pinned (lockfiles used in the build); no
curl | shof unpinned installers mid-build.
References
references/examples.md— bad → good multi-stage pairs for Go/Node/Python with the mechanics behind each finding (signal handling, layer additivity, BuildKit secret/cache mounts, digest pinning, HEALTHCHECK applicability).- Optional tooling:
hadolint(Dockerfile lint) andtrivy image/grype(CVE scan of the built image) can supplement this review if the user already has them — suggest, never install, and only run them with the user's confirmation.
Safety rules
- This is a review skill: do not build, push, or publish images.
- Never echo a secret discovered in a Dockerfile,
.env, or image history — describe the exposure and the fix without quoting the value. - Alpine/distroless recommendations must note compatibility caveats (musl vs glibc, no shell for debugging) rather than being suggested unconditionally.
Output format
## Critical (security / broken behavior)
## Major (bloat, cache-busting, reproducibility)
## Minor / style
## Suggested Dockerfile changes
<concrete diff-style snippets for the top findings>Quality checklist
- Base image pinning and final-stage
USERwere checked - Build-time secret exposure (ARG/ENV/history) was checked
- Cache ordering (deps before source) was checked
- Signal handling (exec-form ENTRYPOINT) was checked
- No image was built or pushed
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

