mcp-comfyui-flux: Agent for Claude Code

.claude/agents/docker-optimization-specialist.md

docker-optimization-specialist is an agent for Claude Code from dhofheinz/mcp-comfyui-flux. It costs 287 tokens per session (1,015 once invoked), scanned A, original, MIT.

A specialist coding agent for creating, reviewing, and improving Docker configurations. Docker packages an application and its dependencies into a container that can run consistently in different environments.

In plain words
What is it for?
Use it to write or review Dockerfiles, split builds into stages, improve caching, reduce image size, harden security, and troubleshoot containers.
Why use it?
It helps address oversized images, slow builds, insecure settings, and container deployment problems.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is dhofheinz/mcp-comfyui-flux's own configuration. It tells Claude Code how to work on mcp-comfyui-flux itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything mcp-comfyui-flux configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/dhofheinz/mcp-comfyui-flux/main/.claude/agents/docker-optimization-specialist.md
Clone the repo
git clone --depth 1 https://github.com/dhofheinz/mcp-comfyui-flux

Made for: Claude Code.

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 docker-optimization-specialist

README.md
[![agentmods](https://agentmods.dev/badge/agents/dhofheinz/mcp-comfyui-flux/docker-optimization-specialist/github.svg)](https://agentmods.dev/agents/dhofheinz/mcp-comfyui-flux/docker-optimization-specialist)
Your own site
<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.

agentmods 80×15 button for docker-optimization-specialist

Your own site · 80×15
<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>
Per session 287 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,015 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.00287 $0.01015
Opus 5 $0.00143 $0.00508
Sonnet 5 $0.00057 $0.00203
Haiku 4.5 $0.00029 $0.00102

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

Security

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.

.claude/agents/docker-optimization-specialist.md · 85 lines

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:

  1. Analyze Requirements First: Identify the application stack, dependencies, runtime requirements, and production constraints before proposing solutions.

  2. 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)
  3. 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
  4. 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
  5. 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:

  1. Specific size reduction estimates
  2. Build time improvement predictions
  3. Security vulnerability assessment
  4. Line-by-line optimization suggestions
  5. 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.

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. 12d ago First seen · 85 lines · 0 tokens per session scan A 592a4f3bee85

Subscribe to this mod's changes

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.

Related

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.

codewithmukesh/dotnet-claude-kit · 64 tokens

devops-engineer

Handles deployment configs, CI/CD pipelines, Docker, infrastructure, and cloud operations. Use for deployment reviews and infrastructure tasks.

faizkhairi/claude-code-blueprint · 29 tokens

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.

PMDevSolutions/Aurelius · 44 tokens

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.

pwdev-solucoes/pwdev-claude-marketplace · 74 tokens

helm-agent

Executing agent. Writes and maintains Helm charts: Chart.yaml, templates/, values.yaml, helpers. Scope: davinci/kubernetes/apps/helm/, /Chart.yaml, /values.yaml.

alexeyshishin/as-skill · 44 tokens

deployment-verifier

Verifies local deployment health — checks ports, starts app, polls health endpoint, inspects Docker containers.

asysta-act/agent-flow · 24 tokens