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.
git clone --depth 1 https://github.com/sigistry/marketplaceWrote 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/commands/sigistry/marketplace/dockerfile-optimize)<a href="https://agentmods.dev/commands/sigistry/marketplace/dockerfile-optimize"><img src="https://agentmods.dev/badge/commands/sigistry/marketplace/dockerfile-optimize/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/commands/sigistry/marketplace/dockerfile-optimize"><img src="https://agentmods.dev/badge/commands/sigistry/marketplace/dockerfile-optimize.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.00015 | $0.00699 |
| Opus 5.5 | $0.00006 | $0.00280 |
| Sonnet 5.5 | $0.00003 | $0.00140 |
| Haiku 4.5 | $0.00002 | $0.00070 |
Grade A, and why
dockerfile-optimize 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 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.
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.
How it starts
The opening of the file, as written. The whole thing — 46 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Analyze a Dockerfile and harden it: smaller image, non-root runtime, faster cache-friendly builds. Use this before an image ships or when builds are slow, huge, or flagged by a scanner. $ARGUMENTS is the Dockerfile path; default to ./Dockerfile if omitted.
Process
Step 1: Read the Dockerfile and its context
- Read the target Dockerfile. Detect the base image and language ecosystem (Node, Python, Go, Java/JVM, Rust, etc.) from
FROMand the copied manifests (package.json,requirements.txt/pyproject.toml,go.mod,pom.xml/build.gradle,Cargo.toml). - Check whether a
.dockerignoreexists alongside it.
Step 2: Detect smells
Apply the dockerfile-smells skill. Flag each present:
| Smell | Cost |
|---|---|
Runs as root (no USER) |
container escape blast radius, violates most policies |
latest or unpinned base tag |
non-reproducible builds, silent base drift |
| No multi-stage build | build toolchain + source shipped in final image |
| Cache-busting layer order | COPY . . before dependency install invalidates cache every edit |
| Secrets baked into layers | tokens/keys recoverable from image history forever |
apt-get/apk without cleanup |
lists and caches bloat the layer |
Missing .dockerignore |
huge build context, secrets/.git sent to daemon |
No HEALTHCHECK |
orchestrator can't detect a wedged-but-running process |
Step 3: Apply fixes
- Launch the dockerfile-hardener agent to rewrite the Dockerfile in place: multi-stage split, pinned base digest, non-root
USER, optimal layer ordering, no secrets in layers, minimal packages, and aHEALTHCHECKwhere it makes sense. The agent also emits a matching.dockerignore. - Consult the dockerfile-smells
multistage-patterns.mdreference for the ecosystem-specific template.
Step 4: Report
Produce these sections:
- Before / After: the original and hardened Dockerfile side by side (or as a diff).
- Generated
.dockerignore: the file contents. - Per-change rationale: a table of change → reason.
- Expected wins: estimated image-size reduction and the concrete security posture change (e.g. "runs as UID 10001, root filesystem read-only, no build toolchain in final layer"). Frame size numbers as estimates unless the user provides a real
docker imagesmeasurement.
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 · 46 lines · 15 tokens per session scan A b63225131ae5
dockerfile-optimize is a command published in the GitHub repository sigistry/marketplace (3 stars, last pushed 3d ago), licensed MIT. It adds 15 tokens to every session and 699 once invoked, about $0.0001 per session on Opus 5.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-08-31.
Other commands, from other repositories
dockcleanbuild
Clean Docker environment and rebuild all images and containers from scratch.
dockbuild
Quick Docker Compose build and start with full output.
slides
Magazine-quality slide deck as a self-contained HTML page.
typescript-dev
Start TypeScript development workflow with architecture, implementation, review, and testing phases.
fr-isolation
Run work in an isolated workspace: git worktree + devcontainer, driven through the fr isolation CLI (exec-bridge). Use when feature work must not touch the base repo, when fr-brainstorming or fr-goal needs a workspace, when the operator says "isolate this" / "run it in the container", or to clean up after a merged PR.…
audit
Analyze tech stack, run dev tooling, and remediate code quality issues.