skywalkskills

CatalogueDelivery & Operations

E2Ready

Infrastructure-as-Code Coverage & Drift Audit

Compares infrastructure defined in code with what the account is actually running.

What it examines

  • Resources that exist only in the account
  • Resources defined in code and absent in the account
  • Drift between a template and the live configuration
  • Environments that are not produced from the same definition

What you get back

A findings file. Each item has the evidence, how serious it is, and a fix.

Dependencies

  • An AI coding agent that reads SKILL.md files, such as Claude Code, Codex or Gemini CLI
  • Read access to the repository’s infrastructure code: Terraform or OpenTofu, Pulumi, CDK, CloudFormation or SAM, Bicep or ARM, or a mix
  • Python 3.11 or newer with the jsonschema package, to check findings.json before fixing anything
  • Optional: state files, or read-only access to the state backend
  • Optional: read-only cloud credentials and audit-log access such as CloudTrail. Without them, coverage and drift are reported as unknown, never as zero or low.
  • Optional: the relevant infrastructure CLI installed locally, if you want the agent to inspect state. The skill never runs apply or refresh.

How it works

The audit is read-only. It runs six checks: resource coverage gaps, state versus live drift, resources created by hand in the console, hardcoded values, state file hygiene and module duplication drift. State hygiene goes first because it decides how far the rest can be trusted.

findings.md includes a named inventory of undefined resources, with a suggested import order you can copy.

The remediate skill reads findings.json only. It imports resources module by module, backs up state first, captures current configuration as it is, and works from leaf resources toward networking, IAM and databases. It never destroys or replaces a resource.

Setup

  1. Unzip the download, then copy the audit and remediate folders into your agent's skills folder (for Claude Code, .claude/skills/) in the repository you want to check.
  2. Back up any state file you want the agent to read, and confirm .gitignore covers state and .tfvars files.
  3. Ask your agent: Run an IaC coverage and drift audit on [scope]. Access available: [repo only, or repo plus read-only cloud credentials]. Mode: audit only.
  4. Check the result with the validator: pip install jsonschema, then python3 schema/validate.py findings.json.
  5. Read findings.md. Once you have reviewed the findings, run the remediate skill using findings.json, or re-run with Mode: audit and remediate.

Run it with your agent

Copy the prompt, fill in the parts in square brackets, and paste it into your agent.

Audit prompt

Run the e2-iac-coverage-drift-audit skill on this repository. Access available: [repo only, or repo plus read-only cloud credentials]. Never run apply or refresh. Mode: audit only. Do not change any code. Write findings.json and findings.md in the repository root.

Fix prompt, after you have findings.json

Run the e2-iac-coverage-drift-remediate skill using findings.json. Work through the findings I choose, and leave the rest open.

What is inside

The files that make up this skill, as your agent reads them.

packages/e2-iac-coverage-drift

audit › SKILL.md

Sign in to download

Use the email and password you signed up with.