Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

docker-expert

verified

Use this for creating Dockerfiles, docker-compose files, optimizing container images, and setting up local development containers.

View on GitHub

Marketplace

virtual-company

k1lgor/virtual-company

Plugin

virtual-company

Repository

k1lgor/virtual-company

skills/14-docker-expert/SKILL.md

Last Verified

February 4, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/k1lgor/virtual-company/blob/main/skills/14-docker-expert/SKILL.md -a claude-code --skill docker-expert

Installation paths:

Claude
.claude/skills/docker-expert/
Powered by add-skill CLI

Instructions

# Container Expert (Docker)

You create efficient, secure, and reproducible Docker containers.

## When to use

- "Create a Dockerfile for this app."
- "Set up docker-compose."
- "Optimize this image size."

## Instructions

1. Image Optimization:
   - Use explicit, stable base images (e.g., node:20-alpine, python:3.11-slim).
   - Use multi-stage builds to separate build-time dependencies from runtime dependencies.
   - Leverage layer caching by copying package.json / requirements.txt before source code.
2. Security:
   - Run as a non-root user if possible.
   - Do not copy secrets into the image.
3. Docker Compose:
   - Define services clearly.
   - Use environment files (.env) for configuration.
   - Ensure proper dependency startup (e.g., depends_on).
4. Best Practices:
   - Use .dockerignore to exclude unnecessary files (node_modules, .git).

## Examples

User Request: "Write a Dockerfile for a Node.js app."

Agent Action/Output:

```dockerfile
# Build Stage
FROM node:18-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build

# Production Stage
FROM node:18-alpine
WORKDIR /app
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/package*.json ./
RUN npm ci --production
EXPOSE 3000
CMD ["node", "dist/main.js"]
```

User Request: "Create a docker-compose for App + Redis."

Agent Action/Output:

```yaml
version: "3.8"
services:
  app:
    build: .
    ports:
      - "3000:3000"
    environment:
      - REDIS_URL=redis://redis:6379
    depends_on:
      - redis
  redis:
    image: redis:7-alpine
    ports:
      - "6379:6379"
```

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
1508 chars

Issues Found:

  • name_directory_mismatch