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 vivek-viswanat/dev-arsenal --skill docker-image-optimizer-devopsgit clone --depth 1 https://github.com/vivek-viswanat/dev-arsenalWrote 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/vivek-viswanat/dev-arsenal/docker-image-optimizer-devops)<a href="https://agentmods.dev/skills/vivek-viswanat/dev-arsenal/docker-image-optimizer-devops"><img src="https://agentmods.dev/badge/skills/vivek-viswanat/dev-arsenal/docker-image-optimizer-devops/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/vivek-viswanat/dev-arsenal/docker-image-optimizer-devops"><img src="https://agentmods.dev/badge/skills/vivek-viswanat/dev-arsenal/docker-image-optimizer-devops.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.00027 | $0.00525 |
| Opus 5.5 | $0.00011 | $0.00210 |
| Sonnet 5.5 | $0.00005 | $0.00105 |
| Haiku 4.5 | $0.00003 | $0.00052 |
Grade B, and why
Docker Image Optimizer Devops scanned grade B 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.
Recursive force deletemediumDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
*Example:* `RUN apt-get update && apt-get install -y --no-install-recommends pkg && rm -rf /var/lib/apt/lists/*` Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
What it actually says
Context
Use this skill when:
- Creating a new
Dockerfile - A user complains about "slow builds" or "large images"
- Reviewing container security (reducing attack surface)
Optimization Pillars
1. Multi-Stage Strategy (The 2026 Standard)
- Separate Build from Runtime: Use a heavy image (with compilers/SDKs) for building, but copy ONLY the final binary/artifacts into a minimal runtime image (Alpine or Scratch).
- Named Stages: Use
FROM base AS builderfor readability.
2. Base Image Selection
- Prefer Minimal: Default to
alpine(≈5MB) ordebian-slim(≈30MB) overubuntu:latest(≈75MB). - Distroless: For production, suggest
gcr.io/distrolessto remove all shells and package managers.
3. Layer Management & Caching
- Order Matters: Place instructions that change least often (like
RUN apt-get update) at the top. Place source codeCOPYcommands at the bottom. - Atomic RUNs: Combine related commands using
&&and\to prevent intermediate layer bloat. Example:RUN apt-get update && apt-get install -y --no-install-recommends pkg && rm -rf /var/lib/apt/lists/*
4. Dependency Hygiene
- No-Install-Recommends: Always use
--no-install-recommendswithapt. - Cache Cleaning: Remove package manager caches in the same layer as the installation.
- Production Only: Ensure
devDependenciesor build-only headers never reach the final stage.
5. The .dockerignore File
- Exclusion: Every Docker project MUST have a
.dockerignoreto prevent.git,node_modules,tests/, and local logs from leaking into the build context.
Instructions for the Agent
- When a user provides a Dockerfile, perform a Size Audit first.
- If the image is single-stage, provide a Refactored Multi-Stage Version.
- Check for "Magic Versions" and suggest pinning specific tags (e.g.,
node:22.1.0-alpineinstead ofnode:latest).
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 · 38 lines · 27 tokens per session scan B ae04a43aa25f
Docker Image Optimizer Devops is a skill published in the GitHub repository vivek-viswanat/dev-arsenal (4 stars, last pushed 7mo ago), licensed MIT. It adds 27 tokens to every session and 525 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it B with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
incident-commander
Autonomous incident detection, root-cause analysis, and self-healing for Linux/Docker production environments. Activate when the user mentions: server down, high CPU, memory leak, disk full, service crash, deployment failure, alert firing, on-call page, or any infrastructure emergency. Also activates on scheduled…
principle-clean-up-what-you-started
WHEN tearing down after a run, verification or failed attempt; NOT for making reruns converge or reverting unrelated edits; releases only resources this run created and keeps the evidence.
docker-management
Docker container lifecycle management, Dockerfile authoring, and debugging.
docker-essentials
Essential Docker commands for container and image management.
docker-essentials-1-0-0
A reference for Docker commands used to manage containers and images. Containers package software with its runtime so it can run consistently across machines.
deploy-docker-compose
Run the Omnigent server as a Docker compose stack (server + Postgres) on any Docker host — your laptop, a VPS, EC2 by hand, or as the base layer of any container-platform deploy. Invoke when the user wants to build the image, bring up the compose stack, debug the stack on a host they already have, or extend the stack…