
oma-tf-infra
Create or review Terraform infrastructure and plans. Use for cloud resources, IAM, networking, state management, and infrastructure changes.
- Installs
- 150
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/gracefullight/stock-checker --skill oma-tf-infra- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads oma-tf-infra automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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
- Detect provider and environment from project context.
- Identify state backend, module boundaries, resources, and risk level.
- Determine whether task is design, implementation, review, plan analysis, or remediation.
Scenes
- PREPARE: Load Terraform scope, provider, environment, and constraints.
- ACQUIRE: Read HCL, modules, state/backend config, CI/CD auth, and plan output.
- REASON: Design resources, IAM, networking, state, cost, and continuity tradeoffs.
- ACT: Write or review HCL, modules, variables, outputs, and docs.
- VERIFY: Run fmt, validate, plan, scans, and policy checks when available.
- 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 (or OpenTofu as a drop-in) and provider ecosystem
- Checkov, Trivy (
trivy config, successor to tfsec), OPA/Sentinel, nativeterraform test, Terratest when applicable - Infracost for plan-time cost estimation when available
- Cost, policy, multi-cloud, and ISO resource guides
Canonical command path
terraform init # required before validate/plan (-backend=false for static-only checks)
terraform fmt -recursive
terraform validate
terraform plan -out=tfplan
Run scanners when available before any apply:
checkov -d .
trivy config . # tfsec is in maintenance mode; Trivy is its successor
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
- Provider-Agnostic: Always detect cloud provider from project context before writing any HCL
- Remote State: Store Terraform state in remote backend (S3, GCS, Azure Blob) with versioning and locking
- OIDC First: Use OIDC/IAM roles for CI/CD authentication instead of long-lived credentials
- Plan Before Apply: Always run
terraform validate,terraform fmt,terraform planbefore apply - Least Privilege: IAM policies must follow least privilege; never use overly permissive policies
- Tag Everything: Apply Environment, Project, Owner, CostCenter tags/labels to all taggable resources
- No Secrets in Code or State: Never hardcode passwords, API keys, or tokens in .tf files; use provider secret management. Remember secret data-source values still persist in plan/state — treat state as sensitive and prefer ephemeral resources (TF >= 1.10) / write-only arguments (TF >= 1.11) where provider support exists
- Composable Modules: Design reusable modules with clear interfaces; avoid monolithic modules
- Environment Sizing: Use environment-based sizing (smaller for dev/staging, production-grade for prod)
- Policy as Code: Run OPA/Sentinel and security scanning (Checkov, Trivy) in CI/CD before apply
- Version Pinning: Version pin all providers and modules; use
for_eachovercount(nevercountwith computed values) - Cost Awareness: Implement lifecycle policies, autoscaling schedules, and review cost estimates before apply
- No Auto-Approve: Never use
auto-approvein production; neverterraform destroywithout backup/confirmation - Drift Detection: Never skip drift detection in production; address deprecation warnings from providers
- AI Systems: Document IAM, logging, encryption, monitoring, and retention controls; prefer private connectivity; limit to infrastructure controls (note when policy/process work belongs elsewhere)
- Continuity: Document backup, failover, dependency visibility, and restore validation with target RTO/RPO (not backup-only)
- Architecture Documentation: Capture stakeholders, concerns, views, interfaces, constraints, and decisions (not a compliance checkbox; improve communication and traceability)
Cloud Provider Detection
| Indicator | Provider |
|---|---|
provider "google" or google_* resources | GCP |
provider "aws" or aws_* resources | AWS |
provider "azurerm" or azurerm_* resources | Azure |
provider "oci" or oci_* resources | Oracle Cloud |
Multi-Cloud Resource Mapping
| Concept | AWS | GCP | Azure | Oracle (OCI) |
|---|---|---|---|---|
| Container Platform | ECS Fargate | Cloud Run | Container Apps | Container Instances |
| Managed Kubernetes | EKS | GKE | AKS | OKE |
| Managed Database | RDS | Cloud SQL | Azure SQL | Autonomous DB |
| Cache/In-Memory | ElastiCache | Memorystore | Azure Cache | OCI Cache |
| Object Storage | S3 | GCS | Blob Storage | Object Storage |
| Queue/Messaging | SQS/SNS | Pub/Sub | Service Bus | OCI Streaming |
| Task Queue | N/A | Cloud Tasks | Queue Storage | N/A |
| CDN | CloudFront | Cloud CDN | Front Door | OCI CDN |
| Load Balancer | ALB/NLB | Cloud Load Balancing | Load Balancer | OCI Load Balancer |
| IAM Role | IAM Role | Service Account | Managed Identity | Dynamic Group |
| Secrets | Secrets Manager | Secret Manager | Key Vault | OCI Vault |
| VPC | VPC | VPC | Virtual Network | VCN |
| Serverless Function | Lambda | Cloud Functions | Functions | OCI Functions |
References
- Execution steps (follow for the selected task):
resources/execution-protocol.md - Self-check (run before handoff):
resources/checklist.md - Examples:
resources/examples.md - Multi-cloud HCL patterns:
resources/multi-cloud-examples.md - Cost optimization:
resources/cost-optimization.md - Policy & testing:
resources/policy-testing-examples.md - ISO controls:
resources/iso-42001-infra.md - Error recovery:
resources/error-playbook.md - Context loading:
../_shared/core/context-loading.md - Clarification:
../_shared/core/clarification-protocol.md - Context budget:
../_shared/core/context-budget.md - Task decomposition:
../_shared/core/difficulty-guide.md(unresolved scope or dependencies) - Lessons learned:
../_shared/core/lessons-learned.md(matching prior failure or requested retrospective) - Observability handoff:
../oma-observability/SKILL.md§Integrations — Collector topology, transport tuning, release metadata
Knowledge Reference
terraform, opentofu, infrastructure-as-code, iac, cloud, aws, gcp, azure, oracle, oci, multi-cloud, devops, provisioning, infrastructure, compute, database, storage, networking, iam, oidc, workload identity, container, kubernetes, serverless, vpc, subnet, load balancer, cdn, secrets management, ephemeral resources, write-only arguments, state management, drift, import block, terraform test, trivy, checkov, infracost, backend, provider
FAQ
What does the oma-tf-infra skill do?
Create or review Terraform infrastructure and plans. Use for cloud resources, IAM, networking, state management, and infrastructure changes.
How do I install oma-tf-infra?
Run npx skills add https://github.com/gracefullight/stock-checker --skill oma-tf-infra in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/oma-tf-infra/ (personal) or .claude/skills/oma-tf-infra/ (project).
Which AI agents can use oma-tf-infra?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is oma-tf-infra safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains oma-tf-infra?
It is published by gracefullight in gracefullight/stock-checker. It has 150 recorded installs.
More from gracefullight/stock-checker
stock-analysis
gracefullight/stock-checker
Analyze stocks and cryptocurrencies using Yahoo Finance data. Supports portfolio management (create, add, remove assets), crypto analysis (Top 20 by market cap), and periodic performance reports (daily/weekly/monthly/quarterly/yearly). 8 analysis dimensions for stocks, 3 for crypto. Use for stock analysis, portfolio tracking, earnings reactions, or crypto monitoring.
yahoo-finance
gracefullight/stock-checker
Get stock prices, quotes, fundamentals, earnings, options, dividends, and analyst ratings using Yahoo Finance. Uses yfinance library - no API key required.
trading-analysis
gracefullight/stock-checker
Generate professional investment reports for stocks and ETFs. Use when user requests market analysis, investment reports, stock analysis, or trading recommendations for financial instruments (SPY, AAPL, TSLA, etc.). Creates institutional-grade reports with technical indicators, AI-powered insights, charts, and investment recommendations.
backtesting-trading-strategies
gracefullight/stock-checker
Backtest crypto and traditional trading strategies against historical data. Calculates performance metrics (Sharpe, Sortino, max drawdown), generates equity curves, and optimizes strategy parameters. Use when user wants to test a trading strategy, validate signals, or compare approaches. Trigger with phrases like "backtest strategy", "test trading strategy", "historical performance", "simulate trades", "optimize parameters", or "validate signals".
financial data fetcher
gracefullight/stock-checker
Fetches real-time and historical market data, financial news, and fundamental data for trading decisions
oma-debug
gracefullight/stock-checker
Open the skill to read its SKILL.md instructions.
Popular devops & cloud skills
microsoft-foundry
microsoft/azure-skills
Build, deploy, evaluate, optimize, fine-tune, and manage Microsoft Foundry agents, models, and resources end to end. USE FOR: foundry, azd ai agent, azd provision/deploy, hosted agent scaffold/develop/run/deploy/troubleshoot, prompt agent create, managed harness agent create, GitHub Copilot harness agent, create agent, update agent, add tool to agent, invoke agent, agent insights, evaluate agent, batch eval, continuous eval, continuous monitoring, agent CI/CD, optimize prompt, improve prompt, optimize agent instructions, Agent Optimizer scaffold, dataset curation from traces, deploy model, model fine-tuning (SFT/DPO/RFT), Foundry project, RBAC, role assignment, permissions, quota, capacity, region, deployment failure, AI Services, create Foundry resource, knowledge index, customize deployment, onboard, availability, training-data, grader, distillation, large file upload. DO NOT USE FOR: Azure Functions, App Service, general Azure deploy (use azure-deploy), general Azure prep (use azure
azure-diagnostics
microsoft/azure-skills
Debug Azure production issues on Azure using AppLens, Azure Monitor, resource health, and safe triage. WHEN: debug production issues, troubleshoot app service, app service high CPU, app service deployment failure, troubleshoot container apps, container app 503 or target port mismatch, troubleshoot functions, function telemetry missing or stopped after a config/connection-string change, troubleshoot AKS, VM RDP, Linux SSH, VM black screen, can't connect to VM, reset VM password, NSG or firewall blocking, kubectl cannot connect, kube-system/CoreDNS failures, pod pending, crashloop, node not ready, upgrade failures, analyze logs, KQL, insights, image pull failures, cold start issues, health probe failures, resource health, root cause of errors, troubleshoot event hubs, troubleshoot service bus, messaging SDK error, AMQP connection failure, message lock lost, lock renewal during long-running processing, service bus dead letter.
azure-prepare
microsoft/azure-skills
Prepare azd-based Azure projects for deployment: generates azure.yaml, infrastructure (Bicep/Terraform), and Dockerfiles for the Azure Developer CLI (azd) workflow. USE ONLY when the user explicitly wants to use azd as the deployment tool, or the project already has an azure.yaml file. DO NOT USE FOR: non-azd deployments, Python App Service code-only deploys (use python-appservice-deploy), or cross-cloud migration (use azure-cloud-migrate). WHEN: prepare app for azd, create azure.yaml, set up azd infrastructure, modernize app for Azure with azd, deploy with azd, function app, timer trigger, service bus trigger, event-driven function, managed identity, generate Bicep, generate Terraform, create and deploy to Azure.
azure-ai
microsoft/azure-skills
Use for Azure AI: Search, Speech, OpenAI, Document Intelligence. Helps with search, vector/hybrid search, speech-to-text, text-to-speech, transcription, OCR. WHEN: AI Search, query search, vector search, hybrid search, semantic search, speech-to-text, text-to-speech, transcribe, OCR, convert text to speech.
azure-deploy
microsoft/azure-skills
Execute Azure deployments for ALREADY-PREPARED applications that have existing .azure/deployment-plan.md and infrastructure files. DO NOT use this skill when the user asks to CREATE a new application — use azure-prepare instead. This skill runs azd up, azd deploy, terraform apply, and az deployment commands with built-in error recovery. Requires .azure/deployment-plan.md from azure-prepare and validated status from azure-validate. WHEN: "run azd up", "run azd deploy", "execute deployment", "push to production", "push to cloud", "go live", "ship it", "bicep deploy", "terraform apply", "publish to Azure", "launch on Azure". DO NOT USE WHEN: "create and deploy", "build and deploy", "create a new app", "set up infrastructure", "create and deploy to Azure using Terraform" — use azure-prepare for these.
azure-validate
microsoft/azure-skills
Pre-deployment validation for Azure readiness. Run deep checks on configuration, infrastructure (Bicep or Terraform), RBAC role assignments, managed identity permissions, and prerequisites before deploying. WHEN: validate my app, check deployment readiness, run preflight checks, verify configuration, check if ready to deploy, validate azure.yaml, validate Bicep, test before deploying, troubleshoot deployment errors, validate Azure Functions, validate function app, validate serverless deployment, verify RBAC roles, check role assignments, review managed identity permissions, what-if analysis, validate Container Apps deployment.