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.
npx skills add obeone/claude-skills --skill dockerfile-best-practicesgit clone --depth 1 https://github.com/obeone/claude-skillsWrote 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.
[](https://agentmods.dev/skills/obeone/claude-skills/dockerfile-best-practices)<a href="https://agentmods.dev/skills/obeone/claude-skills/dockerfile-best-practices"><img src="https://agentmods.dev/badge/skills/obeone/claude-skills/dockerfile-best-practices/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.
<a href="https://agentmods.dev/skills/obeone/claude-skills/dockerfile-best-practices"><img src="https://agentmods.dev/badge/skills/obeone/claude-skills/dockerfile-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00053 | $0.03499 |
| Opus 5 | $0.00026 | $0.01750 |
| Sonnet 5 | $0.00011 | $0.00700 |
| Haiku 4.5 | $0.00005 | $0.00350 |
Grade A, and why
dockerfile-best-practices scanned grade A with 1 finding 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
apt-get update && apt-get install -y --no-install-recommends curl How it starts
The opening of the file, as written. The whole thing — 251 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Dockerfile Best Practices
Comprehensive guide for creating optimized, secure, and fast Docker images using modern BuildKit features.
Workflow
- Identify language/framework → Pick a template from Language Templates
- Apply essential rules → Every Dockerfile must follow Essential Rules
- Security hardening → Non-root user, secret mounts, provenance and SBOM attestations (see references/supply_chain.md)
- Optimize for cache → Separate deps from code, use cache mounts
- Multi-stage if needed → Compiled languages or distroless runtime
- Add metadata → OCI labels, HEALTHCHECK, STOPSIGNAL (see PID 1 and Signals)
- Review → Run scripts/analyze_dockerfile.py, then
docker build --check(see references/build_checks.md)
Essential Rules (Always Apply)
1. BuildKit syntax directive (first line, always)
# syntax=docker/dockerfile:1
2. Pin a readable tag you are willing to maintain
"Receives security patches" and "reproducible" are properties of a process, not of a tag string. A floating tag patches nothing by itself: it patches when someone rebuilds.
- Pin a tag as specific as you are willing to maintain.
python:3.12-slimis fine.python:3.12-slim-bookwormis equally fine: pinning the OS is a legitimate stability choice, not a mistake. :latestand untagged images stay rejected. Not because mutability is uniquely evil there, but because they carry zero information about what you are actually running.- Every tag is mutable, and security updates come from rebuilding regularly. Rebuild in six months and you may get different bytes. A tag is documentation and a rough contract, not a reproducibility mechanism. Name the process, not the string.
- Reproducibility comes from a process: digest pinning backed by Renovate or Dependabot, or recording the resolved digest in build metadata, which is what provenance attestations already do (references/supply_chain.md).
- Digests are an option, not the default. Strongest guarantee available, but without renewal automation a digest is just a tag that rots silently while you ship known CVEs feeling safe. Most teams lack that automation. Adopt digests only with the tooling that renews them.
What ships with it
15 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.
- assets/dockerignore-template 3.1 KB
- CHANGELOG.md 16 KB
- README.md 9.8 KB
- references/best_practices.md 25 KB
- references/build_checks.md 8.4 KB
- references/compose_best_practices.md 28 KB
- references/examples.md 22 KB
- references/optimization_guide.md 43 KB
- references/supply_chain.md 6.7 KB
- references/templates.md 6.5 KB
- references/uv_integration.md 12 KB
- scripts/analyze_compose.py 13 KB runs code
- scripts/analyze_dockerfile.py 55 KB runs code
- scripts/extract_dockerfile_blocks.py 23 KB runs code
- scripts/tests/test_extract_dockerfile_blocks.py 6.5 KB runs code
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.
- 9d ago First seen · 251 lines · 53 tokens per session scan A a866f8953356
dockerfile-best-practices is a skill published in the GitHub repository obeone/claude-skills (3 stars, last pushed 4d ago), licensed MIT. It adds 53 tokens to every session and 3,499 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
docker-compose
Use this skill when authoring or editing Docker Compose files (compose.yaml / docker-compose.yml), running multi-container stacks, or containerizing a Drupal/PHP application — e.g. "set up a local Drupal stack with nginx and MariaDB", "add Redis to my compose file", "why won't my containers start", "split dev and prod…
offensive-container-escape
Container escape and breakout techniques targeting Docker, containerd, and Podman runtimes. Covers privileged container breakout via host filesystem mount and nsenter, Docker socket abuse through /var/run/docker.sock, Linux capability exploitation including CAPSYSADMIN, CAPSYSPTRACE, and CAPNETADMIN, cgroup v1…
datarobot-workload-api
Use when the user wants to create, configure, scale, debug, observe, or roll out container workloads on DataRobot's Workload API. Triggers include: deploying a container as a managed service, listing/starting/stopping workloads, changing replica counts or autoscaling, picking CPU/GPU compute bundles, injecting…
kubernetes
Use when deploying to or debugging Kubernetes. Covers workload configuration, resource requests and limits, probes, rollout strategy, networking, and the failure modes that produce CrashLoopBackOff and OOMKilled.
containers
Use when building or debugging container images. Covers multi-stage builds, layer caching, image size, non-root users, signal handling, and the security defaults most Dockerfiles get wrong.
tutor-setup
Transforms knowledge sources into an Obsidian StudyVault. Two modes: (1) Document Mode — PDF/text/web sources → study notes with practice questions. (2) Codebase Mode — source code project → onboarding vault for new developers. Mode is auto-detected based on project markers in CWD.