Dockerfile Optimise
Dockerfile optimization guidelines from official Docker documentation. This skill should be used when writing, reviewing, or refactoring Dockerfiles to ensure optimal build time, image size, security, and robustness. Triggers on tasks involving Dockerfile creation, Docker image builds, container optimization, multi-stage builds, build cache, or Docker security hardening.
Install
npx skills add pproenca/dot-skills --skill dockerfile-optimisegit clone --depth 1 https://github.com/pproenca/dot-skills.git /tmp/dot-skills
mkdir -p ~/.claude/skills
cp -r /tmp/dot-skills/skills/.experimental/dockerfile-optimise ~/.claude/skills/dockerfile-optimisePersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# 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`](references/cache-layer-order.md) - Order layers by change frequency - [`cache-copy-deps-first`](references/cache-copy-deps-first.md) - Copy dependency files before source code
Details
- Skill name
dockerfile-optimise- Repository
- pproenca/dot-skills
- Path
skills/.experimental/dockerfile-optimise/SKILL.md- License
- MIT
- Repo updated
- 15 August 2026
FAQ
What does the Dockerfile Optimise skill do?
Dockerfile optimization guidelines from official Docker documentation. This skill should be used when writing, reviewing, or refactoring Dockerfiles to ensure optimal build time, image size, security, and robustness. Triggers on tasks involving Dockerfile creation, Docker image builds, container optimization, multi-stage builds, build cache, or Docker security hardening.
How do I install the Dockerfile Optimise skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add pproenca/dot-skills --skill dockerfile-optimise. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Dockerfile Optimise popular?
It lives in pproenca/dot-skills, which has 228 GitHub stars and 19 forks.
Related skills
12 Factor App
228pproenca/dot-skills
The Twelve-Factor App methodology for building scalable, maintainable cloud-native applications. Use when designing backend services, APIs, microservices, or any software-as-a-service application. Triggers on deployment patterns, configuration management, process architecture, logging, and infrastructure decisions.
37signals Rails
228pproenca/dot-skills
37signals Rails coding principles and conventions from DHH, Jorge Manrubia, and the Fizzy/Basecamp/HEY codebase. This skill should be used when writing, reviewing, or refactoring Ruby on Rails code following the 37signals philosophy — vanilla Rails, CRUD controllers, rich domain models, concerns, no service objects, Hotwire, Turbo, Stimulus, Solid Queue, Solid Cache, Solid Cable, multi-tenancy, Minitest, custom auth, or DHH conventions.
Acceptance Pipeline Catalog
228pproenca/dot-skills
Use when implementing, reviewing, or debugging a Gherkin acceptance-test pipeline with mutation testing. Covers parser, JSON IR, generator, runtime, step handlers, test runner, mutator, value mutation rules, execution, result classification, reporting, project layout, conformance, and agent setup. Based on Uncle Bob's Acceptance Pipeline Specification. Trigger even when the user mentions Gherkin parsing, acceptance test generation, mutation testing for acceptance tests, or building a portable test pipeline.
Forge
201swyxio/skills
Operate or diagnose SmolForge repositories and Forge Deploy/Sites when the task requires Forge-specific CLI, authentication, manifest, or release behavior on forge.smol.ai or *.sites.smol.ai. Do not use for generic Git or Cloudflare work, public-page review, product strategy or analytics, or ordinary code changes that do not interact with Forge-hosted state.
Dns Zonefile Config
150guia-matthieu/clawfu-skills
Configurez correctement vos zones DNS pour l'email deliverability (SPF, DKIM, DMARC), la sécurité (DNSSEC, CAA), et l'automatisation (OVH API, Cloudflare, Terraform), basé sur les best practices 2024-2025. Use when: **Configurer l'authentification email** - SPF, DKIM, DMARC pour éviter le spam folder; **Sécuriser un domaine** - DNSSEC, CAA records, protection contre le spoofing; **Automatiser la gestion DNS** - OVH API, Cloudflare API, Terraform; **Débugger des problèmes DNS** - dig, nslookup...
Io Bound Data Processing
228pproenca/dot-skills
Processing, transforming, or moving datasets that may exceed RAM on a single low-compute box — covers memory discipline (streaming, generators, dtype shrinkage), I/O access patterns (sequential vs random, mmap, async), data formats (Parquet vs CSV vs JSON, predicate pushdown), chunking & batching, spill-to-disk (external merge sort, DuckDB/Polars), pipelining (bounded queues, backpressure, checkpointing), codec selection (zstd/lz4/gzip), concurrency for I/O-bound workloads (asyncio, threads, prefetch), and observability (iowait vs CPU%, rows/sec, py-spy/strace). Trigger on "process a large fil
Browse the most popular Claude skills, all devops & cloud skills, or write your own with the skills generator.