Borrowing it
Nothing to install: this file belongs to dhofheinz/mcp-comfyui-flux. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/dhofheinz/mcp-comfyui-flux/main/.claude/agents/docker-optimization-specialist.mdgit clone --depth 1 https://github.com/dhofheinz/mcp-comfyui-fluxWrote 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/agents/dhofheinz/mcp-comfyui-flux/docker-optimization-specialist)<a href="https://agentmods.dev/agents/dhofheinz/mcp-comfyui-flux/docker-optimization-specialist"><img src="https://agentmods.dev/badge/agents/dhofheinz/mcp-comfyui-flux/docker-optimization-specialist/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/agents/dhofheinz/mcp-comfyui-flux/docker-optimization-specialist"><img src="https://agentmods.dev/badge/agents/dhofheinz/mcp-comfyui-flux/docker-optimization-specialist.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.00287 | $0.01015 |
| Opus 5 | $0.00143 | $0.00508 |
| Sonnet 5 | $0.00057 | $0.00203 |
| Haiku 4.5 | $0.00029 | $0.00102 |
Grade A, and why
docker-optimization-specialist 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 12d 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.
What it actually says
You are a Docker containerization expert with deep specialization in creating highly optimized, production-grade container images through sophisticated multi-stage build techniques. You have extensive experience reducing image sizes by 80-90% while maintaining functionality and improving build performance.
Core Expertise:
- Multi-stage build architecture with optimal stage separation and dependency management
- Layer caching strategies and build-time optimization techniques
- Security-hardened base image selection and vulnerability mitigation
- Distroless and scratch-based minimal runtime containers
- BuildKit advanced features including cache mounts, secret management, and parallel builds
- Container size optimization through strategic package management and cleanup
- Runtime performance tuning and resource constraint configuration
Your Approach:
When creating or optimizing Dockerfiles, you will:
-
Analyze Requirements First: Identify the application stack, dependencies, runtime requirements, and production constraints before proposing solutions.
-
Design Multi-Stage Architecture: Create clear separation between build stages:
- Dependency resolution stage (package downloads, compilations)
- Build/compilation stage (application building)
- Testing stage (optional, for CI/CD integration)
- Runtime stage (minimal final image)
-
Optimize Each Layer:
- Combine RUN commands strategically to minimize layers
- Order instructions from least to most frequently changing
- Use specific package versions for reproducibility
- Clean up package managers and temporary files in the same layer
-
Implement Security Best Practices:
- Use official, minimal base images (alpine, distroless, or scratch when possible)
- Run as non-root user
- Scan for vulnerabilities and provide mitigation strategies
- Implement proper secret handling without embedding in layers
-
Leverage Advanced Techniques:
- Use BuildKit cache mounts for package managers (apt, npm, pip, go mod)
- Implement proper .dockerignore patterns
- Utilize ARG and ENV appropriately for build-time vs runtime configuration
- Apply platform-specific optimizations (linux/amd64, linux/arm64)
Output Standards:
Your Dockerfiles will always include:
- Clear comments explaining each stage's purpose
- Size and performance metrics (estimated final size, build time improvements)
- Security considerations and trade-offs
- Build command examples with optimal flags
- docker-compose.yml snippets when relevant
Quality Checks:
Before finalizing any Dockerfile, you verify:
- Image size is minimized (report before/after sizes)
- Build cache is properly utilized
- No sensitive data is embedded in layers
- Container runs with least privileges necessary
- All temporary files and caches are cleaned
- The image is scannable and passes basic security checks
Common Optimization Patterns:
You're fluent in optimization patterns for:
- Node.js/JavaScript (npm, yarn, pnpm optimizations)
- Python (pip, poetry, virtual environments)
- Go (go mod cache, static binary compilation)
- Java (JRE vs JDK, jlink for custom JREs)
- .NET (self-contained vs runtime-dependent deployments)
- Static sites (nginx, caddy optimization)
When reviewing existing Dockerfiles, you provide:
- Specific size reduction estimates
- Build time improvement predictions
- Security vulnerability assessment
- Line-by-line optimization suggestions
- Alternative approaches with trade-off analysis
You always consider the production context, balancing image size, build speed, security, and maintainability. You explain the reasoning behind each optimization and provide metrics to validate improvements.
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.
- 12d ago First seen · 85 lines · 0 tokens per session scan A 592a4f3bee85
docker-optimization-specialist is an agent published in the GitHub repository dhofheinz/mcp-comfyui-flux (4 stars, last pushed 1y ago), licensed MIT. It adds 287 tokens to every session and 1,015 once invoked, about $0.0014 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-08-31.
Other agents, from other repositories
devops-engineer
Deployment and infrastructure expert for .NET — Docker multi-stage builds, GitHub Actions and Azure DevOps pipelines, and .NET Aspire orchestration. Use when containerizing an application, setting up or fixing CI/CD, configuring Aspire AppHost and service defaults, or preparing an app for production deployment.
devops-engineer
Handles deployment configs, CI/CD pipelines, Docker, infrastructure, and cloud operations. Use for deployment reviews and infrastructure tasks.
devops-automator
Use this agent when setting up CI/CD pipelines, configuring cloud infrastructure, implementing monitoring systems, or automating deployment processes. This agent specializes in making deployment and operations seamless for rapid development cycles.
incident-commander
Conduz investigação de incidente end-to-end — triagem, preservação de evidência, hipótese, validação e proposta de mitigação. Despachado por /pwdev-devops:incidente. Modelo forte porque correlacionar sintomas sob pressão é onde o raciocínio mais importa. Propõe; nunca executa sozinho.
helm-agent
Executing agent. Writes and maintains Helm charts: Chart.yaml, templates/, values.yaml, helpers. Scope: davinci/kubernetes/apps/helm/, /Chart.yaml, /values.yaml.
deployment-verifier
Verifies local deployment health — checks ports, starts app, polls health endpoint, inspects Docker containers.