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/arjunprabhulal/devops-skills/image-optimizationnpx skills add arjunprabhulal/devops-skills --skill image-optimizationgit clone --depth 1 https://github.com/arjunprabhulal/devops-skillsWrote 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/arjunprabhulal/devops-skills/image-optimization)<a href="https://agentmods.dev/skills/arjunprabhulal/devops-skills/image-optimization"><img src="https://agentmods.dev/badge/skills/arjunprabhulal/devops-skills/image-optimization.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 | $0.00114 | $0.01201 |
| Opus 5 | $0.00057 | $0.00600 |
| Sonnet 5 | $0.00023 | $0.00240 |
| Haiku 4.5 | $0.00011 | $0.00120 |
Grade C, and why
image-optimization scanned grade C with 2 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 3d 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 deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
&& rm -rf /var/lib/apt/lists/* Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
RUN apt-get update && apt-get install -y --no-install-recommends curl \ How it starts
The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Image Optimization
Size and build time are the same problem viewed from two angles: both come from carrying more into the image, and into the build, than the running application needs. A slow build is usually a large one — the layers you push are the layers a runner had to pull, unpack, and cache too.
Optimize by removing, not by compressing after the fact. The fastest layer to pull is the one that was never built.
1. Choose the smallest base that still lets you debug
scratch and distroless bases produce the smallest, lowest-attack-surface images, but they ship
without a shell — a production incident that needs exec-ing in becomes much harder. A
distro-based "slim" variant is usually the right default: small enough to matter, still
debuggable. Reserve scratch for statically-linked binaries (Go, Rust) where you genuinely never
need a shell inside the container, and keep a debug-variant image or an ephemeral debug container
available as a sidecar for when you do.
- Default to
-slimor distroless for interpreted-language runtimes. - Use
scratchonly for fully static binaries with no runtime dependency on libc or a shell. - Keep a debug path (ephemeral containers, sidecar) rather than adding shell tools "just in case."
Done when: the base is the smallest variant that still supports your actual debugging workflow.
2. Collapse and reorder layers deliberately
Every RUN, COPY, and ADD is a layer, and layers do not shrink when a later layer deletes
their contents — deleting a file in layer 5 does not reclaim the space it took in layer 3. Chain
related commands with && so temporary files never persist as their own layer, and clean package
manager caches in the same RUN that created them:
RUN apt-get update && apt-get install -y --no-install-recommends curl \
&& rm -rf /var/lib/apt/lists/*
Layer order still matters for cache reuse (see containerization), but here the goal is layer
count and content — fewer, tighter layers pull and unpack faster regardless of cache state.
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.
- 3d ago First seen · 98 lines · 114 tokens per session scan C d8ddb46d3437
image-optimization is a skill published in the GitHub repository arjunprabhulal/devops-skills (2 stars, last pushed 9d ago), licensed MIT. It adds 114 tokens to every session and 1,201 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
google-mobile-ads-android-migrate-to-next-gen
Migrates Android applications from the old, legacy Google Mobile Ads (GMA) SDK (com.google.android.gms:play-services-ads) to the new GMA Next-Gen SDK (com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk). Provides comprehensive mapping tables for imports, classes, and method signatures to help determine…
agent-platform-inference
Connects to and performs inference with Google Cloud Agent Platform GenAI models, including First-Party Gemini models and Third-Party OpenMaaS models (Llama, DeepSeek, Qwen, etc.). Use when asked to perform inference, ask a model a question, run a test prompt, execute chat completions, or generate code for calling…
agent-platform-deploy
Deploy open models or custom weights from Model Garden to Agent Platform endpoints, check the status of an in-progress deployment operation, or clean up resources by undeploying models and deleting endpoints. Use when asked to actively deploy a model, list the Model Garden CATALOG of available models, check if a…
agent-platform-eval-flywheel
Measures and improves the quality of AI models and agents on Google Cloud using the Eval Quality Flywheel methodology. Use when evaluating an agent or model, building an eval dataset, picking or writing evaluation metrics, analyzing failures, comparing results before and after a fix, or when guidance is needed on…
agent-platform-tuning
Agent Platform Model Tuning. Use when you need to fine-tune open models or Gemini models using Agent Platform infrastructure. Don't use for model training outside Agent Platform, model deployment to endpoints (use agent-platform-deploy), or managing serving endpoints (use agent-platform-endpoint-management).
agent-platform-alert-configuration
Configures best-practice alerting policies for AI agents using OpenTelemetry (OTel) metrics, generating output as Terraform (.tf) configuration files. Use when analyzing, writing, or deploying alerting policies to monitor agent latency, error rates, token usage, and quality metrics. Don't use for standard…