JPeetz/agent-skills / skills/devops-infrastructure/infrastructure-as-code-guardian
infrastructure-as-code-guardian
VerifiedUse this skill when authoring, securing, or managing infrastructure as code in Terraform, Pulumi, CloudFormation, Ansible, or Bicep — or when selecting an IaC tool, reviewing modules for security, detecting drift, optimizing cost, or planning a multi-tool migration. Covers AWS, Azure, GCP, and hybrid cloud, with per-tool authoring patterns, CIS/SOC 2 security checklists, drift detection, and cost guardrails across the full IaC lifecycle.
| File | Kind | Size |
|---|---|---|
| CHANGELOG.md | markdown | 4.4 KB |
| LICENSE | other | 1.0 KB |
| SKILL.md | skill md | 29.5 KB |
| evals/evals.json | config | 5.1 KB |
| references/cloud-provider-matrix.md | markdown | 20.7 KB |
| references/iac-patterns.md | markdown | 16.4 KB |
| references/security-hardening.md | markdown | 22.1 KB |
| scripts/drift-check.shexecutable | script | 16.1 KB |
| scripts/security-scan-iac.shexecutable | script | 19.2 KB |
| scripts/validate-iac.shexecutable | script | 14.0 KB |
CHANGELOG.md
View on GitHub# Changelog
All notable changes to the Infrastructure as Code Guardian skill will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
---
## Unreleased
### Changed
- Description rewritten to be trigger-first ("Use this skill when ...") and under 1024 chars per the agentskills.io spec.
## [1.0.0] — 2026-06-09
### Added
- **SKILL.md** — Complete universal IaC agent skill definition with:
- YAML frontmatter with SEO-optimized description, platforms, and tags
- 15 positive activation triggers and 3 near-miss negatives
- Tool selection decision tree covering Terraform, Pulumi, CloudFormation, Ansible, Bicep, Crossplane, and OpenTofu
- Quick comparison matrix across 6 dimensions
- Per-tool authoring guidelines with code examples (Terraform HCL, Pulumi TypeScript/Python, CloudFormation YAML, Ansible YAML, Bicep)
- Comprehensive security hardening checklist (6 categories, 40+ items)
- State management best practices (10 rules for Terraform, 5 for Pulumi, 4 for CloudFormation)
- Drift detection workflow with CI/CD integration and remediation patterns
- Migration patterns (CloudFormation → Terraform, Terraform → Pulumi, ARM → Bicep)
- Quick Reference with 30+ one-liner commands
- 10 common pitfalls with detection and remediation
- SEO metadata section with primary/secondary keywords and search intent alignment
- **scripts/validate-iac.sh** — Auto-detection IaC validation script:
- Supports Terraform, Pulumi, CloudFormation, Ansible, Bicep
- JSON output mode for CI/CD pipelines
- Fail-fast option for quick feedback
- Color-coded console output
- **scripts/security-scan-iac.sh** — Multi-tool security scanner:
- Integrates tfsec, checkov, trivy, cfn-nag, ansible-lint
- Universal secret scanning (gitleaks, trufflehog, grep fallback)
- Compliance framework filtering (CIS, SOC2, PCI-DSS, HIPAA, ISO27001)
- Severity-based failure thresholds (CRITICAL/HIGH/MEDIUM/LOW)
- SARIF/JSON output
- **scripts/drift-check.sh** — Cross-tool drift detection:
- Terraform plan with detailed exit code
- Pulumi refresh with diff
- CloudFormation stack drift detection + resource-level analysis
- Bicep what-if deployment
- Ansible --check --diff for configuration drift
- Slack webhook alerting
- Optional auto-remediation mode
- **references/iac-patterns.md** — Reusable IaC patterns:
- Module composition (flat vs. layered vs. domain-oriented)
- Environment stratification with ephemeral feature branch environments
- Remote state architecture with access control
- GitOps CI/CD pipeline with directory-based apply
- Multi-cloud abstraction patterns
- Cost optimization (tagging, auto-scaling, lifecycle policies)
- Disaster recovery (multi-region active-passive)
- Zero-downtime deployment (blue-green, rolling updates, DB migrations)
- **references/security-hardening.md** — Security checklist and patterns:
- IAM least privilege with permission boundaries and SCPs
- Secret management hierarchy (Tier 0–4) with vault integration
- Encryption at rest per-service requirements table
- Network defense-in-depth layering with security group templates
- Logging and audit trail configuration
- SOC 2 and CIS AWS Foundations benchmark mappings
- Automated enforcement (pre-commit hooks, CI/CD gates, Pulumi policy packs)
- Secret rotation schedule and strategy
- Incident response readiness (infrastructure freeze via SCP, audit log correlation)
- **references/cloud-provider-matrix.md** — AWS/Azure/GCP feature parity:
- Compute, containers, serverless, storage, databases, networking
- Security & identity, monitoring & observability, CI/CD
- Multi-cloud resource mapping table for common workloads
- VPC architecture comparison (AWS, Azure, GCP)
- Migration decision matrix
- Cross-cloud resource patterns with Terraform code examples
- **evals/evals.json** — 7 evaluation cases:
- 5 positive triggers covering Terraform authoring, Pulumi security audit, drift detection, CloudFormation migration, tool selection
- 2 near-miss negatives (Docker deployment, SSH troubleshooting)
### Infrastructure
- MIT License
- Complete directory structure with scripts/, references/, evals/
- All shell scripts are executable and include comprehensive usage documentation
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |