setup
Skill2 starsChanged 2 months agoMITView on GitHub
Greenfield bootstrap of a Terraform + Cloudflare + GitHub infra repo with either HCP Terraform (cloud block) or object-storage backend (GCS/S3/Azure + GitHub Actions). Wires state, the Cloudflare token, and the GitHub App, then reaches a green first plan on both leaves. Use when nothing is wired up yet. Not for adopting resources that already exist (infra-copilot:import), nor for provisioning new ones in a working repo (infra-copilot:add).
193 other projects use a version of this.
Adopted by
Most recently taken up by
- onetapstudiogames/1f3d9-citylifetheir own version, first seen Oct 7, 2026
- prathish-ks/isthmustheir own version, first seen Oct 6, 2026
- michielvandermeer/skillstheir own version, first seen Oct 4, 2026
- qbeka/jev-job-searchtheir own version, first seen Oct 4, 2026
- ProjectAJ14/eklavyatheir own version, first seen Oct 4, 2026
- nanocoai/nanoclawtheir own version, first seen Oct 4, 2026
Used with
Projects with it also use add-slack, add-parallel and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkilladd-slack
Add Slack channel integration via Chat SDK.
Also in 6 projects that use this
MicrosoftSkilladd-parallel
Also in 5 projects that use this
sskarzSkilladd-telegram-swarm
Add Agent Swarm (Teams) support to Telegram. Each subagent gets its own bot identity in the group. Requires Telegram channel to be set up first (use /add-telegram). Triggers on "agent swarm", "agent teams telegram", "telegram swarm", "bot pool".
Also in 5 projects that use this
- +9 more from microsoft
Other versions193 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 193
- feder-cr/invisible_playwright_mcp★ 32ksame name
- nanocoai/nanoclaw★ 31ksame name
- anthropics/knowledge-work-plugins★ 26ksame name
- Q00/ouroboros★ 6.2ksame name
- agenticnotetaking/arscontexta★ 3.5ksame name
- aws/agent-toolkit-for-aws★ 2.8ksame name
- Shpigford/chops★ 1.9ksame name
- skyllwt/AutoSci★ 1.7ksame name
- microsoft/power-platform-skills★ 961same name
- SethGammon/Citadel★ 922same name
183 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 0 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 171 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 79
Respect the actor split: Run AGENT steps yourself. On a HUMAN step, stop, emit the handoff block, wait for done, re-run the check — never …
- Very specific: line 164
If the domain/repos already exist, continue with infra-copilot:import to adopt them (plan should then show imports, not creates).
- Very specific: line 176
Never fake a HUMAN step. A signup, a dashboard click and a secret paste are the human's, and the agent must never see a pasted secret in …
- Very specific: line 194
All org-specific values — HCP org, GitHub org, apex domain, Cloudflare account/zone IDs, managed repos, HCP status-check ID — live in …
“Common” is measured: kept by at least 6 in 10 of the 171 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!--
AI-RULEZ :: GENERATED FILE — DO NOT EDIT
Content-Hash: blake3:49caa2c2987b6abb4b7b2d46a7d6c59e510e65a7a5b532643d438204a7725291
Source-Hash: blake3:3437c8021985fde0d012440ff680b556bdb5cb2d5225aef09511ba92b91f4f6e
Schema-Version: v1
-->infra-copilot: setup
Greenfield bootstrap. You (the agent) execute it end-to-end, pausing only for the steps a
human irreducibly must do. This file is a router: the reusable machinery — actor
model, handoff block, resume scan, preflight — lives in
../infra-copilot/references/protocol.md; the per-step manifest in
../infra-copilot/references/steps.yaml (phases 0–4); per-provider detail and
the canonical docs under ../infra-copilot/references/.
This is a Skill, not a script. There is no
setupexecutable. Drive it by reading this file, the protocol, and the manifest, then running each step. A human invokes it with/infra-setupor by saying "set up the infra."
Scope
setup owns the cold start: from an empty repo to green plans on both leaves.
HCP mode (backend: hcp)
| # | Phase | Actors | Deep dive |
| 0 | Toolchain + HCP bootstrap — commit reviewed pins, sign up, terraform login, get the pivot token | HUMAN then AGENT | ../infra-copilot/references/docs/setup.md#6, ../infra-copilot/references/hcp.md, ../infra-copilot/references/docs/setup.md#1 |
| 1 | HCP workspaces — create cloudflare + github-org, VCS + safety toggles | AGENT (API) + HUMAN VCS OAuth | ../infra-copilot/references/hcp.md, ../infra-copilot/references/docs/setup.md#2 |
| 2 | Cloudflare — mint scoped token, paste into HCP, verify | HUMAN mint/paste, AGENT verify | ../infra-copilot/references/cloudflare.md |
| 3 | GitHub — create + install the GitHub App, paste creds into HCP | HUMAN create/install/paste, AGENT verify | ../infra-copilot/references/github.md |
| 4 | Narrow the credential, then first plan — hand off to a plan-only HCP identity, then init + speculative plan per leaf, read via API | HUMAN handoff, then AGENT | ../infra-copilot/references/steps.yaml (hcp-apply-scope), ../infra-copilot/references/docs/hcp-api.md |
Object-storage mode (backend: object-storage)
| # | Phase | Actors | Deep dive |
| 0 | Toolchain + state bucket — commit reviewed pins, create versioned bucket, configure backend.tf blocks | HUMAN then AGENT | ../infra-copilot/references/docs/object-storage-state.md#object-storage-backend |
| 1 | GitHub Actions CI — create plan/apply workflows, configure GitHub Environment protection | AGENT then HUMAN | ../infra-copilot/references/docs/object-storage-ci.md#github-actions |
| 2 | Cloudflare — mint scoped token, add CLOUDFLARE_API_TOKEN to GitHub Actions secrets, verify | HUMAN mint/save, AGENT verify | ../infra-copilot/references/cloudflare.md |
| 3 | GitHub — create + install GitHub App, add secrets (GH_APP_ID, GH_APP_INSTALLATION_ID, GH_APP_PEM) to GitHub Actions | HUMAN create/install/save, AGENT verify | ../infra-copilot/references/github.md |
| 4 | First plan — verify plan-cloudflare and plan-github jobs succeed in GitHub Actions | AGENT | ../infra-copilot/references/steps.yaml, ../infra-copilot/references/docs/object-storage-ci.md#github-actions |
Adopting resources that already exist (a live domain, existing repos)? That's infra-copilot:import (Phase 5), run after this reaches green plans.
⚠️ Pre-existing resources — stop before applying. Unlike the old monolith,
setupends at green speculative plans (phase 4) and does not auto-import. If the phase-4 plan shows resources aswill be createdthat you know already exist live — a domain already serving traffic, repos already on GitHub — do not apply: an apply would recreate or clobber them. Run infra-copilot:import first to adopt them (the plan should then read imports, not creates), and only then apply.
Workflow
- Read config first (shared protocol, Step 0). Load
.infra-copilot/config.md, or use.claude/infra-copilot.local.mdas the migration fallback, and export the org vars. If both are missing → handoff, offer to scaffold, wait. For a new setup, recommend object-storage first. Explain HCP's managed runs and UI, its free tier's 500-resource limit, and this workflow's required paid tier with team management for the plan-only credential, even below 500 resources. Ask for the choice using the shared protocol, then always writebackend: object-storageorbackend: hcpexplicitly. Existing configs withoutbackendstop for the migration handoff; existingcloud {}blocks prompt an offer to recordbackend: hcp, never an automatic mode switch. See../infra-copilot/references/config.md. - Bootstrap preflight, then resume scan over phases 0–4 of
../infra-copilot/references/steps.yaml. On a cold repo, check thatmiseitself is available, then scantoolchain-pinbefore running the pin-dependent preflight checks. Once it is green, finish preflight, handle the optionalrepo-config-syncstep, print✓, and continue fromhcp-login(HCP mode) orstate-bucket(object-storage mode). Full contract:../infra-copilot/references/protocol.md. - Respect the actor split. Run
AGENTsteps yourself. On aHUMANstep, stop, emit the handoff block, wait fordone, re-run thecheck— never fake a signup, a dashboard click, or a secret paste. - Route to the deep-dives under
../infra-copilot/references/for the fine print; don't duplicate them.
Phase notes
HCP mode:
- Phase 0 — Toolchain + HCP bootstrap. The first
HUMANstep chooses exact tool versions, reviews the wholemise.toml, and commits it withmise.lock; this must happen before pin-dependent preflight. If the consuming repository ships an executablescripts/sync-config.sh, stop for a human to review and run it next, then verify its deterministic changes and canonical config were committed together; repositories without the helper skip this step. ThenHUMANsigns up + runsterraform login, after which you own the HCP API. Toolchain sequence:../infra-copilot/references/docs/setup.md#6. HCP commands + verify:../infra-copilot/references/hcp.md. - Phase 1 — HCP workspaces. Two workspaces (
cloudflare,github-org), one per leaf. A human does the one-time GitHub↔HCP OAuth (browser); you create both via the API with the right working dir, path-scoped triggers, remote execution, and auto-apply off.create_wshelper + safety rationale:../infra-copilot/references/hcp.md. - Phase 2 — Cloudflare. You can't mint a scoped token from nothing and must never see
the plaintext — minting/pasting are
HUMAN, verifying isAGENT.../infra-copilot/references/cloudflare.md. - Phase 3 — GitHub. The
github-orgworkspace authenticates as a GitHub App, not a PAT. Creation + install are browser flows; three creds get pasted into HCP.../infra-copilot/references/github.md. - Phase 4 — First plan. Prove every credential end-to-end. Per leaf:
terraform initthen speculativeterraform plan(runs in HCP). A VCS-connected workspace allowsplanbut blocksapplyfrom the CLI — intentional. Read plans without the UI via../infra-copilot/references/docs/hcp-api.md. Green on both leaves = credentials proven.
Object-storage mode:
- Phase 0 — Toolchain + state bucket. Tool versions are committed in
mise.toml+mise.lock.HUMANcreates the versioned, private state bucket with locking configured.AGENTwritesbackend.tfblocks in each leaf pointing to the state bucket.../infra-copilot/references/docs/object-storage-state.md#object-storage-backend. - Phase 1 — GitHub Actions CI.
AGENTcreates.github/workflows/terraform-plan.ymlandterraform-apply.yml.HUMANrestricts theproductionGitHub Environment tomainand adds required reviewers where the plan offers them, or locks anApply gatedecision.../infra-copilot/references/docs/object-storage-ci.md#github-actions. - Phase 2 — Cloudflare.
HUMANmints scoped token and addsCLOUDFLARE_API_TOKENto GitHub Actions secrets;AGENTverifies.../infra-copilot/references/cloudflare.md. - Phase 3 — GitHub.
HUMANcreates/installs GitHub App and addsGH_APP_ID,GH_APP_INSTALLATION_ID, andGH_APP_PEMto GitHub Actions secrets;AGENTverifies.../infra-copilot/references/github.md. - Phase 4 — First plan. Trigger or inspect GitHub Actions plan workflows for
cloudflareandgithubleaves; verify both jobs succeed. Align required status check job names.../infra-copilot/references/docs/object-storage-ci.md#github-actions.
Validation
Setup is complete when you can report:
- ✓
.infra-copilot/config.mdexplicitly records the chosenbackend.
For HCP mode (backend: hcp):
- ✓
mise.toml+mise.lockare reviewed, committed together, exact-pinned, and installable withMISE_LOCKED=1. - ✓ HCP org
$ORG+ projectinfrareachable via API. - ✓ Workspaces
cloudflareandgithub-orgexist, VCS-linked, auto-apply off, fork speculative plans off. - ✓ Both workspaces use the exact Terraform version committed in
mise.toml. - ✓ All sensitive vars present (
cloudflare_api_token;github_app_id,github_app_installation_id,github_app_pem). - ✓
terraform plangreen on both leaves. - ✓
hcp-apply-scopegreen — the credential in use cannot apply. It is aHUMANstep likecf-tokenandgh-app: stop there, hand off, and continue when it turns green. Setup is not complete while the agent still holds the apply-capable user token fromterraform login.
For Object-storage mode (backend: object-storage):
- ✓
mise.toml+mise.lockare reviewed, committed together, exact-pinned, and installable withMISE_LOCKED=1. - ✓ State bucket created, versioned, private, with locking configured.
- ✓
backend.tfblocks configured in each leaf. - ✓ GitHub Actions workflows committed (
terraform-plan.yml,terraform-apply.yml) and production environment configured. - ✓ All sensitive secrets present in GitHub Actions (
CLOUDFLARE_API_TOKEN,GH_APP_ID,GH_APP_INSTALLATION_ID,GH_APP_PEM). - ✓ GitHub Actions plan workflows green on both leaves (
plan-cloudflare,plan-github). - ✓ Required status checks in branch protection match workflow job names.
If the domain/repos already exist, continue with infra-copilot:import to adopt them (plan should then show imports, not creates). Otherwise day-to-day work follows your repo's own contributor guide.
Guardrails
setup ends at green speculative plans and does not apply. If a phase-4 plan shows
resources as will be created that you know already exist live — a domain already
serving traffic, repos already on GitHub — do not apply: an apply would recreate or
clobber them. Run infra-copilot:import first, so the plan reads imports, not
creates.
Never fake a HUMAN step. A signup, a dashboard click and a secret paste are the
human's, and the agent must never see a pasted secret in plaintext. On a red check after
a human replies done, re-emit the handoff with what you observed rather than
proceeding.
Example
A resumed run prints what is already green and stops at the first red step:
✓ toolchain-pin ✓ hcp-login ✓ hcp-signup ✓ hcp-verify
✓ vcs-connect ✗ workspaces-create ← resume hereEverything green means the scope is already done and there is nothing to do.
Configuring for your org
All org-specific values — HCP org, GitHub org, apex domain, Cloudflare account/zone IDs,
managed repos, HCP status-check ID — live in .infra-copilot/config.md (schema +
export block: ../infra-copilot/references/config.md). Fill it in once and re-run —
the resume protocol handles the rest.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

