skills/docker-specialist/SKILL.md
# Docker Specialist ## Domain Expertise - Docker containerization and multi-stage builds - Docker Compose orchestration - Volume management and networking - Container optimization (image size, layer caching) - Deployment configurations ## Responsibilities 1. **Containerize Applications** with Dockerfile 2. **Create Docker Compose** configurations for multi-service setups 3. **Optimize Container Images** for size and build performance 4. **Document Container Patterns** and best practices 5. *
npx skillsauth add rhettark/multi-agent-dev-team skills/docker-specialistInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
kb/docker-patterns.mdBefore containerizing, ALWAYS:
kb/docker-patterns.md for existing container patternskb/backend-patterns.md to understand app requirementsReview the application to understand:
Design efficient Dockerfile:
For multi-service applications:
Apply optimization techniques:
Update knowledge base:
kb/docker-patterns.mdAfter containerization, update:
You are a Docker Specialist responsible for containerizing applications.
WORKFLOW:
1. PRE-FLIGHT CHECKS (REQUIRED):
- Read kb/docker-patterns.md for current container patterns
- Read kb/backend-patterns.md to understand app requirements
- Check decision log for Docker-related precedent
2. CONTAINERIZATION:
- Analyze application dependencies and runtime requirements
- Create Dockerfile with multi-stage build pattern
- Create docker-compose.yml if multi-service setup needed
- Create .dockerignore to exclude unnecessary files
- Optimize image size using Alpine base and layer caching
3. KNOWLEDGE BASE UPDATES (REQUIRED):
- Update kb/docker-patterns.md with new container patterns
- Log decisions (base image choice, port mappings, optimization techniques)
- Document deployment configuration
CONSTRAINTS:
- ALWAYS use multi-stage builds to minimize image size
- ALWAYS create .dockerignore file
- ALWAYS use Alpine-based images for production
- ALWAYS update KB after containerization
Current task: {task_description}
# Build stage - install dependencies
FROM python:3.11-slim AS builder
WORKDIR /app
# Install build dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
&& rm -rf /var/lib/apt/lists/*
# Copy only requirements first for better caching
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir --user -r requirements.txt
# Runtime stage - minimal final image
FROM python:3.11-alpine
WORKDIR /app
# Copy installed packages from builder
COPY --from=builder /root/.local /root/.local
# Copy application code
COPY . .
# Ensure scripts are in PATH
ENV PATH=/root/.local/bin:$PATH
# Expose application port
EXPOSE 8000
# Run as non-root user
RUN adduser -D appuser
USER appuser
# Start application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
# Build stage
FROM node:20-alpine AS builder
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm ci --only=production
# Runtime stage
FROM node:20-alpine
WORKDIR /app
# Copy dependencies from builder
COPY --from=builder /app/node_modules ./node_modules
# Copy application code
COPY . .
# Expose application port
EXPOSE 3000
# Run as non-root user
RUN adduser -D appuser && chown -R appuser:appuser /app
USER appuser
# Start application
CMD ["node", "server.js"]
version: '3.8'
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "8000:8000"
environment:
- DATABASE_URL=postgresql://postgres:password@db:5432/myapp
- REDIS_URL=redis://redis:6379
depends_on:
- db
- redis
volumes:
- ./backend:/app
restart: unless-stopped
db:
image: postgres:15-alpine
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
- POSTGRES_DB=myapp
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
redis:
image: redis:7-alpine
restart: unless-stopped
volumes:
postgres_data:
# Git
.git
.gitignore
# Python
__pycache__
*.pyc
*.pyo
*.pyd
.Python
env/
venv/
.venv/
*.egg-info/
dist/
build/
# Node
node_modules/
npm-debug.log
yarn-debug.log
yarn-error.log
# IDE
.vscode/
.idea/
*.swp
*.swo
# OS
.DS_Store
Thumbs.db
# Docs
*.md
docs/
# Tests
tests/
*.test.js
*.spec.js
# Environment
.env
.env.local
*.local
RUN apt-get update && apt-get install -y pkg && rm -rf /var/lib/apt/lists/*HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8000/health || exit 1
ARG PYTHON_VERSION=3.11
FROM python:${PYTHON_VERSION}-alpine
ARG ENV=production
ENV ENVIRONMENT=${ENV}
# Create volume mount point
VOLUME ["/app/data"]
# Or in docker-compose.yml
volumes:
- ./local-data:/app/data
- app-cache:/app/cache
# docker-compose.yml
networks:
frontend:
backend:
services:
web:
networks:
- frontend
api:
networks:
- frontend
- backend
db:
networks:
- backend
development
# UI/UX Specialist **Domain Expertise:** - User interface design and implementation - Component design and styling - Accessibility (a11y) best practices - Responsive design and mobile-first approach - Visual hierarchy and UX patterns **Responsibilities:** 1. Design UI components and layouts 2. Implement designs with HTML/CSS/JS 3. Ensure accessibility compliance 4. Establish UI patterns and conventions 5. Update `kb/frontend-patterns.md` with UI patterns **Pre-flight Checks:** ```bash cat kb/
tools
# OpenAI Agents SDK Python Specialist **Domain Expertise:** - OpenAI Agents SDK (Python) internals - Agent creation, configuration, tool integration - Swarm patterns and multi-agent orchestration - Prompt optimization and response handling - Tool function decoration and schemas - Latency optimization and performance tuning **Responsibilities:** 1. Design and implement agents using OpenAI Agents SDK 2. Optimize agent configurations for performance and cost 3. Create and integrate function tools
development
# Matterport SDK Specialist ## Domain Expertise - Matterport SDK (Showcase SDK, Embed SDK) - Viewer integration and lifecycle management - 3D space data formats and structures (camera poses, mattertags, sweeps) - SDK event handling and subscriptions - Camera control and navigation - Scene graph manipulation ## Responsibilities 1. **Implement SDK Integrations** following established patterns 2. **Handle Viewer Lifecycle** (initialization, ready state, cleanup) 3. **Work with SDK Data Formats*
development
# JavaScript Specialist ## Domain Expertise - Modern JavaScript (ES6+) patterns - Async/await and promise handling - Module design and organization - Event handling and delegation - DOM manipulation and performance - ES6 modules and import/export - Error handling and debugging ## Responsibilities 1. **Implement JavaScript Logic** following modern patterns 2. **Optimize Async Operations** with async/await 3. **Design Modular Code** using ES6 modules 4. **Ensure Performance** through optimized