Automated summary
Audits a Dockerfile for security, efficiency, and best practices, then reports issues by severity with concrete fixes.
Strengths
- Groups findings by severity (critical, warning, suggestion) with line references
- Covers concrete security checks: hardcoded secrets, root execution, missing USER, curl | sh patterns
- Suggests fixes as corrected Dockerfile code, including BuildKit cache mounts
- Also verifies that a .dockerignore exists and covers items like .git and node_modules
Limitations
- Purely static review: it does not build or run the image, so installed-package CVEs go unchecked
- Relies on Read, Glob, and Grep only, with no scanner integration such as Trivy or Hadolint
- Does not quantify the actual image-size savings from its optimization advice
Use it to audit an existing Dockerfile before merging changes or publishing a container image.
Don't use it to scan an already-built image for CVEs or to write a Dockerfile from scratch.
Security analysis
SafeThe skill uses only read-only tools (Read, Glob, Grep) and provides defensive review guidance for Dockerfiles. It does not execute commands, access networks, exfiltrate data, or instruct destructive actions.
No concerns found
How this analysis is madeExamples
Review my Dockerfile — it's using node:latest and I'm worried it's bloated and insecure.Can you look at ./Dockerfile and suggest how to reduce image size and fix layer ordering?Audit this Dockerfile for security issues and check whether my .dockerignore covers .git and node_modules.name: dockerfile-review description: Review Dockerfiles for best practices, security, and optimization. Use when the user says "review Dockerfile", "optimize image", "Dockerfile best practices", "reduce image size", or asks to audit a container build. allowed-tools: Read, Glob, Grep
Dockerfile Review
Audit Dockerfiles for security, efficiency, and best practices.
Instructions
- Read the Dockerfile
- Check for issues in each category below
- Report findings with severity (critical/warning/suggestion)
- Provide specific fixes with corrected code
Security checks
- MUST flag
USER rootwithout switching back - MUST flag secrets in ENV, ARG, or COPY (API keys, passwords)
- MUST flag
apt-get installwithout--no-install-recommends - Flag missing
USERdirective (runs as root by default) - Flag
COPY . .(may include secrets, .git, etc.) - Flag
:latesttags (unpinned versions) - Flag
curl | shpatterns
Optimization checks
- Multi-stage builds for compiled languages
- Layer ordering (least-changing first)
- Combined RUN statements to reduce layers
- Cache mounts for package managers:
--mount=type=cache .dockerignorefile exists and covers .git, node_modules, etc.apt-get clean && rm -rf /var/lib/apt/lists/*in same layer
Best practices
# Good: pinned, non-root, minimal
FROM python:3.11-slim@sha256:abc123...
WORKDIR /app
RUN useradd -r -s /bin/false appuser
COPY requirements.txt .
RUN --mount=type=cache,target=/root/.cache/pip \
pip install -r requirements.txt
COPY --chown=appuser:appuser . .
USER appuser
CMD ["python", "app.py"]
Output format
## Critical
- Line 5: Running as root without USER directive
## Warnings
- Line 12: Using :latest tag - pin to specific version
## Suggestions
- Line 8-10: Combine RUN statements to reduce layers
Rules
- MUST read the Dockerfile before reviewing
- MUST categorize issues by severity
- Never approve Dockerfiles with hardcoded secrets
- Always check for corresponding .dockerignore
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/dockerfile-review-mmh8qqpm/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/dockerfile-review-mmh8qqpm' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/dockerfile-review-mmh8qqpm/download' --output '.skill-downloads/dockerfile-review-mmh8qqpm/SKILL.md.part' && mv '.skill-downloads/dockerfile-review-mmh8qqpm/SKILL.md.part' '.skill-downloads/dockerfile-review-mmh8qqpm/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
Tools declared by the author (check availability in your agent): Read, Glob, Grep
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/dockerfile-review-mmh8qqpm/SKILL.md' && test -s '.skill-downloads/dockerfile-review-mmh8qqpm/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/dockerfile-review' && cp -R '.skill-downloads/dockerfile-review-mmh8qqpm' '.claude/skills/dockerfile-review'Cursor
test -f '.skill-downloads/dockerfile-review-mmh8qqpm/SKILL.md' && test -s '.skill-downloads/dockerfile-review-mmh8qqpm/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/dockerfile-review' && cp -R '.skill-downloads/dockerfile-review-mmh8qqpm' '.cursor/skills/dockerfile-review'Codex
test -f '.skill-downloads/dockerfile-review-mmh8qqpm/SKILL.md' && test -s '.skill-downloads/dockerfile-review-mmh8qqpm/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/dockerfile-review' && cp -R '.skill-downloads/dockerfile-review-mmh8qqpm' '.agents/skills/dockerfile-review'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/dockerfile-review-mmh8qqpm'openskills read 'dockerfile-review-mmh8qqpm'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/dockerfile-review-mmh8qqpm/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
Configure a Chat Channel with SecretRefs
DevOps
Set up chat channels using non-interactive commands, with secrets only as SecretRefs. Covers gather, mutate, repair, and prove steps for reliable delivery.
Investigate ClickHouse CI Failures
DevOps
Investigate a ClickHouse CI failure end-to-end from a PR or S3 report URL. Fetches failed tests, classifies flaky vs real regression, and checks for existing issues/fixes.
Ansible PR Review
DevOps
Reviews an Ansible PR following the project's standardized process, including changelog checks, test coverage validation, and feedback tracking.