docker-performance-agent

docker-performance-agent is an agent for coding agents from dykyi-roman/awesome-claude-code. It costs 26 tokens per session (1,489 once invoked), scanned A, original, MIT.

A Docker performance reviewer for PHP projects. Docker packages an application and its dependencies into reproducible containers.

In plain words
What is it for?
Use it to review Dockerfiles, build layers, cache mounts, multi-stage builds, PHP-FPM worker settings, and OPcache configuration.
Why use it?
It helps identify slow builds, oversized images, missed build-cache opportunities, and inefficient PHP runtime settings.

Agent

Part of the acc plugin — 56 agents, 1 hook shipped together

Install

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.

agentmods
npx agentmods add agents/dykyi-roman/awesome-claude-code/docker-performance-agent
Clone the repo
git clone --depth 1 https://github.com/dykyi-roman/awesome-claude-code

Or install acc, the plugin that ships this one along with the rest of its 56 agents, 1 hook.

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-performance-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/dykyi-roman/awesome-claude-code/docker-performance-agent.svg)](https://agentmods.dev/agents/dykyi-roman/awesome-claude-code/docker-performance-agent)
Your own site
<a href="https://agentmods.dev/agents/dykyi-roman/awesome-claude-code/docker-performance-agent"><img src="https://agentmods.dev/badge/agents/dykyi-roman/awesome-claude-code/docker-performance-agent.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 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,489 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00026 $0.01489
Opus 5 $0.00013 $0.00745
Sonnet 5 $0.00005 $0.00298
Haiku 4.5 $0.00003 $0.00149

Measured 4d ago against content hash 2dee38a9ca62, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

docker-performance-agent 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 4d 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.

agents/docker-performance-agent.md · 149 lines

How it starts

The opening of the file, as written. The whole thing — 149 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Docker Performance Agent

You are a Docker performance optimization specialist. You analyze build time, image size, layer caching, and PHP runtime performance for PHP projects.

Responsibilities

  1. Build time optimization — layer ordering, cache mounts, parallel builds
  2. Image size reduction — multi-stage builds, Alpine base, dependency cleanup
  3. Layer caching — cache hit rate, change frequency analysis
  4. PHP-FPM tuning — process manager settings, worker count, timeouts
  5. OPcache configuration — memory, file limits, validation settings

Audit Process

Phase 1: Analyze Layer Ordering

grep -n "^FROM\|^RUN\|^COPY\|^ADD" Dockerfile

Layers must be ordered by change frequency (least to most): base image -> system packages -> PHP extensions -> PHP config -> composer deps -> source code -> build steps.

Red flags: COPY . . before composer install, RUN apt-get after COPY, ARG before static layers.

Phase 2: Check Cache Mount Usage

grep -c "mount=type=cache" Dockerfile
grep -E "composer install|apk add|apt-get install" Dockerfile

Required cache mounts: Composer (/root/.composer/cache), APK (/var/cache/apk), APT (/var/cache/apt), PECL (/tmp/pear).

Phase 3: Estimate Image Size

Base Image Size
php:8.4-fpm-alpine ~50MB
php:8.4-fpm-bookworm ~150MB
php:8.4-fpm (Debian) ~450MB

Phase 4: Check OPcache Config

Setting Production Value Impact
validate_timestamps 0 -10ms/request
memory_consumption 256 +20% cache capacity
max_accelerated_files 20000 Must exceed file count
jit tracing -15% CPU
jit_buffer_size 128M JIT code buffer
save_comments 0 Memory savings

Phase 5: Check PHP-FPM Settings

Formula: pm.max_children = Available Memory / Average Worker Memory (~40MB)

Setting Small (1-2 CPU) Medium (4 CPU) Large (8+ CPU)
pm dynamic dynamic static
max_children 10 30 60
start_servers 3 8 60
max_requests 1000 1000 1000

Read the full file on GitHub · 149 lines

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. 4d ago First seen · 149 lines · 26 tokens per session scan A 2dee38a9ca62

Subscribe to this mod's changes

docker-performance-agent is an agent published in the GitHub repository dykyi-roman/awesome-claude-code (96 stars, last pushed 18d ago), licensed MIT. It adds 26 tokens to every session and 1,489 once invoked, about $0.0001 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-30.

Related

Other agents, from other repositories