dockerfile-smells

dockerfile-smells is a skill for Claude Code from sigistry/marketplace. It costs 76 tokens per session (812 once invoked), scanned B, original, MIT.

A review guide for Dockerfiles, which are recipes for building software containers. It lists common mistakes and the safer or smaller patterns that replace them.

In plain words
What is it for?
Use it when reviewing image size, multi-stage builds, dependency caching, base-image pinning, secret handling, cleanup, and non-root execution.
Why use it?
It helps prevent oversized images, unreproducible builds, leaked secrets, unnecessary cache misses, and containers running with excessive permissions.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the ci-incident-medic plugin — 4 skills, 5 commands, 3 agents shipped together

Good fit Use it when reviewing image size, multi-stage builds, dependency caching, base-image pinning, secret handling, cleanup, and non-root execution.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sigistry/marketplace/dockerfile-smells
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add sigistry/marketplace --skill dockerfile-smells
Clone the repo
git clone --depth 1 https://github.com/sigistry/marketplace

Made for: Claude Code.

Or install ci-incident-medic, the plugin that ships this one along with the rest of its 4 skills, 5 commands, 3 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dockerfile-smells

README.md
[![agentmods](https://agentmods.dev/badge/skills/sigistry/marketplace/dockerfile-smells/github.svg)](https://agentmods.dev/skills/sigistry/marketplace/dockerfile-smells)
Your own site
<a href="https://agentmods.dev/skills/sigistry/marketplace/dockerfile-smells"><img src="https://agentmods.dev/badge/skills/sigistry/marketplace/dockerfile-smells/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for dockerfile-smells

Your own site · 80×15
<a href="https://agentmods.dev/skills/sigistry/marketplace/dockerfile-smells"><img src="https://agentmods.dev/badge/skills/sigistry/marketplace/dockerfile-smells.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 812 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00076 $0.00812
Opus 5 $0.00038 $0.00406
Sonnet 5 $0.00015 $0.00162
Haiku 4.5 $0.00008 $0.00081

Measured 9d ago against content hash f73db594f757, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade B, and why

dockerfile-smells scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootlowPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

description: This skill should be used when the user mentions "Dockerfile", "docker image size", "container security", "multi-stage build", "distroless", "run as root", "docker layer caching", or is reviewing/optimizing

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Recursive force deletemediumDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

| `apt-get` with no cleanup | apt lists/caches bloat the layer | `--no-install-recommends` + `rm -rf /var/lib/apt/lists/*` in the same `RUN` |

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

plugins/ci-incident-medic/skills/dockerfile-smells/SKILL.md · 43 lines

How it starts

The opening of the file, as written. The whole thing — 43 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Dockerfile Smells and Hardening

Purpose

A consistent set of Dockerfile anti-patterns and their fixes, so container reviews produce smaller, safer, cache-friendly images the same way every time. This is container-build domain knowledge, the specific smells and the reasons they matter, not generic Docker syntax.

Smell catalog

Smell Why it hurts Fix
Runs as root (no USER) container escape = host root; violates PSS/most policies add USER <uid> (numeric, non-root)
latest / unpinned base tag non-reproducible; silent base drift; supply-chain risk pin FROM img@sha256:<digest>
Single-stage build ships compilers, headers, build deps in runtime image multi-stage: build → slim runtime
COPY . . before dep install any source edit busts the dependency cache layer copy manifests, install, then copy source
Secrets baked in a layer recoverable from image history forever RUN --mount=type=secret; never ENV TOKEN=
apt-get with no cleanup apt lists/caches bloat the layer --no-install-recommends + rm -rf /var/lib/apt/lists/* in the same RUN
Missing .dockerignore huge context; .git/secrets sent to daemon add .dockerignore
No HEALTHCHECK orchestrator can't detect a wedged process add HEALTHCHECK where the app exposes a check
ADD for local files / remote URLs silent auto-extract, unverified downloads use COPY; fetch with verified checksums
Many chained RUN layers extra layers, larger image combine related commands, order by volatility

Hardening principles (apply in order)

  1. Least privilege at runtime: non-root numeric USER, drop capabilities, read-only root filesystem where possible.
  2. Minimal surface: distroless or -slim runtime base; install only what runs in production.
  3. Reproducibility: pin base image by digest; pin package versions where feasible.
  4. Cache efficiency: order layers least-volatile → most-volatile (base, then deps, then source).
  5. No secrets in layers: build secrets via BuildKit mounts; runtime secrets via the orchestrator, never ENV/ARG bake-in.

Read the full file on GitHub · 43 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 43 lines · 76 tokens per session scan B f73db594f757

Subscribe to this mod's changes

dockerfile-smells is a skill published in the GitHub repository sigistry/marketplace (3 stars, last pushed 5d ago), licensed MIT. It adds 76 tokens to every session and 812 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

infra-standards

Infrastructure, container, and CI/CD discipline — IaC, Dockerfiles and compose files, CI pipelines, platform deploy config, env/secrets handling. INVOKE PROACTIVELY when creating or editing any such file (.tf, .bicep, Dockerfile, docker-compose, .github/workflows/, vercel.json) — even when nobody says "infra". Not for…

PrabhdeepSingh/claude-plugins · 106 tokens

ci-cd-pipeline

Use near the end of a project to generate CI and make the app deploy-ready. Produces a polyglot GitHub Actions workflow (lint, typecheck, test, build) and multi-stage Dockerfiles. The finish line is CI-green and container-ready, not an actual deploy.

martian56/claude-engineer · 64 tokens

docker-dev-environment

Use when setting up local development services or running the project locally. Establishes the "stateful services in Docker, app runs native" pattern with Postgres, Redis, MinIO, and Mailpit.

martian56/claude-engineer · 46 tokens

helm

Helm chart authoring, templating, and release management for Kubernetes: charts, values, templating functions, repositories, dependencies, and lifecycle operations.

lukaskellerstein/claude-my-marketplace · 0 tokens

design-everyday-things

Apply foundational design principles: affordances, signifiers, constraints, feedback, and conceptual models. Use when the user mentions "why is this confusing", "affordance", "error prevention", "discoverability", "human-centered design", "mental model", "mapping", "seven stages of action", "users keep making…

wondelai/skills · 132 tokens

traction-eos

Implement the Entrepreneurial Operating System (EOS) to align vision and execution across a company. Use when the user mentions "EOS", "Entrepreneurial Operating System", "V/TO", "quarterly rocks", "Level 10 meetings", "accountability chart", "IDS process", "my company feels chaotic", "we keep having the same…

wondelai/skills · 147 tokens