skills/infrastructure-generators/SKILL.md
SDL generators for Docker Compose, Kubernetes, Monitoring, Nginx, and Deploy Diagram
npx skillsauth add navraj007in/architecture-cowork-plugin infrastructure-generatorsInstall 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.
SDL-driven, deterministic generators that produce production-ready infrastructure configs. Same input always produces identical output.
Input: Compiled SDL document
Output: YAML/JSON config files in artifacts/ directory
Generates a docker-compose.yml for local development with all services, databases, caches, queues, and search.
API: POST /api/sdl/docker-compose — { yaml: string }
Output files:
artifacts/docker/docker-compose.yml — complete service orchestrationartifacts/docker/.env — environment variable templateSDL sections used:
architecture.projects.frontend[] / backend[] — service definitionsdata.primaryDatabase.type — database container (postgres, mysql, mongodb, sqlserver)data.secondaryDatabases[] — additional database containersdata.cache.type — Redis containerdata.queues.provider — queue container (rabbitmq, kafka, redis)data.search.provider — search container (elasticsearch, meilisearch, typesense)auth.identityProvider — auth env vars (Auth0, Clerk, Cognito, Firebase)solution.name — container namingWhat it includes per service:
service_healthy depends_onGenerates production-ready K8s manifests with Deployments, Services, HPA, Ingress, ConfigMap, and Namespace.
API: POST /api/sdl/kubernetes — { yaml: string }
Output files (in artifacts/k8s/):
namespace.yaml — namespace scoped to solution nameconfigmap.yaml — shared config (NODE_ENV, DB_TYPE, AUTH_PROVIDER, REDIS_ENABLED)backend-{name}-deployment.yaml, -service.yaml, -hpa.yamlfrontend-{name}-deployment.yaml, -service.yamlingress.yaml — HTTPS routing with cert-managerSDL sections used:
architecture.projects.backend[] / frontend[] — deployments and servicesnonFunctional.scaling.expectedUsersYear1 — replica count (>50k=5, >10k=3, else=2)solution.domain — ingress hostname (defaults to {slug}.example.com)nonFunctional.security.encryptionInTransit — TLS/cert-manager annotationsdata.primaryDatabase.type — ConfigMap DB_TYPEdata.cache.type — ConfigMap REDIS_ENABLEDauth.identityProvider — ConfigMap AUTH_PROVIDERResource limits:
| Tier | CPU Request | CPU Limit | Memory Request | Memory Limit | |------|------------|-----------|----------------|--------------| | Backend | 100m | 500m | 128Mi | 512Mi | | Frontend | 50m | 200m | 64Mi | 256Mi |
HPA: Scales on 70% CPU / 80% memory utilization, max replicas = min × 3
Probes: HTTP GET /health — readiness (5s initial, 10s period), liveness (15s initial, 20s period)
Generates Prometheus scrape config, alert rules, and a Grafana dashboard JSON.
API: POST /api/sdl/monitoring — { yaml: string }
Output files (in artifacts/monitoring/):
prometheus.yml — scrape config with per-service job definitions + node-exporteralert-rules.yml — alerting rules derived from NFRsgrafana-dashboard.json — complete dashboard with per-service panelsSDL sections used:
architecture.projects.backend[] / frontend[] — per-service scrape targets and panelsnonFunctional.availability.target — error budget calculation for HighErrorRate thresholdnonFunctional.performance.apiResponseTime — P95 latency alert thresholddata.primaryDatabase.type — database connection pool alert (postgres/mysql/sqlserver only)integrations.monitoring.provider — metadata onlyAlert rules generated:
| Alert | Trigger | Severity |
|-------|---------|----------|
| HighErrorRate | 5xx rate exceeds error budget | critical |
| HighLatency | P95 > apiResponseTime target | warning |
| ServiceDown_{name} | up{job} == 0 for 1m | critical |
| HighCpuUsage | CPU > 85% for 10m | warning |
| HighMemoryUsage | Memory > 90% for 5m | warning |
| DatabaseConnectionPoolHigh | Pool > 80% for 5m | warning |
Grafana panels: Request rate, error rate, P95 latency, service uptime, per-service CPU/memory, per-service request duration percentiles (P50/P95/P99), database connections.
Generates a reverse proxy config with SSL, gzip, rate limiting, and security headers.
API: POST /api/sdl/nginx — { yaml: string }
Output files (in artifacts/nginx/):
nginx.conf — complete reverse proxy configurationmime.types.conf — MIME type mappingsdocker-compose.nginx.yml — Docker Compose snippet to add nginx serviceSDL sections used:
architecture.projects.backend[] / frontend[] — upstream definitionssolution.domain — server_name for HTTPS blockFeatures:
/api, multiple → /api/{name})//healthGenerates a Mermaid deployment topology diagram from a deployment plan.
Not exposed via dedicated API route — used programmatically by the deploy-planner module.
Input: DeployDiagramInput (not an SDL document directly):
strategy — deployment strategy nameservices[] — array of { name, platform, tier?, estimatedCost, config? }monthlyCost? — { min, max, typical }Output: diagrams/deployment-topology.mmd — Mermaid flowchart
Features:
$X/mo)development
# Trade-Off Analysis Skill Quantifies exact trade-offs when switching between architecture options. Shows users precisely what they gain and lose when choosing Option A over Option B. ## When to Use Use this skill to help users decide between options by showing: 1. **Cost difference** — how much more/less per month? 2. **Performance difference** — how much faster/slower? 3. **Complexity difference** — how much harder to build/maintain? 4. **Scalability difference** — when does this option hit
testing
# Stage Detection Skill Detects the current project stage (concept → mvp → growth → enterprise) based on `_state.json` field presence and completeness. Used by `/architect:next-steps`, `/architect:check-state`, and roadmap commands. ## When to Use Invoke this skill when you need to determine what stage a project is at based on its state file. Stage detection drives: - Command recommendations (what to run next) - Required fields validation (what should exist at this stage) - Risk assessment (w
development
# Stack Swap Simulator Skill Estimates cost and effort to switch from one tech stack to another. Helps answer: "Can we migrate later if needed?" ## When to Use Use this skill to understand: 1. **Cost of switching stacks** — engineer weeks + downtime risk 2. **Timeline to switch** — how long is the project? 3. **Risk of switching** — what can go wrong? 4. **ROI of switching** — does it save money long-term? 5. **Backwards compatibility** — can we do a gradual migration? ## Input Provide sour
tools
# Stack Compatibility Skill Verifies that chosen technologies integrate well together. Prevents "I picked these tools and they don't work well together" regrets. ## When to Use Use this skill to verify: 1. **Chosen tools work together** — React + Node + MongoDB = good? 2. **No hidden incompatibilities** — will I hit issues in production? 3. **Team can support it** — do we have expertise for this combo? 4. **Licenses compatible** — can we use these together commercially? 5. **Performance assum