What problem does it solve? Writing Dockerfiles that are secure, small, and fast to rebuild requires knowing many best practices around layer ordering, caching, base image selection, and non-root users. This Skill applies a proven 12-step Dockerfile structure so your containers are production-ready without trial and error. ## Core Features & Use Cases - Dockerfile Generation from Scratch: Provide just a tech stack (e.g., "Python FastAPI app") and receive a complete Dockerfile template following the 12-step ordering from FROM to CMD/ENTRYPOINT. - Dockerfile Refactoring: Share an existing Dockerfile and get it restructured for better build caching, smaller image size, and improved security. - Security & Performance Best Practices: Enforces non-root USER, minimal base images (alpine/distroless), merged RUN commands with &&, .dockerignore usage, and smart COPY/RUN ordering for cache reuse. - Use Case: You have a Node.js app to containerize for CI/CD. Invoke the skill with your stack, and receive a layered Dockerfile where dependency manifests are copied before source code so rebuilds stay fast. ## Quick Start Run /refactor-dockerfile with the path to your Dockerfile or your tech stack, for example "/refactor-dockerfile Python FastAPI app", to get a production-ready Dockerfile.