home / skills / ehtbanton / claudeskillsrepo / dockerignore-generator
This skill generates a complete .dockerignore file tailored to your project type, excluding unnecessary files to optimize Docker builds.
npx playbooks add skill ehtbanton/claudeskillsrepo --skill dockerignore-generatorReview the files below or copy the command above to add this skill to your agents.
---
name: dockerignore-generator
description: Generate .dockerignore files to exclude unnecessary files from Docker builds. Triggers on "create dockerignore", "generate docker ignore", "dockerignore for", "docker exclude files".
---
# Dockerignore Generator
Generate .dockerignore files to optimize Docker builds by excluding unnecessary files.
## Output Requirements
**File Output:** `.dockerignore`
**Format:** Docker ignore file syntax
**Standards:** Docker best practices
## When Invoked
Immediately generate a complete .dockerignore file appropriate for the project type.
## Example Invocations
**Prompt:** "Create dockerignore for Node.js project"
**Output:** Complete `.dockerignore` excluding node_modules, tests, docs.
This skill generates tailored .dockerignore files to speed up and shrink Docker builds by excluding unnecessary files and folders. It detects common project types and outputs a complete, standards-compliant .dockerignore ready to paste into the project root. The goal is practical, minimal ignore lists following Docker best practices to reduce image context size and build time.
On trigger phrases like "create dockerignore" or "dockerignore for <project>", the skill identifies the project type (Node.js, Python, Go, Java, etc.) from the prompt or provided files. It then creates a sensible .dockerignore using Docker ignore file syntax, excluding typical high-volume and transient paths (dependencies, build artifacts, editor files, tests) while preserving required sources. The output is a single .dockerignore file text formatted for immediate use.
Will the generated .dockerignore remove files needed at runtime?
No. The skill aims to exclude build-time and development artifacts only. It keeps source files and assets normally required by your Dockerfile, but always review before use.
Can I request a custom list of excludes?
Yes. Provide the project type or specific paths to exclude and the skill will incorporate those into the generated .dockerignore.