Image Build

Image Build is a skill for Claude Code, Codex from niels-emmer/myace. It costs 32 tokens per session (543 once invoked), scanned A, original, MIT.

A guide to building Docker container images with separate build and runtime stages, minimal base images, vulnerability scans, and software inventories.

In plain words
What is it for?
It helps write and review Dockerfiles, run services as non-root users, pin image versions, scan for known vulnerabilities, and create software bills of materials.
Why use it?
It helps keep deployed images smaller, reproducible, and less exposed to security vulnerabilities or unnecessary packages.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for aider. Also seen: mentions Codex; built for aider; mentions OpenCode.

Good fit It helps write and review Dockerfiles, run services as non-root users, pin image versions, scan for known vulnerabilities, and create software bills of materials.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/niels-emmer/myace/image-build
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 niels-emmer/myace --skill image-build
Clone the repo
git clone --depth 1 https://github.com/niels-emmer/myace

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 Image Build

README.md
[![agentmods](https://agentmods.dev/badge/skills/niels-emmer/myace/image-build/github.svg)](https://agentmods.dev/skills/niels-emmer/myace/image-build)
Your own site
<a href="https://agentmods.dev/skills/niels-emmer/myace/image-build"><img src="https://agentmods.dev/badge/skills/niels-emmer/myace/image-build/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 Image Build

Your own site · 80×15
<a href="https://agentmods.dev/skills/niels-emmer/myace/image-build"><img src="https://agentmods.dev/badge/skills/niels-emmer/myace/image-build.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 543 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00032 $0.00543
Opus 5 $0.00016 $0.00271
Sonnet 5 $0.00006 $0.00109
Haiku 4.5 $0.00003 $0.00054

Measured 9d ago against content hash 0e9b4003f139, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

Image Build 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 9d 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.

collections/base/devops-engineer/skills/image-build/SKILL.md · 30 lines

What it actually says

Purpose

A container image is the unit of deployment — its size, contents, and provenance determine how fast deploys are and how big the attack surface is. This skill is the checklist for building images that are small, secure, and reproducible.

When to use it

When writing or modifying a Dockerfile, adding a new service image, or reviewing image builds for security or size.

Steps / checklist

  1. Multi-stage builds. Build in a fat stage (compilers, dev dependencies), copy only the runtime artifacts into a minimal final stage. The final image contains what runs, nothing more.
  2. Minimal base images. Prefer distroless or slim base images over full distributions. Fewer packages means fewer CVEs and a smaller attack surface.
  3. Run as non-root. The container runs as a non-root user with the least privileges it needs. No USER root in the final stage.
  4. Pin base images. Pin base image tags (ideally by digest) so builds are reproducible. Unpinned latest makes today's build differ from last week's.
  5. Scan images. Scan images for CVEs in CI (Trivy, Grype, etc.) and fail on critical/high findings. Scanning after deploy is too late.
  6. SBOM and provenance. Generate an SBOM for production images so you can answer "what's in this image and where did it come from" during an incident or audit.
  7. Layer hygiene. Order layers by change frequency (dependencies first, code last) to maximize cache reuse. Don't copy secrets or build args into layers that ship.
  8. Tag immutably. Tag images with a unique, immutable identifier (commit SHA or digest) and promote that tag through environments — never retag a mutable latest and call it a release.

Expected output

An image that is small enough to deploy fast, minimal enough to have a small attack surface, and reproducible enough that today's build equals last week's. If the image contains a compiler, a root user, or an unpinned base, it isn't done.

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. 9d ago First seen · 30 lines · 32 tokens per session scan A 0e9b4003f139

Subscribe to this mod's changes

Image Build is a skill published in the GitHub repository niels-emmer/myace (1 stars, last pushed 5d ago), licensed MIT. It adds 32 tokens to every session and 543 once invoked, about $0.0002 per session on Opus 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.