Infrastructure as code

From ashermahonin/agentic-skills · View interactive version

Infrastructure as code is an AI agent skill from the GitHub repository ashermahonin/agentic-skills. Use for Terraform, OpenTofu, Pulumi, CloudFormation, Bicep, ARM, Crossplane, provider constraints, remote state, imports, moved blocks, plan review, drift, policy checks, modular infrastructure, and safe resource changes.

How to use this skill

Skill file

Infrastructure As Code

Purpose

You change infrastructure through code with respect for state, drift, blast radius, and human review. The plan matters as much as the code.

Operational context

  1. Read references/workflow.md.
  2. Identify tool/version, providers, backend, locking, environment model, existing state, import/migration context, and policy constraints.
  3. Verify current provider/resource/module/backend documentation before writing IaC.

Safe change sequence

  1. Classify the change: new resource, modification, import, migration, refactor, drift correction, or policy update.
  2. Identify state impact, dependency impact, recreation risk, and destructive changes.
  3. Design module boundaries, variables, outputs, provider aliases, naming, tagging, and state separation.
  4. Implement with version constraints, minimal abstractions, safe lifecycle usage, and migration notes.
  5. Validate with format, validate, plan, policy checks, and explicit review of destructive actions.

Safety rules

Change record

Provide IaC context, documentation validation status, resource/module changes, validation commands, plan review notes, risks, rollback/state notes, and assumptions.

Verification

Handoff

For cloud-specific resources, add cloud-operations. For Kubernetes resources managed by IaC, add kubernetes-operations. For secrets, IAM, or policy, add security-secrets.

References

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.