$npx -y skills add mjunaidca/mjs-agent-skills --skill blueprint-skill-creatorCreates blueprint-driven skills for infrastructure and deployment tasks. This skill should be used when creating new skills that require templates, patterns, or reference configurations (e.g., Dockerfiles, Helm charts, Kubernetes manifests, CI/CD pipelines). It enforces impact an
| 1 | # Blueprint Skill Creator |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | 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. |
| 6 | |
| 7 | ## Core Principle: Impact-Aware Blueprints |
| 8 | |
| 9 | Traditional approach (fragile): |
| 10 | ``` |
| 11 | Request: "Create a Dockerfile" |
| 12 | Result: Generic Dockerfile that breaks in production |
| 13 | ``` |
| 14 | |
| 15 | Blueprint-driven approach (robust): |
| 16 | ``` |
| 17 | Request: "Create a Dockerfile" |
| 18 | Process: |
| 19 | 1. Analyze project for containerization requirements |
| 20 | 2. Identify environment variables (build-time vs runtime) |
| 21 | 3. Map localhost references → Docker service names |
| 22 | 4. Check auth/CORS origins for container network |
| 23 | 5. Generate Dockerfile with documented gotchas |
| 24 | 6. Create docker-compose with proper networking |
| 25 | ``` |
| 26 | |
| 27 | ## Workflow: Creating Blueprint-Driven Skills |
| 28 | |
| 29 | ### Step 1: Define the Skill's Domain |
| 30 | |
| 31 | Identify what infrastructure domain the skill covers: |
| 32 | |
| 33 | | Domain | Examples | Key Concerns | |
| 34 | |--------|----------|--------------| |
| 35 | | Containerization | Dockerfiles, docker-compose | Env vars, networking, multi-stage builds | |
| 36 | | Orchestration | Helm, Kubernetes manifests | Service discovery, secrets, resource limits | |
| 37 | | CI/CD | GitHub Actions, pipelines | Build vs deploy stages, secrets injection | |
| 38 | | Event Systems | Kafka, Dapr | Topics, schemas, authentication | |
| 39 | |
| 40 | ### Step 2: Conduct Impact Analysis |
| 41 | |
| 42 | Before creating any blueprint, analyze the target project: |
| 43 | |
| 44 | #### 2.1 Environment Analysis |
| 45 | ``` |
| 46 | Scan for: |
| 47 | ├── .env files → What variables exist? |
| 48 | ├── process.env / os.environ usage → What's expected at runtime? |
| 49 | ├── Build-time variables → NEXT_PUBLIC_*, ARG in Dockerfiles |
| 50 | └── Sensitive values → API keys, secrets, connection strings |
| 51 | ``` |
| 52 | |
| 53 | #### 2.2 Network Topology Analysis |
| 54 | ``` |
| 55 | Identify: |
| 56 | ├── localhost references → Must become service names |
| 57 | ├── Port bindings → What ports are exposed? |
| 58 | ├── Service dependencies → What talks to what? |
| 59 | └── External services → Databases, APIs, auth providers |
| 60 | ``` |
| 61 | |
| 62 | #### 2.3 Auth/CORS Impact Analysis |
| 63 | |
| 64 | **Critical for SSO/Better Auth:** |
| 65 | ``` |
| 66 | Check auth configuration for: |
| 67 | ├── Allowed origins → Must include Docker service names |
| 68 | ├── Callback URLs → localhost:3000 → web:3000 |
| 69 | ├── API URLs → localhost:8000 → api:8000 |
| 70 | └── NODE_ENV behavior → Some features disabled in production |
| 71 | ``` |
| 72 | |
| 73 | **Common gotcha:** |
| 74 | ```typescript |
| 75 | // better-auth config - WILL BREAK in Docker if not updated |
| 76 | trustedOrigins: [ |
| 77 | "http://localhost:3000", // Works locally |
| 78 | // MISSING: "http://web:3000" // Needed for Docker |
| 79 | // MISSING: "http://frontend:3000" // Needed for K8s |
| 80 | ] |
| 81 | ``` |
| 82 | |
| 83 | ### Step 3: Create Skill Structure |
| 84 | |
| 85 | Initialize using skill-creator: |
| 86 | ```bash |
| 87 | python3 .claude/skills/engineering/skill-creator/scripts/init_skill.py \ |
| 88 | <skill-name> --path .claude/skills/engineering/ |
| 89 | ``` |
| 90 | |
| 91 | Organize with blueprints: |
| 92 | ``` |
| 93 | .claude/skills/engineering/<skill-name>/ |
| 94 | ├── SKILL.md # Instructions + impact analysis guidance |
| 95 | ├── references/ # Blueprint documentation |
| 96 | │ ├── patterns.md # Common patterns and when to use them |
| 97 | │ ├── impact-checklist.md # What to check before containerizing |
| 98 | │ └── gotchas.md # Known issues and solutions |
| 99 | └── assets/ # Template files |
| 100 | ├── Dockerfile.template # Base template |
| 101 | ├── docker-compose.template # Compose template |
| 102 | └── .env.example # Environment template |
| 103 | ``` |
| 104 | |
| 105 | ### Step 4: Write Blueprint References |
| 106 | |
| 107 | Each reference file should include: |
| 108 | |
| 109 | **Pattern documentation (`references/patterns.md`):** |
| 110 | ```markdown |
| 111 | # Pattern: Multi-Stage Build |
| 112 | |
| 113 | ## When to Use |
| 114 | - Production deployments |
| 115 | - When image size matters |
| 116 | - When build dependencies differ from runtime |
| 117 | |
| 118 | ## Template |
| 119 | [Include actual template code] |
| 120 | |
| 121 | ## Variables to Replace |
| 122 | - `{{BASE_IMAGE}}` - Base image (e.g., python:3.13-slim) |
| 123 | - `{{APP_MODULE}}` - Entry point (e.g., main:app) |
| 124 | - `{{PORT}}` - Exposed port |
| 125 | |
| 126 | ## Impact Notes |
| 127 | - Build-time ARGs are baked in - cannot change at runtime |
| 128 | - Use ENV for runtime configuration |
| 129 | ``` |
| 130 | |
| 131 | **Impact checklist (`references/impact-checklist.md`):** |
| 132 | ```markdown |
| 133 | # Pre-Containerization Checklist |
| 134 | |
| 135 | ## Environment Variables |
| 136 | - [ ] List all env vars used in application |
| 137 | - [ ] Categorize: build-time vs runtime |
| 138 | - [ ] Identify secrets (should use K8s secrets, not ENV) |
| 139 | |
| 140 | ## Network Changes |
| 141 | - [ ] Find all localhost references |
| 142 | - [ ] Map to Docker service names |
| 143 | - [ ] Update CO |