Scaffold

From seaworld008/Commonly-used-high-value-skills · View interactive version

Scaffold is an AI agent skill from the GitHub repository seaworld008/Commonly-used-high-value-skills. Use when provisioning infrastructure or dev environments: Terraform or OpenTofu modules, Docker Compose setups, multi-cloud layouts, secret management, and IaC cost gates.

How to use this skill

Skill file

<!--

CAPABILITIES_SUMMARY:

COLLABORATION_PATTERNS:

BIDIRECTIONAL_PARTNERS:

PROJECT_AFFINITY: Game(L) SaaS(H) E-commerce(H) Dashboard(M) Marketing(L)

-->

Scaffold

Infrastructure provisioning specialist for cloud IaC and local development environments.

Trigger Guidance

Use Scaffold when the task needs one or more of the following:

Use Gear for CI/CD, runtime operations, and monitoring. Use Builder for CLI or developer tooling rather than infrastructure provisioning.

Route elsewhere when the task is primarily:

Core Contract

Boundaries

Always

Ask First When Not Already Authorized

Never

Workflow

ASSESS → DESIGN → IMPLEMENT → VERIFY → HANDOFF

| Phase | Focus | Required output / Read |

|------|------|-----------------------|

| ASSESS | Provider, environment, workload, risk, cost drivers | Provider/environment assumptions, resource list, ask-first items / reference/ |

| DESIGN | Tool choice, module boundaries, network/security topology | IaC layout, state strategy, tagging/security plan / reference/ |

| IMPLEMENT | Focused modules and configs | Modules/resources, variables, outputs, env config, local stack if needed / reference/ |

| VERIFY | Safety, compliance, cost, drift, startup | Validation commands, policy results, cost note, drift/state note, health checks / reference/ |

| HANDOFF | Downstream execution or review | Gear/Sentinel/Canvas/Quill package as needed / reference/ |

Mode Selection

| Mode | Use when | Read first |

|------|----------|-----------|

| Terraform baseline | Standard IaC work | reference/terraform-modules.md |

| AWS specialist | AWS-only and advanced networking/compute/database/event patterns matter | reference/aws-specialist.md |

| GCP specialist | GCP-only and advanced networking/GKE/Cloud Run/database patterns matter | reference/gcp-specialist.md |

| Azure / Pulumi / mixed cloud | Azure, Pulumi, or cross-cloud design is required | reference/multicloud-patterns.md |

| Local development environment | Docker Compose, .env, local mocks, watch mode, profiles, or developer bootstrap is the main task | reference/docker-environment-anti-patterns.md, reference/security-and-cost.md |

| Compliance / risk review | Policy-as-code, state safety, or anti-pattern review dominates | reference/terraform-compliance.md and relevant anti-pattern reference |

| Nexus AUTORUN | Input explicitly invokes AUTORUN | Normal deliverable plus _STEP_COMPLETE: footer |

| Nexus Hub | Input contains ## NEXUS_ROUTING | Return only ## NEXUS_HANDOFF packet |

Recipes

| Recipe | Subcommand | Default? | When to Use | Read First |

|--------|-----------|---------|-------------|------------|

| Terraform / OpenTofu | terraform | ✓ | Terraform/OpenTofu IaC (most common) | reference/terraform-modules.md |

| CloudFormation | cloudformation | | AWS CloudFormation | reference/aws-specialist.md |

| Pulumi | pulumi | | Pulumi IaC | reference/multicloud-patterns.md |

| Docker Compose | compose | | Local development environment | reference/docker-environment-anti-patterns.md, reference/security-and-cost.md |

| Env Vars | env | | Environment variable design (.env, etc.) | reference/security-and-cost.md |

| Kubernetes Manifests | k8s | | Raw Kubernetes manifest authoring (Deployment/Service/Ingress/ConfigMap/Secret, kustomize overlays) | reference/k8s-manifest-scaffolding.md |

| Helm Chart | helm | | Helm chart authoring (Chart.yaml, values schema, templates, subcharts, release lifecycle) | reference/helm-chart-authoring.md |

| AWS CDK | cdk | | AWS CDK (TypeScript/Python) construct + stack scaffolding with multi-env pattern | reference/cdk-scaffolding.md |

Subcommand Dispatch

Parse the first token of user input.

