Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
oakoss avatar

Opentofu

  • 91 installs
  • 14 repo stars
  • Updated March 2, 2026
  • oakoss/agent-skills

Helps with ai & agent building tasks during AI-assisted development.

About

opentofu is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.

  • opentofu
  • AI & Agent Building
  • AI-coding skill

Opentofu by the numbers

  • 91 all-time installs (skills.sh)
  • +3 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #4,798 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/oakoss/agent-skills --skill opentofu

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs91
repo stars14
Last updatedMarch 2, 2026
Repositoryoakoss/agent-skills

What it does

Helps with ai & agent building tasks during AI-assisted development.

Files

SKILL.mdMarkdownGitHub ↗

OpenTofu

Overview

OpenTofu is an open-source infrastructure as code tool that uses HCL (HashiCorp Configuration Language) to declaratively manage cloud infrastructure. It is a community-driven fork of Terraform, fully compatible with existing Terraform providers and modules, with exclusive features like native state encryption. Pulumi provides an alternative IaC approach using general-purpose languages (TypeScript, Python, Go) instead of HCL.

When to use: Managing cloud infrastructure declaratively, provisioning multi-cloud resources, enforcing infrastructure consistency across environments, encrypting state at rest (OpenTofu), using familiar programming languages for IaC (Pulumi).

When NOT to use: One-off scripts better suited to CLI tools, application-level configuration management (use Ansible/Chef), container orchestration logic (use Kubernetes manifests), simple static hosting (use platform-native tools).

Quick Reference

PatternTool / CommandKey Points
Initialize projecttofu initDownloads providers, initializes backend
Preview changestofu planShows diff without applying
Apply changestofu applyProvisions/updates resources
Destroy resourcestofu destroyTears down managed infrastructure
Import resourcetofu import <addr> <id>Brings existing resource under management
State encryptionterraform.encryption blockOpenTofu-exclusive, AES-GCM with key providers
Remote backendbackend "s3" / backend "gcs"Store state in cloud storage with locking
Workspacestofu workspace new <name>Isolated state per environment
Module usagemodule "name" { source = "..." }Reusable infrastructure components
Output valuesoutput "name" { value = ... }Expose values for other configs or CI
Variable filesterraform.tfvars / -var-fileEnvironment-specific variable overrides
Pulumi new projectpulumi new typescriptScaffold TypeScript IaC project
Pulumi previewpulumi previewShows planned changes
Pulumi deploypulumi upProvisions/updates resources
Pulumi configpulumi config set key valueStack-scoped configuration
Pulumi secretspulumi config set --secret key valEncrypted config values
Pulumi stackspulumi stack select <name>Switch between environments
Automation APILocalWorkspace.createOrSelectStack()Programmatic stack management

Common Mistakes

MistakeCorrect Pattern
Storing state locally in team environmentsConfigure remote backend (S3, GCS, Azure Blob) with state locking
Hardcoding provider credentials in HCLUse environment variables or provider-specific auth chains
Using tofu apply without reviewing planRun tofu plan -out=plan.tfplan then tofu apply plan.tfplan
Editing state manuallyUse tofu state mv, tofu state rm, or tofu import
Ignoring .terraform.lock.hclCommit lock file for reproducible provider versions
Using count for complex conditional resourcesPrefer for_each with maps for stable resource addressing
Sharing one workspace for all environmentsUse separate workspaces or backend config per environment
Putting secrets in terraform.tfvarsUse sensitive = true variables, vault, or environment variables
Pulumi: creating resources outside component classesWrap related resources in ComponentResource for reuse
Pulumi: not awaiting async operationsEnsure all resource operations complete before stack export
Skipping tofu plan in CI/CDAlways plan and require approval before apply in pipelines
Not using -target carefullyPrefer full plans; -target can leave state inconsistent

Delegation

  • Infrastructure pattern discovery: Use Explore agent
  • IaC code review: Use Task agent
  • Drift detection analysis: Use Task agent
If the amazon-web-services skill is available, delegate AWS resource patterns to it.
If the docker skill is available, delegate container infrastructure patterns to it.
If the github-actions skill is available, delegate CI/CD pipeline patterns to it.

References

  • HCL syntax, resources, data sources, and providers
  • Modules, composition, and reusable infrastructure
  • State management, remote backends, and locking
  • State encryption with OpenTofu-exclusive key providers
  • Variables, outputs, and environment configuration
  • Workspaces and multi-environment setups
  • Import existing infrastructure and migration patterns
  • Pulumi TypeScript and Python SDK patterns
  • Pulumi stacks, config, secrets, and automation API
  • CI/CD integration and drift detection

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.