agentleFS
DariuszDuszaDariuszDusza/agentic-workflow-foundry/.agents/skills/infrastructure-change/SKILL.md

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.

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
  1. Distinctive:

    Never remove or loosen any of them to get unblocked.

    line 29
  2. Very specific:

    Know what rolls a revision: If the service's lifecycle ignores the image, apply changes config only and a deploy ships code.

    line 35
  3. Distinctive:

    State and variables files are secrets: never committed, never pasted, never read for convenience.

    line 44

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Infrastructure change

Required context

  1. .agents/guardrails/infrastructure.md: the rules and the reasons behind them.
  2. examples/terraform-safety-gates/README.md: defence in depth for infrastructure (identity lock, native preconditions, resource guards), with examples/terraform-safety-gates/preflight-identity-lock.sh and examples/terraform-safety-gates/safety.tf as the working shape.
  3. .agents/guardrails/data-handling.md and .agents/rules/credential-surface.md: state files, variables files and deployment config are secrets.
  4. .agents/policy/model-policy.md and .agents/policy/approval-matrix.yml before 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 -recursive and terraform 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_destroy on 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, apply changes config only and a deploy ships code; a deploy without a needed prior apply runs 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 verify

The 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.