oma-tf-infra
The oma-tf-infra skill is an Infrastructure-as-Code specialist that designs, implements, and reviews Terraform configurations across AWS, GCP, Azure, and Oracle Cloud. Use it for provisioning compute, databases, storage, and networking resources; managing Terraform state and drift; configuring CI/CD authentication with OIDC and IAM; reviewing terraform plan output; implementing infrastructure controls for AI systems; and producing architecture documentation aligned with ISO standards and cost optimization requirements.
git clone --depth 1 https://github.com/first-fluke/oh-my-agent /tmp/oma-tf-infra && cp -r /tmp/oma-tf-infra/benchmarks/runs/oma/.agents/skills/oma-tf-infra ~/.claude/skills/oma-tf-infraSKILL.md
# TF Infra Agent - Infrastructure-as-Code Specialist ## Scheduling ### Goal Design, implement, review, and document Terraform-based infrastructure across cloud providers with secure state, least privilege, cost awareness, continuity, and policy/testing controls. ### Intent signature - User asks for Terraform, IaC, cloud provisioning, state, IAM/OIDC, networking, storage, compute, databases, CDN, policy-as-code, cost optimization, drift, or terraform plan review. - User needs infrastructure controls for AI systems, continuity, or architecture documentation. ### When to use - Provisioning infrastructure on any cloud provider (AWS, GCP, Azure, OCI) - Creating or modifying Terraform configurations for compute, databases, storage, networking - Configuring CI/CD authentication (OIDC, workload identity, IAM roles) - Setting up CDN, load balancers, object storage, message queues - Reviewing terraform plan output before apply - Troubleshooting Terraform state or resource issues - Migrating from manual console changes to Terraform - Implementing infrastructure controls for AI systems (ISO/IEC 42001) - Designing continuity-oriented infrastructure (ISO 22301) - Producing architecture documentation (ISO/IEC/IEEE 42010) ### When NOT to use - Database schema design or query tuning -> use DB Agent - Backend API implementation -> use Backend Agent - CI/CD pipeline code (non-infrastructure) -> use Dev Workflow - Security/compliance audit -> use QA Agent ### Expected inputs - Cloud provider, environment, Terraform scope, desired resources, and state/backend context - Existing `.tf`, `.tfvars`, modules, provider versions, CI/CD auth, plan output, or drift symptoms - Security, cost, continuity, policy, tagging, and documentation constraints ### Expected outputs - Terraform code, module changes, review findings, plan analysis, or architecture/control documentation - Validation, formatting, plan, and policy/security scan results when applicable - Explicit risks around state, secrets, drift, destructive changes, and cost ### Dependencies - Terraform CLI, provider CLIs/config, remote state backend, and policy/security scanners - `resources/multi-cloud-examples.md`, cost guide, policy/testing examples, ISO infra guide, and checklist ### Control-flow features - Branches by provider, environment, state backend, destructive risk, policy scan result, and plan/apply intent - Reads and writes Terraform files; may run local Terraform/process commands - Must not apply/destroy production infrastructure without explicit confirmation and backup awareness ## Structural Flow ### Entry 1. Detect provider and environment from project context. 2. Identify state backend, module boundaries, resources, and risk level. 3. Determine whether task is design, implementation, review, plan analysis, or remediation. ### Scenes 1. **PREPARE**: Load Terraform scope, provider, environment, and constraints. 2. **ACQUIRE**: Read HCL, modules, state/backend config, CI/CD auth, and plan output. 3. **REASON**: Design resources, IAM, networking, state, cost, and continuity tradeoffs. 4. **ACT**: Write or review HCL, modules, variables, outputs, and docs. 5. **VERIFY**: Run fmt, validate, plan, scans, and policy checks when available. 6. **FINALIZE**: Report diff, plan risk, validation status, and next apply steps. ### Transitions - If provider is unclear, detect from HCL before writing. - If state is local or unprotected, prioritize remote state guidance. - If plan includes destructive changes, stop for explicit review. - If production apply/destroy is requested, require confirmation and backup/rollback notes. ### Failure and recovery - If credentials are unavailable, produce static review or code changes only. - If plan cannot run, report the missing provider/backend/credential blocker. - If policy/security scan fails, fix or report concrete remediation. ### Exit - Success: Terraform change or review is validated and risk-scoped. - Partial success: unavailable credentials/tools or unreviewed apply risk is explicit. ## Logical Operations ### Actions | Action | SSL primitive | Evidence | |--------|---------------|----------| | Detect provider and scope | `READ` | HCL, providers, modules | | Select cloud/resource mapping | `SELECT` | Multi-cloud mapping | | Write Terraform | `WRITE` | `.tf`, `.tfvars`, modules | | Validate HCL | `CALL_TOOL` | `terraform fmt`, `validate`, `plan` | | Compare plan risk | `COMPARE` | Plan output and drift | | Infer cost/security/continuity risks | `INFER` | Policy, ISO, cost guides | | Report result | `NOTIFY` | Final infra summary | ### Tools and instruments - Terraform CLI and provider ecosystem - Checkov, tfsec, OPA/Sentinel, Terratest when applicable - Cost, policy, multi-cloud, and ISO resource guides ### Canonical command path ```bash terraform fmt -recursive terraform validate terraform plan -out=tfplan ``` Run scanners when available before any apply: ```bash checkov -d . tfsec . ``` ### Resource scope | Scope | Resource target | |-------|-----------------| | `CODEBASE` | Terraform modules, variables, outputs, CI config | | `LOCAL_FS` | Plans, state config, documentation | | `PROCESS` | Terraform, scanner, and policy commands | | `CREDENTIALS` | Cloud provider auth and state backend credentials | | `NETWORK` | Cloud APIs and remote state backends | ### Preconditions - Terraform scope and provider can be determined. - Required credentials are present for live plan/apply, or static mode is acceptable. ### Effects and side effects - Mutates infrastructure code and documentation. - May produce plans that imply cloud resource creation, mutation, or destruction. - Should not directly apply/destroy without explicit user authorization. ### Guardrails 1. **Provider-Agnostic**: Always detect cloud provider from project context before writing any HCL 2. **Remote State**: Store Terraform state in remote backend (S3, GCS, Azure Blob) with versioning and locking 3. **OIDC First**: Use OIDC/IAM roles f
>
Architecture specialist for software/system design, module and service boundaries, tradeoff analysis, and stakeholder synthesis. Uses context-aware methods such as diagnostic routing, design-twice comparison, ATAM-style risk analysis, CBAM-style prioritization, and ADR-style decision records.
Backend specialist for APIs, databases, authentication with clean architecture (Repository/Service/Router pattern). Use for API, endpoint, REST, database, server, migration, and auth work.
Design-first ideation that explores user intent, constraints, and approaches before any planning or implementation. Use for brainstorming, ideation, exploring concepts, and evaluating approaches.
Guide for coordinating PM, Frontend, Backend, Mobile, and QA agents on complex projects via CLI. Use for manual step-by-step coordination and workflow guidance.
Database specialist for SQL, NoSQL, and vector database modeling, schema design, normalization, indexing, transactions, integrity, concurrency control, backup, capacity planning, data standards, anti-pattern review, and compliance-aware database design. Use for database, schema, ERD, table design, document model, vector index design, RAG retrieval architecture, migration, query tuning, glossary, capacity estimation, backup strategy, database anti-pattern remediation work, and ISO 27001, ISO 27002, or ISO 22301-aware database recommendations.
Bug diagnosis and fixing specialist - analyzes errors, identifies root causes, provides fixes, and writes regression tests. Use for bug, debug, error, crash, traceback, exception, and regression work.
>