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 ancoleman/ai-design-components --skill writing-dockerfilesgit clone --depth 1 https://github.com/ancoleman/ai-design-componentsWrote 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/ancoleman/ai-design-components/writing-dockerfiles)<a href="https://agentmods.dev/skills/ancoleman/ai-design-components/writing-dockerfiles"><img src="https://agentmods.dev/badge/skills/ancoleman/ai-design-components/writing-dockerfiles/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/ancoleman/ai-design-components/writing-dockerfiles"><img src="https://agentmods.dev/badge/skills/ancoleman/ai-design-components/writing-dockerfiles.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.00054 | $0.03439 |
| Opus 5.5 | $0.00022 | $0.01376 |
| Sonnet 5.5 | $0.00011 | $0.00688 |
| Haiku 4.5 | $0.00005 | $0.00344 |
Grade D, and why
writing-dockerfiles scanned grade D with 3 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 1mo 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 rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
- Run as root in production Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
rm -rf src Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
CMD wget --no-verbose --tries=1 --spider http://localhost:8080/health || exit 1 How it starts
The opening of the file, as written. The whole thing — 473 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Writing Dockerfiles
Create production-grade Dockerfiles with multi-stage builds, security hardening, and language-specific optimizations.
When to Use This Skill
Invoke when:
- "Write a Dockerfile for [Python/Node.js/Go/Rust] application"
- "Optimize this Dockerfile to reduce image size"
- "Use multi-stage build for..."
- "Secure Dockerfile with non-root user"
- "Use distroless base image"
- "Add BuildKit cache mounts"
- "Prevent secrets from leaking in Docker layers"
Quick Decision Framework
Ask three questions to determine the approach:
1. What language?
- Python → See
references/python-dockerfiles.md - Node.js → See
references/nodejs-dockerfiles.md - Go → See
references/go-dockerfiles.md - Rust → See
references/rust-dockerfiles.md - Java → See
references/java-dockerfiles.md
2. Is security critical?
- YES → Use distroless runtime images (see
references/security-hardening.md) - NO → Use slim/alpine base images
3. Is image size critical?
- YES (<50MB) → Multi-stage + distroless + static linking
- NO (<500MB) → Multi-stage + slim base images
Core Concepts
Multi-Stage Builds
Separate build environment from runtime environment to minimize final image size.
Pattern:
# Stage 1: Build
FROM build-image AS builder
RUN compile application
# Stage 2: Runtime
FROM minimal-runtime-image
COPY --from=builder /app/binary /app/
CMD ["/app/binary"]
Benefits:
- 80-95% smaller images (excludes build tools)
- Improved security (no compilers in production)
- Faster deployments
- Better layer caching
Base Image Selection
Decision matrix:
| Language | Build Stage | Runtime Stage | Final Size |
|---|---|---|---|
| Go (static) | golang:1.22-alpine |
gcr.io/distroless/static-debian12 |
10-30MB |
| Rust (static) | rust:1.75-alpine |
scratch |
5-15MB |
| Python | python:3.12-slim |
python:3.12-slim |
200-400MB |
| Node.js | node:20-alpine |
node:20-alpine |
150-300MB |
| Java | maven:3.9-eclipse-temurin-21 |
eclipse-temurin:21-jre-alpine |
200-350MB |
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.
- examples/go-microservice.Dockerfile 1.4 KB
- examples/nodejs-express.Dockerfile 1.4 KB
- examples/python-fastapi.Dockerfile 1.5 KB
- examples/rust-actix.Dockerfile 1.4 KB
- outputs.yaml 6.2 KB
- references/base-image-selection.md 11 KB
- references/buildkit-features.md 15 KB
- references/go-dockerfiles.md 15 KB
- references/java-dockerfiles.md 13 KB
- references/nodejs-dockerfiles.md 14 KB
- references/python-dockerfiles.md 11 KB
- references/rust-dockerfiles.md 16 KB
- references/security-hardening.md 16 KB
- scripts/analyze_image_size.sh 3.7 KB runs code
- scripts/validate_dockerfile.py 8.2 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.
- 1mo ago First seen · 473 lines · 54 tokens per session scan D 588e76add5cb
writing-dockerfiles is a skill published in the GitHub repository ancoleman/ai-design-components (525 stars, last pushed 10mo ago), licensed MIT. It adds 54 tokens to every session and 3,439 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it D with 3 findings (asks for root, recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
agents-v2-py
Build container-based Foundry Agents with Azure AI Projects SDK (ImageBasedHostedAgentDefinition). Use when creating hosted agents with custom container images in Azure AI Foundry.
docker-debugger
Debug Docker containers, fix Dockerfile issues, optimize images, and troubleshoot docker-compose. Use when having Docker problems, container issues, or optimizing Docker builds.
devops
Comprehensive DevOps engineering practices for Kubernetes, CI/CD, Bash scripting, Ansible, and cloud infrastructure.
docker
Docker containerization best practices for building, securing, and deploying containers.
kubernetes
Expert in Kubernetes and DevOps with infrastructure-as-code and cloud-native patterns.
experiment-reproducibility
Make a thesis's computational experiments reproducible by the examiner and by the student three months later: pinned environments, seeded randomness, a single config per run, a run manifest that records code version, data version, parameters, hardware, and timings, results written to versioned files that figures and…