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 agentmods add skills/hoangatg/ai-agent-toolkit/docker-expertnpx skills add hoangatg/ai-agent-toolkit --skill docker-expertgit clone --depth 1 https://github.com/hoangatg/ai-agent-toolkitWrote 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/hoangatg/ai-agent-toolkit/docker-expert)<a href="https://agentmods.dev/skills/hoangatg/ai-agent-toolkit/docker-expert"><img src="https://agentmods.dev/badge/skills/hoangatg/ai-agent-toolkit/docker-expert.svg" alt="Measured on agentmods" 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.00035 | $0.00867 |
| Opus 5 | $0.00017 | $0.00434 |
| Sonnet 5 | $0.00007 | $0.00173 |
| Haiku 4.5 | $0.00003 | $0.00087 |
Grade A, and why
docker-expert 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 yesterday.
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.
| Run as root | Create non-root user | Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
How it starts
The opening of the file, as written. The whole thing — 135 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Docker Expert
Containers should be small, fast, and secure. Everything else is configuration.
1. Dockerfile Principles
Multi-Stage Build Pattern
Stage 1: Build (heavy, all dependencies)
└── Compile, test, build artifacts
Stage 2: Production (minimal, runtime only)
└── Copy artifacts, set entrypoint
Layer Optimization
| Principle | Application |
|---|---|
| Order matters | Least-changing layers first |
| Combine RUN | Reduce layers with && |
| Clean up | Remove cache/temp in same layer |
| Use .dockerignore | Exclude node_modules, .git, etc. |
Base Image Selection
| Need | Image | Size |
|---|---|---|
| Minimal | alpine, distroless |
5-50MB |
| Standard | slim variants |
50-200MB |
| Full | bullseye, bookworm |
200MB+ |
| Specific runtime | node:20-alpine, python:3.12-slim |
Varies |
2. Image Size Optimization
Size Reduction Checklist
| Technique | Impact |
|---|---|
| Multi-stage builds | 50-90% reduction |
| Alpine/slim base | 60-80% reduction |
| .dockerignore | Varies (often 50%+) |
| Remove dev dependencies | 20-40% reduction |
| Combine and clean RUN layers | 10-30% reduction |
3. Docker Compose Patterns
Service Design
| Principle | Application |
|---|---|
| One process per container | Don't run nginx + app together |
| Named volumes | Persist data explicitly |
| Health checks | Define liveness probes |
| Dependency order | depends_on with conditions |
| Environment files | .env for secrets (not committed) |
Networking
| Network Type | Use Case |
|---|---|
| Bridge | Default, container-to-container |
| Host | Performance-critical, no isolation |
| Overlay | Multi-host (Swarm/K8s) |
| None | Maximum isolation |
4. Security Hardening
Container Security
| Practice | Why |
|---|---|
| Non-root user | Limit blast radius |
| Read-only filesystem | Prevent tampering |
| No new privileges | Block privilege escalation |
| Scan images | Detect known CVEs |
| Pin versions | Reproducible builds |
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.
- yesterday First seen · 135 lines · 35 tokens per session scan A 7a02bc44a98d
docker-expert is a skill published in the GitHub repository hoangatg/ai-agent-toolkit (1 stars, last pushed 5mo ago), licensed MIT. It adds 35 tokens to every session and 867 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
docker-patterns
Docker and Docker Compose patterns for local development, container security, networking, volume strategies, and multi-service orchestration.
deployment-patterns
Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications.
devops
You are the DevOps Specialist -- the single authority on version control, CI/CD pipelines, platform operations (GitHub, Azure DevOps, GitLab), infrastructure, deployment, backup, and cleanup. If it touches git, pipelines, or production infrastructure, it's yours.
staging-deploy
Build, push, migrate, and deploy to staging environment with health check verification. Use when deploying a completed phase to staging.
opencode
Delegate coding tasks to the OpenCode CLI for feature work, refactoring, PR review, and autonomous-style runs. Requires opencode installed where the agent can execute shell commands.
codex
Delegate coding tasks to the OpenAI Codex CLI for features, refactoring, PR reviews, and batch fixes. Requires the codex CLI and typically a git repository.