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 pproenca/dot-skills --skill dockerfile-optimisegit clone --depth 1 https://github.com/pproenca/dot-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/pproenca/dot-skills/dockerfile-optimise)<a href="https://agentmods.dev/skills/pproenca/dot-skills/dockerfile-optimise"><img src="https://agentmods.dev/badge/skills/pproenca/dot-skills/dockerfile-optimise/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/pproenca/dot-skills/dockerfile-optimise"><img src="https://agentmods.dev/badge/skills/pproenca/dot-skills/dockerfile-optimise.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00073 | $0.01709 |
| Opus 5.5 | $0.00029 | $0.00684 |
| Sonnet 5.5 | $0.00015 | $0.00342 |
| Haiku 4.5 | $0.00007 | $0.00171 |
Grade A, and why
dockerfile-optimise scanned grade A with 0 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 2mo 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Dockerfile Optimization Best Practices
Comprehensive Dockerfile optimization guide sourced exclusively from official Docker documentation. Contains 48 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.
When to Apply
Reference these guidelines when:
- Writing new Dockerfiles or modifying existing ones
- Optimizing Docker build times (layer caching, cache mounts, context management)
- Reducing Docker image size (multi-stage builds, minimal base images)
- Hardening container security (secret mounts, non-root users, attestations)
- Setting up CI/CD pipelines with Docker builds
- Reviewing Dockerfiles for anti-patterns
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Layer Caching & Ordering | CRITICAL | cache- |
| 2 | Multi-Stage Builds | CRITICAL | stage- |
| 3 | Base Image Selection | HIGH | base- |
| 4 | Build Context Management | HIGH | ctx- |
| 5 | Security & Secrets | HIGH | sec- |
| 6 | Dependency Management | MEDIUM-HIGH | dep- |
| 7 | Instruction Patterns | MEDIUM | inst- |
| 8 | Quality & Validation | MEDIUM | lint- |
Quick Reference
1. Layer Caching & Ordering (CRITICAL)
cache-layer-order- Order layers by change frequencycache-copy-deps-first- Copy dependency files before source codecache-copy-link- Use COPY --link for cache-efficient layer copyingcache-mount-package- Use cache mounts for package managerscache-apt-combine- Combine apt-get update with installcache-external- Use external cache for CI/CD buildscache-invalidation- Avoid unnecessary cache invalidationcache-minimize-layers- Consolidate related RUN instructions
What ships with it
50 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/templates/_template.md 924 B
- metadata.json 1.1 KB
- references/_sections.md 2.1 KB
- references/base-arg-version.md 2.2 KB
- references/base-distroless.md 4.1 KB
- references/base-minimal-image.md 2.6 KB
- references/base-official-images.md 2.3 KB
- references/base-pin-versions.md 2.9 KB
- references/base-rebuild-regularly.md 2.5 KB
- references/cache-apt-combine.md 2.5 KB
- references/cache-copy-deps-first.md 2.0 KB
- references/cache-copy-link.md 2.9 KB
- references/cache-external.md 2.6 KB
- references/cache-invalidation.md 2.2 KB
- references/cache-layer-order.md 1.8 KB
- references/cache-minimize-layers.md 2.6 KB
- references/cache-mount-package.md 2.7 KB
- references/ctx-bind-mounts.md 2.6 KB
- references/ctx-dockerignore.md 2.5 KB
- references/ctx-minimize-context.md 2.9 KB
- references/ctx-syntax-directive.md 3.3 KB
- references/dep-cache-mount-apt.md 2.5 KB
- references/dep-cache-mount-npm.md 2.9 KB
- references/dep-cache-mount-pip.md 1.7 KB
- references/dep-cleanup-caches.md 3.3 KB
- references/dep-version-pin.md 2.5 KB
- references/inst-copy-over-add.md 3.9 KB
- references/inst-entrypoint-exec.md 4.0 KB
- references/inst-healthcheck.md 4.0 KB
- references/inst-heredoc-scripts.md 3.8 KB
- references/inst-json-cmd.md 3.2 KB
- references/inst-workdir-absolute.md 3.2 KB
- references/lint-build-checks.md 2.8 KB
- references/lint-labels.md 4.1 KB
- references/lint-pipefail.md 3.4 KB
- references/lint-single-concern.md 4.0 KB
- references/lint-sort-arguments.md 2.9 KB
- references/sec-attestations.md 3.4 KB
- references/sec-ephemeral-containers.md 3.7 KB
- references/sec-no-secrets-in-args.md 4.0 KB
- references/sec-no-unnecessary-packages.md 3.7 KB
- references/sec-non-root-user.md 3.1 KB
- references/sec-secret-mounts.md 3.0 KB
- references/sec-ssh-mounts.md 3.8 KB
- references/stage-copy-artifacts-only.md 1.7 KB
- references/stage-named-stages.md 1.3 KB
- references/stage-parallel-branches.md 2.2 KB
- references/stage-reusable-base.md 2.1 KB
- references/stage-separate-build-runtime.md 1.4 KB
- references/stage-target-builds.md 2.1 KB
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.
- 2mo ago First seen · 120 lines · 73 tokens per session scan A dde4627a36d8
dockerfile-optimise is a skill published in the GitHub repository pproenca/dot-skills (231 stars, last pushed 3mo ago), licensed MIT. It adds 73 tokens to every session and 1,709 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
dockerfile-optimise compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| dockerfile-optimisepproenca/dot-skills | Skill | 231 | 3mo ago | MIT | A | 73 | Claude Code, Codex |
| deploy-docker-composeomnigent-ai/omnigent | Skill | 12k | today | Apache-2.0 | A | 84 | Claude Code, Codex |
| bdd-container-updateNVIDIA-AI-Blueprints/video-search-and-summarization | Skill | 2.0k | today | Apache-2.0 | A | 117 | Cursor |
| securing-kubernetes-on-cloudxalgorix/xalgorix | Skill | 1.5k | 2d ago | Apache-2.0 | A | 80 | Claude Code, Codex |
| detecting-privilege-escalation-in-kubernetes-podsxalgorix/xalgorix | Skill | 1.5k | 2d ago | Apache-2.0 | A | 40 | Claude Code, Codex |
| docker-socket-mountPurpleAILAB/Decepticon | Skill | 6.9k | 12d ago | Apache-2.0 | B | 67 | Claude Code |
| managing-astro-local-envastronomer/agents | Skill | 465 | yesterday | Apache-2.0 | A | 63 | Claude Code |