Creates blueprint-driven skills for infrastructure and deployment tasks...
This skill creates infrastructure skills that bundle blueprints (reusable templates and patterns) with impact analysis (understanding what changes when containerizing/deploying). It ensures deployment skills don't just generate configsβthey understand and document the full impact.
Traditional approach (fragile):
Request: "Create a Dockerfile"
Result: Generic Dockerfile that breaks in production
Blueprint-driven approach (robust):
Request: "Create a Dockerfile"
Process:
1. Analyze project for containerization requirements
2. Identify environment variables (build-time vs runtime)
3. Map localhost references β Docker service names
4. Check auth/CORS origins for container network
5. Generate Dockerfile with documented gotchas
6. Create docker-compose with proper networking
Identify what infrastructure domain the skill covers:
| Domain | Examples | Key Concerns |
|---|---|---|
| Containerization | Dockerfiles, docker-compose | Env vars, networking, multi-stage builds |
| Orchestration | Helm, Kubernetes manifests | Service discovery, secrets, resource limits |
| CI/CD | GitHub Actions, pipelines | Build vs deploy stages, secrets injection |
| Event Systems | Kafka, Dapr | Topics, schemas, authentication |
Before creating any blueprint, analyze the target project:
Scan for:
βββ .env files β What variables exist?
βββ process.env / os.environ usage β What's expected at runtime?
βββ Build-time variables β NEXT_PUBLIC_*, ARG in Dockerfiles
βββ Sensitive values β API keys, secrets, connection strings
Identify:
βββ localhost references β Must become service names
βββ Port bindings β What ports are exposed?
βββ Service dependencies β What talks to what?
βββ External services β Databases, APIs, auth providers
Critical for SSO/Better Auth:
Check auth configuration for:
βββ Allowed origins β Must include Docker service names
βββ Callback URLs β localhost:3000 β web:3000
βββ API URLs β localhost:8000 β api:8000
βββ NODE_ENV behavior β Some features disabled in production
Common gotcha:
// better-auth config - WILL BREAK in Docker if not updated
trustedOrigins: [
"http://localhost:3000", // Works locally
// MISSING: "http://web:3000" // Needed for Docker
// MISSING: "http://frontend:3000" // Needed for K8s
]
Initialize using skill-creator:
python3 .claude/skills/engineering/skill-creator/scripts/init_skill.py \
<skill-name> --path .claude/skills/engineering/
Organize with blueprints:
.claude/skills/engineering/<skill-name>/
βββ SKILL.md # Instructions + impact analysis guidance
βββ references/ # Blueprint documentation
β βββ patterns.md # Common patterns and when to use them
β βββ impact-checklist.md # What to check before containerizing
β βββ gotchas.md # Known issues and solutions
βββ assets/ # Template files
βββ Dockerfile.template # Base template
βββ docker-compose.template # Compose template
βββ .env.example # Environment template
Each reference file should include:
Pattern documentation (references/patterns.md):
# Pattern: Multi-Stage Build
## When to Use
- Production deployments
- When image size matters
- When build dependencies differ from runtime
## Template
[Include actual template code]
## Variables to Replace
- `{{BASE_IMAGE}}` - Base image (e.g., python:3.13-slim)
- `{{APP_MODULE}}` - Entry point (e.g., main:app)
- `{{PORT}}` - Exposed port
## Impact Notes
- Build-time ARGs are baked in - cannot change at runtime
- Use ENV for runtime configuration
Impact checklist (references/impact-checklist.md):
# Pre-Containerization Checklist
## Environment Variables
- [ ] List all env vars used in application
- [ ] Categorize: build-time vs runtime
- [ ] Identify secrets (should use K8s secrets, not ENV)
## Network Changes
- [ ] Find all localhost references
- [ ] Map to Docker service names
- [ ] Update CORS/auth origins
## Auth/SSO Specific
- [ ] Check trustedOrigins includes Docker service names
- [ ] Verify callback URLs work with container networking
- [ ] Test NODE_ENV=production behavior
## Dependencies
- [ ] Identify service startup order
- [ ] Configure health checks
- [ ] Set up proper wait conditions
Asset templates should be parameterized and documented:
Dockerfile.template:
# ===== IMPACT NOTES =====
# This template requires:
# - ENV: {{ENV_VARS_LIST}}
# - Network: Service name "{{SERVICE_NAME}}" on port {{PORT}}
# - Auth: Ensure CORS includes http://{{SERVICE_NAME}}:{{PORT}}
# ========================
FROM {{BASE_IMAGE}} AS builder
# ... template content
docker-compose.template:
# ===== NETWORK TOPOLOGY =====
# Services communicate via Docker network using service names:
# - web β api: http://api:8000
# - api β db: postgres://db:5432
# - web β sso: http://sso:3001
# ============================
services:
{{SERVICE_NAME}}:
build:
context: {{CONTEXT_PATH}}
args:
- NODE_ENV={{NODE_ENV}}
environment:
# Runtime configuration
- DATABASE_URL=${DATABASE_URL}
- API_URL=http://api:8000 # Docker service name, not localhost!
When creating a Docker blueprint skill, include:
SKILL.md sections:
References:
references/fastapi-patterns.md - FastAPI-specific patternsreferences/nextjs-patterns.md - Next.js-specific patternsreferences/auth-impact.md - Better Auth/SSO considerationsAssets:
assets/Dockerfile.fastapi - FastAPI templateassets/Dockerfile.nextjs - Next.js templateassets/docker-compose.base.yml - Base compose fileWhen creating a Helm blueprint skill, include:
SKILL.md sections:
References:
references/chart-structure.md - Helm chart anatomyreferences/security-context.md - Pod security patternsreferences/networking.md - Service/Ingress patternsAssets:
assets/base-chart/ - Complete Helm chart templateassets/values-dev.yaml - Development valuesassets/values-prod.yaml - Production valuesBefore finalizing a blueprint skill, verify:
Don't create blueprints that:
Do create blueprints that:
Contains pattern documentation and impact checklists that inform blueprint creation.
Contains template files that serve as starting points for generated configurations.
Contains validation scripts for checking blueprint completeness.