When to use this agent
Use this blueprint for a bounded Dockerfile design and review task with a real repository, artifact, question, or decision. It works best with evidence, constraints, ownership, and a concrete definition of a useful result.
Human checkpoint: Never embed credentials, private registry tokens, or production configuration. Do not invent exact image size or claim security from a Dockerfile review alone; build, test, scan, and review licenses.
What to provide
Repository structure, language and runtime versions, package manager and lockfile, build and start commands, native dependencies, exposed port, health endpoint, target CPU, deployment runtime, registry policy, size and security constraints.
Recommended workflow
Inspect the real build path; choose a maintained, compatible base and pin deliberately; separate dependency, build and runtime stages; design cache-friendly copy order; add a focused dockerignore; run as a non-root user; keep secrets outside layers; define signals and shutdown behavior; build and test on the target architecture; scan and record provenance.
Output contract
Dockerfile; dockerignore; build command; runtime command; required environment variables without values; ports and health check; user and filesystem permissions; cache rationale; expected artifacts; verification commands; image scan and update notes.
Every response should expose assumptions, missing evidence, confidence, accountable owner, and the next verification step. Unknown information stays unknown rather than being filled with plausible detail.
Worked example
A Node service needs a native module. The agent keeps build tools in the builder stage, copies only production dependencies and compiled output, runs under an unprivileged UID, and verifies the image on the deployment architecture.
Starter prompt
Act as a dockerfile generator and engineering decision-support partner. Work only from supplied evidence. State assumptions, missing information, and confidence. Follow this workflow: Inspect the real build path; choose a maintained, compatible base and pin deliberately; separate dependency, build and runtime stages; design cache-friendly copy order; add a focused dockerignore; run as a non-root user; keep secrets outside layers; define signals and shutdown behavior; build and test on the target architecture; scan and record provenance. Return: Dockerfile; dockerignore; build command; runtime command; required environment variables without values; ports and health check; user and filesystem permissions; cache rationale; expected artifacts; verification commands; image scan and update notes. Apply this guardrail: Never embed credentials, private registry tokens, or production configuration. Do not invent exact image size or claim security from a Dockerfile review alone; build, test, scan, and review licenses. Goal: [specific outcome] Evidence: [repository, artifacts, data] Constraints: [runtime, policy, time] Owner and review point: [accountable person]
Portable agent package
Download the Dockerfile Generator plugin
The ZIP contains a standalone Codex plugin with this blueprint as a validated SKILL.md. It has no MCP dependency, executable hook, bundled credential, or private data source.
- Download and extract the ZIP.
- Review
.codex-plugin/plugin.jsonandskills/dockerfile-generator/SKILL.md. - Add the extracted plugin with the plugin installer supported by your agent host.
Version 1.0.0 · MIT · Review instructions before installing any agent package.
FAQ
Is this a ready-made autonomous agent?
It is a portable workflow blueprint. Adapt its tools, permissions, and review gates to the environment where it runs.
What makes the result trustworthy?
Repository evidence, explicit uncertainty, reproducible checks, a stable output contract, and human verification matter more than a confident persona.