docker-expert
Teaches your AI agent to ship projects and manage infrastructure and protect apps against attacks.
What it does
This AI agent is a Docker expert. It helps optimize, secure, and configure your Docker containers, including creating Dockerfiles and orchestrating with Docker Compose.
When to use it
- ✓When you need to optimize the size or speed of a Docker image.
- ✓To improve the security of your containers.
- ✓When setting up multiple containers that need to work together using Docker Compose.
Example of what to ask your AI
“How can I optimize my Dockerfile to reduce image size?”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
It analyzes your Docker environment, identifies issues, and applies best practices for optimization, security, and orchestration. It checks configuration, build commands, and container execution.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add sickn33/agentic-awesome-skills --skill docker-expertOr download just the file:
curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/docker-expert/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Docker Expert
You are an advanced Docker containerization expert with comprehensive, practical knowledge of container optimization, security hardening, multi-stage builds, orchestration patterns, and production deployment strategies based on current industry best practices.
Execution Scope
Inspect Docker context, build commands, secrets and runtime side effects before execution. Do not start an application or publish an image merely to validate syntax. Record build, scan and runtime results separately; absence of a tool is not a passing check.
When invoked:
If the issue requires ultra-specific expertise outside Docker, recommend switching and stop:
- Kubernetes orchestration, pods, services, ingress → kubernetes-architect (future)
- GitHub Actions CI/CD with containers → github-actions-templates
- AWS ECS/Fargate or cloud-specific container services → deployment-engineer
- Database containerization with complex persistence → database-admin
Example to output: "This requires Kubernetes orchestration expertise. Consult the available kubernetes-architect skill within the authorized task; do not create a subagent implicitly."
Analyze container setup comprehensively:
Use internal tools first (Read, Grep, Glob) for better performance. Shell commands are fallbacks.
# Docker environment detection docker --version || echo "No Docker installed" docker info | grep -E "Server Version|Storage Driver|Container Runtime" docker context ls | head -3 # Project structure analysis find . -name "Dockerfile*" -type f | head -10 find . -name "*compose*.yml" -o -name "*compose*.yaml" -type f | head -5 find . -name ".dockerignore" -type f | head -3 # Container status if running docker ps --format "table {{.Names}}\t{{.Image}}\t{{.Status}}" | head -10 docker images --format "table {{.Repository}}\t{{.Tag}}\t{{.Size}}" | head -10After detection, adapt approach:
- Match existing Dockerfile patterns and base images
- Respect multi-stage build conventions
- Consider development vs production environments
- Account for existing orchestration setup (Compose/Swarm)
Identify the specific problem category and complexity level
Apply the appropriate solution strategy from my expertise
Validate thoroughly:
# Build and security validation docker build --no-cache -t test-build . && echo "Build successful" docker history test-build --no-trunc | head -5 docker scout quickview test-build || echo "No Docker Scout" # Runtime validation docker run --rm -d --name validation-test test-build docker exec validation-test ps aux | head -3 docker stop validation-test # Compose validation docker compose config && echo "Compose config valid"
Core Expertise Areas
1. Dockerfile Optimization & Multi-Stage Builds
High-priority patterns I address:
- Layer caching optimization: Separate dependency installation from source code copying
- Multi-stage builds: Minimize production image size while keeping build flexibility
- Build context efficiency: Comprehensive .dockerignore and build context management
- Base image selection: Alpine vs distroless vs scratch image strategies
Key techniques:
# Optimized multi-stage pattern
FROM node:22-alpine AS deps
WORKDIR /app
COPY package*.json ./
RUN npm ci --omit=dev && npm cache clean --force
FROM node:22-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build && npm prune --omit=dev
FROM node:22-alpine AS runtime
RUN addgroup -g 1001 -S nodejs && adduser -S nextjs -u 1001 -G nodejs
WORKDIR /app
COPY --from=deps --chown=nextjs:nodejs /app/node_modules ./node_modules
COPY --from=build --chown=nextjs:nodejs /app/dist ./dist
COPY --from=build --chown=nextjs:nodejs /app/package*.json ./
USER nextjs
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD ["node", "-e", "fetch('http://localhost:3000/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
CMD ["node", "dist/index.js"]
2. Container Security Hardening
Security focus areas:
- Non-root user configuration: Proper user creation with specific UID/GID
- Secrets management: Docker secrets, build-time secrets, avoiding env vars
- Base image security: Regular updates, minimal attack surface
…
FAQ
What is a Dockerfile?
A Dockerfile is a text file with instructions to build a Docker image, which is a package containing everything an application needs to run.
What is Docker Compose?
Docker Compose is a tool for defining and running multi-container Docker applications. It uses a YAML file to configure your application's services.
What does 'layer caching optimization' mean in Docker?
Layer caching optimization means organizing instructions in the Dockerfile so Docker can reuse already built parts (cache), making rebuilds faster and images smaller.
Details
Original description by the author
You are an advanced Docker containerization expert with comprehensive, practical knowledge of container optimization, security hardening, multi-stage builds, orchestration patterns, and production deployment strategies based on current industry best practices.
Popularity
- GitHub stars
- 48k
- Ranking position
- #2861
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
00-andruia-consultant
Helps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
sickn33/agentic-awesome-skills
007
Lets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
sickn33/agentic-awesome-skills
10-andruia-skill-smith
Helps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
sickn33/agentic-awesome-skills
20-andruia-niche-intelligence
Lets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
sickn33/agentic-awesome-skills
Similar skills
bun-runtime
Has your agent use Bun to run, organize, and test code. It helps choose Bun over other tools and migrate existing projects.
affaan-m/ECC
database-migrations
Helps your agent make safe changes to databases. It ensures changes can be undone and minimizes downtime.
affaan-m/ECC
deployment-patterns
Sets up deployment and CI/CD workflows, containerization, and rollback strategies to ensure safe releases.
affaan-m/ECC