docker-expert · davila7 — Claude Code skill: what it does, how to install
The skill guides Claude Code in refining Dockerfiles, slimming down container images, and enforcing security practices.
npx claude-code-templates@latest --skill development/docker-expertWhat docker-expert does
The skill inspects local repositories for Dockerfile, Compose files, and .dockerignore configs. It prefers native file tools such as Read and Grep, falling back to shell checks like docker info. During multi-stage setup, it isolates dependency downloads from application source code so that Docker caches build steps properly.
Hardening rules receive heavy focus. The assistant defines non-root users with explicit UID and GID pairs, adds healthcheck declarations, and swaps plain environment variables for Docker secrets. Whenever a request steers into Kubernetes manifests, CI workflows, or cloud infrastructure, the skill halts and points to an appropriate subagent.
Post-build checks verify configuration changes with commands like docker build --no-cache and docker-compose config. Without a working Docker engine on the host, these runtime validation checks fail silently or return terminal warnings.
What it helps with
- Cut final image sizes using multi-stage builds and minimal base images
- Harden container permissions by creating dedicated non-root users
- Configure service health checks and dependency order inside docker-compose.yml
- Protect database credentials with Docker secrets instead of plain environment variables
Example prompts for the agent
- Rewrite this Dockerfile as a multi-stage build to minimize image size
- Secure the container runtime by adding a non-root user and health checks
- Set up a docker-compose.yml configuration with isolated networks and secret mounts
How to install docker-expert
1claude-code-templates
npx claude-code-templates@latest --skill development/docker-expert2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill docker-expert -a claude-code3Manually: put the files in place
~/.claude/skills/docker-expert/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/docker-expert/
Manually: put the files in place
.agents/skills/docker-expert/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/docker-expert/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates docker-expert2Manually: put the files in place
.github/skills/docker-expert/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/development/docker-expertManually: put the files in place
.devin/skills/docker-expert/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about docker-expert
How to install docker-expert in Claude Code?
You can install the skill in Claude Code by running npx claude-code-templates@latest --skill development/docker-expert. Alternatively, run npx skills add davila7/claude-code-templates --skill docker-expert -a claude-code.
What does docker-expert do?
It guides Claude Code through optimizing build layer caching, trimming container images, and setting up Docker Compose environments. It also enforces security measures like non-root UID assignment and secret mounts.
How does the skill handle tasks outside standard Docker setups?
If a prompt calls for Kubernetes orchestration, cloud services like AWS ECS, or CI pipelines, the skill stops immediately. It advises switching to a specialized expert instead of guessing the configuration.
Similar skills
All skills for DevOps and infrastructure →docker-expert by other authors comes first.