From dockercraft
Use when a project needs a Dockerfile and .dockerignore with multi-stage builds, or when containerizing a Python, Node.js, Go, Rust, or Java project
How this skill is triggered — by the user, by Claude, or both
Slash command
/dockercraft:generating-dockerfileThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate optimized Dockerfile and .dockerignore by detecting project language(s) and applying best practices.
Generate optimized Dockerfile and .dockerignore by detecting project language(s) and applying best practices.
These apply to ALL languages:
Glob: pyproject.toml, requirements.txt, package.json, go.mod, Cargo.toml, pom.xml, build.gradle, Gemfile
| File Found | Language | Reference File |
|---|---|---|
pyproject.toml or requirements.txt | Python | references/python.md |
package.json | Node.js/React | references/nodejs.md |
go.mod | Go | references/go.md |
Cargo.toml | Rust | references/rust.md |
pom.xml or build.gradle | Java | references/java.md |
If ONE language detected:
If MULTIPLE languages detected (e.g., Python backend + React frontend):
Detected languages: Python, Node.js (React)
How should we containerize?
○ Monorepo (single Dockerfile with multi-stage for both)
○ Separate containers (Dockerfile.backend, Dockerfile.frontend)
○ Backend only (Python)
○ Frontend only (Node.js/React)
references/multi-language.md for merging strategiesIf no language files found:
Read references/dockerignore-template for the universal base. Append language-specific exclusions from the loaded language reference file.
Created Docker configuration:
Language(s) detected: {languages}
Reference(s) used: {reference_files}
Dockerfile
- Multi-stage build (builder + runtime)
- Dependency manager: {dep_manager}
- Non-root user configured
- Entry point: {entry_point}
.dockerignore
- Universal exclusions + {language}-specific
Commands:
docker build -t myapp . # Build image
docker run -p 8000:8000 myapp # Run container
Next steps:
- Use dockercraft:compose to generate docker-compose.yml
Read these based on detected language:
references/python.md - Python with uv, multi-stage, FastAPI/Flask patternsreferences/nodejs.md - Node.js with npm/yarn/pnpm, React/Next.js patternsreferences/go.md - Go with modules, static binary buildsreferences/rust.md - Rust with cargo, musl buildsreferences/java.md - Java with Maven/Gradle, JRE runtimereferences/multi-language.md - Strategies for combining languagesnpx claudepluginhub jugrajsingh/skillgarden --plugin dockercraftProvides CDSS development patterns for drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), and alert classification integrated into EMR workflows.