infrastructure-change
Skill1 starsChanged 27 days agoApache-2.0View on GitHub
Use when editing infrastructure as code, a deploy script, the cloud resource inventory or a production safety gate, or before running any command that plans, applies or deploys against a real environment. Routes to the infrastructure guardrail, the identity-lock pattern and the credential-free checks that must follow every edit.
In this repository25 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-coordinationSkill
- api-code-generationSkill
- api-test-generationSkill
- ci-cd-changeSkill
- frontend-changeSkill
- guidance-maintenanceSkill
- refactoringSkill
- secret-and-pii-handlingSkill
- secure-api-endpointSkill
- tenant-safe-changeSkill
- workspace-importSkill
- agent-coordinationSkill
- api-code-generationSkill
- api-test-generationSkill
- ci-cd-changeSkill
- frontend-changeSkill
- guidance-maintenanceSkill
- infrastructure-changeSkill
- refactoringSkill
- secret-and-pii-handlingSkill
- secure-api-endpointSkill
- tenant-safe-changeSkill
- workspace-importSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 29
Never remove or loosen any of them to get unblocked.
- Very specific: line 35
Know what rolls a revision: If the service's lifecycle ignores the image, apply changes config only and a deploy ships code.
- Distinctive: line 44
State and variables files are secrets: never committed, never pasted, never read for convenience.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Infrastructure change
Required context
.agents/guardrails/infrastructure.md: the rules and the reasons behind them.examples/terraform-safety-gates/README.md: defence in depth for infrastructure (identity lock, native preconditions, resource guards), withexamples/terraform-safety-gates/preflight-identity-lock.shandexamples/terraform-safety-gates/safety.tfas the working shape..agents/guardrails/data-handling.mdand.agents/rules/credential-surface.md: state files, variables files and deployment config are secrets..agents/policy/model-policy.mdand.agents/policy/approval-matrix.ymlbefore any production or destructive action.
The rules that bite
- Run the credential-free checks after every edit: formatting check and per-layer validation
(for terraform,
terraform fmt -check -recursiveandterraform validate). They catch most mistakes and need no access to anything real. - The identity lock runs before every plan or apply. A preflight asserts the active cloud
identity and target project match the declared target and refuses otherwise, because the most
expensive infrastructure mistake is a correct change applied to the wrong account. Native
preconditions and
prevent_destroyon stateful resources are the second and third layers. Never remove or loosen any of them to get unblocked. - Single-source every environment value. Region, project and account come from one declared source; a divergent literal is a bug waiting for the next change to the source.
- Every environment layer moves together. A new variable or secret reference the application reads goes into every environment layer. Layers are often shaped differently, so port by meaning, not verbatim, and confirm each validates.
- Know what rolls a revision. If the service's lifecycle ignores the image,
applychanges config only and a deploy ships code; a deploy without a needed priorapplyruns new code on old config. - Deploy state has one writer. Rollout state goes through the one library that owns its path; a manual deploy that bypasses it breaks the next traffic shift.
- Production is always an escalation. Production goes through the confirm-gated path only, never a multi-environment list that happens to include it, and never while another deploy runs.
- A plan that destroys or replaces a stateful resource stops the change until the work item says so and the operator approves.
- State and variables files are secrets: never committed, never pasted, never read for convenience.
Verify
terraform fmt -check -recursive # formatting, no credentials needed
terraform validate # per layer, after init with no backend
make test-gates # includes the identity-lock example's own suite
make verifyThe infrastructure area's verify command in .agents/areas.json is the declared proof for a
work item; quote it exactly. Reviewers: infra-change-reviewer, and security-data-reviewer for
the credential surface.
Escalate when
- Anything would plan or apply against production, or deploy anywhere real.
- A plan shows destroy or replace of a database, bucket, disk or key.
- The identity lock, a precondition or a destroy guard needs to change.
- A new provider, module source or dependency is added.
- Credentials, state or deployment config would need to be read. An approval covers one action, once; it never carries to the next apply.
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.

