Skip to content
Development
Skill

/dockerfile

Generate an optimized Dockerfile — multi-stage build, security hardening, small image size.

From plugin
agentic-awesome-kits
1032 skills

Claude Code

$ npx -y skills add KhaiTrang1995/agentic-awesome-kits --skill dockerfile --agent claude-code

SKILL.md

dockerfile.SKILL.md
name: dockerfile
description: Generate an optimized Dockerfile — multi-stage build, security hardening, small image size.
user-invocable: true
argument-hint: "<stack> [--prod] [--dev]"

/dockerfile — Generate a Dockerfile

Input examples

/dockerfile .NET 10 Minimal API --prod
/dockerfile Angular 20 nginx --prod
/dockerfile Python FastAPI
/dockerfile Go service --prod
/dockerfile --dev fullstack .NET + Angular (docker-compose dev)

Process

1. Detect the stack → pick the right base image 2. Multi-stage build: build stage → runtime stage 3. Security hardening 4. L1 approval → Write

Mandatory rules

  • **Multi-stage build** — separate build and runtime
  • **Non-root user** — NEVER run the container as root
  • **Specific tag** — `mcr.microsoft.com/dotnet/aspnet:10.0-alpine`, NEVER `latest`
  • **COPY before RUN** — leverage layer caching (copy csproj/package.json first, restore, then copy source)
  • **.dockerignore** — exclude bin/, obj/, node_modules/, .git/
  • **HEALTHCHECK** — mandatory for production
  • **NEVER hardcode** secrets/connection strings — use env vars
  • **Alpine-based** whenever possible (small image size)

Output

Dockerfile
.dockerignore

References

  • @.claude/rules/docker-conventions.md
@khaitrang1995
Ships withagentic-awesome-kits

Reusable AI Skill Kits for coding agents (Claude Code and any other subagent/slash-command-compatible tool).

Stars on GitHub

Momentum

stars in total
10
Star history of KhaiTrang1995/agentic-awesome-kits on GitHub, a chart by star-history.com

Other skills on agentic-awesome-kits.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc13d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about dockerfile.

Which coding agents can use dockerfile?
dockerfile installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.