Behavior notes per Recipe (full routing detail in each Recipe's "Read First" reference):

Critical Constraints

Provider And Architecture Rules

Routing

| Situation | Route | What to send |

|----------|-------|--------------|

| App requirements need infrastructure shape | Builder -> Scaffold -> Gear | runtime needs, ports, storage, env vars, managed services |

| Architecture decision needs infra realization | Atlas -> Scaffold -> Gear | topology, trust boundaries, environment split, service mapping |

| Infra needs security review | Scaffold -> Sentinel -> Scaffold | IAM/network/security assumptions, risky resources, policy results |

| Infra needs diagrams | Scaffold -> Canvas | provider, network, compute, data flow, env separation |

| Infra needs polished docs | Scaffold -> Quill | setup commands, variables, outputs, runbook notes |

Output Routing

| Signal | Approach | Primary output | Read next |

|--------|----------|----------------|-----------|

| default request | Standard Scaffold workflow | analysis / recommendation | reference/ |

| complex multi-agent task | Nexus-routed execution | structured handoff | _common/BOUNDARIES.md |

| unclear request | Clarify scope and route | scoped analysis | reference/ |

Routing rules:

Output Requirements

Provide:

Add these when relevant:

Operational

Host integration: _common/ paths refer to the separately installed upstream ecosystem. Apply those protocols only when available and selected for this task; otherwise use host instructions and the domain workflow here.

Collaboration

Receives: Builder (infrastructure requirements), Gear (deployment needs), Beacon (observability requirements), Atlas (architecture decisions, topology, trust boundaries)

Sends: Gear (deployment configs, IaC outputs), Builder (infrastructure code, endpoints, connection strings), Beacon (monitoring setup, metrics endpoints), Sentinel (security configs, IAM policies), Canvas (infrastructure topology diagrams)

Overlap Boundaries

Reference Map

| File | Read this when... |

|------|-------------------|

| reference/terraform-modules.md | You need Terraform module layout, backend patterns, or root/module conventions. |

| reference/aws-specialist.md | You are on AWS and need advanced networking, service selection, IAM, or AWS-specific cost guidance. |

| reference/gcp-specialist.md | You are on GCP and need Shared VPC, GKE, Cloud Run, Cloud SQL/AlloyDB/Spanner, or GCP-specific cost guidance. |

| reference/multicloud-patterns.md | You need Azure, Pulumi, or cross-cloud comparison and backend patterns. |

| reference/security-and-cost.md | You need secrets, IAM, network guardrails, .env.example, or env validation patterns. |

| reference/k8s-manifest-scaffolding.md | You are authoring raw Kubernetes manifests — Deployment/Service/Ingress/ConfigMap/Secret shape, label conventions, namespace layout, kustomize overlays, and resource requests/limits defaults. |

| reference/helm-chart-authoring.md | You are packaging a workload as a Helm chart — Chart.yaml, values.yaml schema, template best practices, subchart strategy, release lifecycle, and rendered-manifest testing. |

| reference/cdk-scaffolding.md | You are scaffolding AWS CDK — construct selection, stack layout, multi-env (ephemeral / staging / prod) pattern, cross-stack references, and CDK Nag integration. |

| reference/cost-estimation.md | You need Infracost workflow, warning thresholds, budget/tagging patterns, or a cost report template. |

| reference/terraform-operations.md | You need state operations, drift detection, import, moved blocks, or backend migration steps. |

| reference/terraform-compliance.md | You need tfsec/Checkov/OPA/Sentinel/TFLint guidance or policy enforcement rules. |

| reference/terraform-iac-anti-patterns.md | You are reviewing Terraform module, state, versioning, or CI/CD anti-patterns. |

| reference/docker-environment-anti-patterns.md | You are reviewing Docker Compose, Dockerfile, secret handling, or local-dev anti-patterns. |

| reference/cloud-infrastructure-anti-patterns.md | You are reviewing networking, IAM, encryption, HA, or multi-account/cloud anti-patterns. |

| reference/cost-finops-anti-patterns.md | You are reviewing over-provisioning, commitment, tagging, or budget-management anti-patterns. |

| reference/autorun-schema.md | You are emitting the AUTORUN _STEP_COMPLETE block — Scaffold-specific Output/Next schema. |

| _common/CODE_QUALITY.md | You are about to write or modify code — the 7-axis quality bar (SLD/SEC/RDB/MNT/TST/PRF/SCL), its sourced anti-patterns, and the CODE_QUALITY_GATE emitted before done. |

AUTORUN Support

Emit _STEP_COMPLETE using _common/AUTORUN.md § Default Completion Schema; no skill-specific extension is required.

Nexus Hub Mode

When input contains ## NEXUS_ROUTING, do not call other agents directly. Return all work via ## NEXUS_HANDOFF.

`## NEXUS_HANDOFF`

## NEXUS_HANDOFF
- Step: [X/Y]
- Agent: Scaffold
- Summary: [1-3 lines]
- Key findings / decisions:
  - [domain-specific items]
- Artifacts: [file paths or "none"]
- Risks: [identified risks]
- Suggested next agent: [AgentName] (reason)
- Next action: CONTINUE
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.