docker-expert

docker-expert is a skill for Claude Code, Codex from hoangatg/ai-agent-toolkit. It costs 35 tokens per session (867 once invoked), scanned A, original, MIT.

A guide to packaging applications in Docker containers, including multi-stage builds, Docker Compose, image size, and security settings.

In plain words
What is it for?
Use it when containerizing an application, writing or improving a Dockerfile, coordinating services with Compose, choosing a base image, or hardening a container.
Why use it?
It helps reduce oversized images, unnecessary files, slow builds, and avoidable container security risks.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when containerizing an application, writing or improving a Dockerfile, coordinating services with Compose, choosing a base image, or hardening a container.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hoangatg/ai-agent-toolkit/docker-expert
Install

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.

Any agent
npx skills add hoangatg/ai-agent-toolkit --skill docker-expert
Clone the repo
git clone --depth 1 https://github.com/hoangatg/ai-agent-toolkit

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for docker-expert

README.md
[![agentmods](https://agentmods.dev/badge/skills/hoangatg/ai-agent-toolkit/docker-expert/github.svg)](https://agentmods.dev/skills/hoangatg/ai-agent-toolkit/docker-expert)
Your own site
<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/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.

agentmods 80×15 button for docker-expert

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 867 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00035 $0.00867
Opus 5.5 $0.00014 $0.00347
Sonnet 5.5 $0.00007 $0.00173
Haiku 4.5 $0.00003 $0.00087

Measured 1mo ago against content hash 7a02bc44a98d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 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 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.

.agent/skills/docker-expert/SKILL.md · 135 lines

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

Read the full file on GitHub · 135 lines

Changes

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.

  1. 1mo ago First seen · 135 lines · 35 tokens per session scan A 7a02bc44a98d

Subscribe to this mod's changes

docker-expert is a skill published in the GitHub repository hoangatg/ai-agent-toolkit (1 stars, last pushed 7mo ago), licensed MIT. It adds 35 tokens to every session and 867 once invoked, about $0.0001 per session on Opus 5.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.

Related

Other skills, from other repositories

docker-patterns

Docker and Docker Compose patterns for local development, container security, networking, volume strategies, and multi-service orchestration.

deepelementlab/jupyter-studio · 27 tokens

deployment-patterns

Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications.

deepelementlab/jupyter-studio · 31 tokens

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.

samibs/skillfoundry · 6 tokens

cleanup-discipline

Disciplined disk-cleanup workflow for reclaiming storage without destroying live runtimes, unpushed work, or unrecoverable data. Use for ANY disk-space cleanup, storage reclamation, "what can we delete", purge/prune campaigns, or when asked to free up space — survey, classify, verify, capture, delete, report.

EZotoff/ez-omo-config · 74 tokens

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.

deepelementlab/jupyter-studio · 37 tokens

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.

deepelementlab/jupyter-studio · 38 tokens