ldaume/agentic-engineering-harness/multi-stage-dockerfile
Claude Code and agent skill by ldaume/agentic-engineering-harness
- community
Checking that the SKILL.md file is still in the repository.
Creates and reviews secure, cache-friendly multi-stage Dockerfiles for Node, web, backend, and static-site projects. Use when writing Dockerfiles, optimizing image size, separating build/runtime stages, hardening containers, fixing slow Docker builds, or preparing production images.
Install
npx vskill@latest install ldaume/agentic-engineering-harness/multi-stage-dockerfileSKILL.md
The same SKILL.md was published earlier as ldaume/agentic-engineering-harness/multi-stage-dockerfile.
Multi-Stage Dockerfile
Use this for production-oriented Dockerfiles where build dependencies, runtime dependencies, security, and cache behavior should be explicit.
Project Fit Check
Before writing a Dockerfile:
- Detect runtime, package manager, lockfile, build output, server command, and
required native dependencies.
- Read existing Dockerfiles, compose files, CI image build jobs, and deployment
docs.
- Preserve the project's base-image policy, registry, and runtime user model.
- Do not introduce Alpine, distroless, rootless, or monorepo pruning patterns
without checking framework/native dependency compatibility.
- If the image is deployed by CI, align build args, secrets, labels, and tags
with that pipeline.
Structure
Default shape:
base: shared runtime image and environmentdeps: install dependencies from lockfilebuild: copy source and build artifactsruntime: copy only runtime files and run as non-root when possible
Keep dependency install before source copy so source changes do not invalidate the dependency cache.
Rules
- Use the lockfile with the matching package manager.
- Copy only needed files between stages.
- Keep build secrets out of final layers.
- Use
.dockerignoreto excludenode_modules, build output, VCS metadata,
local env files, and caches.
- Prefer explicit
CMDand documentedEXPOSE. - Use health checks only when the deployment platform respects them.
- Add OCI labels if the registry/deploy process uses them.
Security
- Avoid root in the final image when the runtime allows it.
- Never bake
.env, tokens, SSH keys, or registry credentials into layers. - Keep package manager caches out of the final image.
- Pin base image by digest when supply-chain policy requires reproducibility.
- Rebuild regularly for base image security patches.
Verification
For web services, run the container and hit a health or homepage route.
Red Flags
- one-stage image with compilers and dev dependencies in production
COPY . .before dependency install- missing
.dockerignore - final image runs as root without a reason
- secrets passed via
ARGand kept in image history - container command differs from documented deploy command
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/infrastructure/multi-stage-dockerfile/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ldaume/agentic-engineering-harness/multi-stage-dockerfile)