Agent skill

Generating Infrastructure As Code

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Execute use when generating infrastructure as code configurations.

MITAuto-check passedDevOps & Cloud

Install Generating Infrastructure As Code

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill generating-infrastructure-as-code -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace generating-infrastructure-as-code --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/generating-infrastructure-as-code .claude/skills/generating-infrastructure-as-code && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
generating-infrastructure-as-code
GitHub stars
2.8k
Token cost
~1.2k tokens
SKILL.md length
480 words
Files
6 (incl. scripts, references, assets)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Execute use when generating infrastructure as code configurations.

  • Works in 10 steps: Identify the IaC tool and cloud provider… → Scan the project for existing IaC files… → Define the modular file structure:… → …
  • Generating infrastructure as code configurations
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 3 more sections
  • Runs Python scripts from its folder; calls terraform, aws and gcloud

What it does

Generating Infrastructure As Code is an agent skill from jeremylongshore/tons-of-skills-marketplace. Execute use when generating infrastructure as code configurations. Trigger with phrases like "create Terraform config", "generate CloudFormation template", "write Pulumi code", or "IaC for AWS/GCP/Azure". Produces production-ready code for Terraform, CloudFormation, Pulumi, ARM templates, and CDK across multiple cloud providers.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including scripts, reference files and assets (for example `assets/README.md`, `assets/iac_config_schema.json` and `references/README.md`). Compatibility notes: Designed for Claude Code

It sits in DevOps & Cloud, covering Infrastructure as code. It works with Terraform, Pulumi, AWS CloudFormation and Amazon Web Services. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Generating infrastructure as code configurations
  • With phrases like create Terraform config
  • Generate CloudFormation template
  • Write Pulumi code

Example prompts

  • “create Terraform config”
  • “generate CloudFormation template”
  • “write Pulumi code”
  • “/generating-infrastructure-as-code”

Requirements

  • Python 3
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Grep, Glob, Bash(terraform:*), Bash(aws:*), Bash(gcloud:*), Bash(az:*)

Workflow steps

10 steps, taken from the first numbered list in SKILL.md.

  1. Identify the IaC tool and cloud provider based on the project requirements and existing codebase
  2. Scan the project for existing IaC files to understand current patterns and conventions
  3. Define the modular file structure: separate files for providers, networking, compute, storage, and databases
  4. Generate the provider configuration with version pinning and remote backend for state storage
  5. Define input variables with types, descriptions, defaults, and validation rules for all configurable values
  6. Write resource definitions following cloud provider best practices: encryption enabled, logging configured, least-privilege IAM
  7. Add outputs for resource identifiers, endpoints, and connection strings needed by other modules or applications
  8. Configure remote state backend: S3 + DynamoDB for Terraform, Pulumi Cloud, or CloudFormation stack exports
  9. Create environment-specific variable files (terraform.tfvars, dev.tfvars, prod.tfvars) for multi-environment deployment
  10. Validate with terraform validate, terraform plan, or equivalent tool-specific linting

What it can do on your machine

Read from SKILL.md and the folder at commit 23ea8d4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Grep
    • Glob
    • Bash(terraform:*)
    • Bash(aws:*)
    • Bash(gcloud:*)
    • Bash(az:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • terraform
    • aws
    • gcloud
    • az

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.aws.amazon.com
    • developer.hashicorp.com
    • pulumi.com
    • learn.microsoft.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Generating Infrastructure As Code loads about 1.2k tokens when it runs, and up to ~1.2k if it reads all its reference files. Until then it costs about 91 tokens; SKILL.md has 480 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~91
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit 23ea8d4, republished under its MIT licence (© jeremylongshore). 480 words, ~1,159 tokens.

Download SKILL.mdSave it as .claude/skills/generating-infrastructure-as-code/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
generating-infrastructure-as-code
description
Execute use when generating infrastructure as code configurations. Trigger with phrases like "create Terraform config", "generate CloudFormation template", "write Pulumi code", or "IaC for AWS/GCP/Azure". Produces production-ready code for Terraform, CloudFormation, Pulumi, ARM templates, and CDK across multiple cloud providers.
allowed-tools
Read, Write, Edit, Grep, Glob, Bash(terraform:*), Bash(aws:*), Bash(gcloud:*), Bash(az:*)
compatibility
Designed for Claude Code
version
1.24.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
license
MIT
tags
devops, terraform, infrastructure-as

Generating Infrastructure as Code

Overview

Generate production-ready infrastructure as code for Terraform, CloudFormation, Pulumi, ARM templates, and AWS CDK. Produce modular, well-structured configurations with proper variable definitions, outputs, remote state management, and deployment guidance for AWS, GCP, and Azure cloud stacks.

Prerequisites

  • Target cloud provider CLI installed and authenticated (aws, gcloud, az)
  • IaC tool installed: Terraform 1.0+, Pulumi 3+, AWS CDK, or relevant SDK
  • Cloud credentials configured with permissions to create the target resources
  • Understanding of the desired infrastructure architecture (compute, networking, storage, database)
  • Version control repository for storing IaC configurations

Instructions

  1. Identify the IaC tool and cloud provider based on the project requirements and existing codebase
  2. Scan the project for existing IaC files to understand current patterns and conventions
  3. Define the modular file structure: separate files for providers, networking, compute, storage, and databases
  4. Generate the provider configuration with version pinning and remote backend for state storage
  5. Define input variables with types, descriptions, defaults, and validation rules for all configurable values
  6. Write resource definitions following cloud provider best practices: encryption enabled, logging configured, least-privilege IAM
  7. Add outputs for resource identifiers, endpoints, and connection strings needed by other modules or applications
  8. Configure remote state backend: S3 + DynamoDB for Terraform, Pulumi Cloud, or CloudFormation stack exports
  9. Create environment-specific variable files (terraform.tfvars, dev.tfvars, prod.tfvars) for multi-environment deployment
  10. Validate with terraform validate, terraform plan, or equivalent tool-specific linting

Output

  • IaC configuration files organized by resource type or module
  • Variable definition files with documented inputs and sensible defaults
  • Output definitions for cross-module references and application configuration
  • Backend configuration for remote state storage
  • Environment-specific variable files for dev, staging, and production
  • Deployment instructions with prerequisite setup and apply commands
Show full SKILL.md (197 more words)Show less

Error Handling

ErrorCauseSolution
Invalid HCL syntaxMalformed Terraform configurationRun terraform validate to identify the error; check bracket matching and attribute syntax
Unable to authenticate with cloud providerMissing or expired credentialsRun aws configure, gcloud auth login, or az login to refresh credentials
Resource already existsTrying to create a resource that exists outside of IaC managementUse terraform import to bring the existing resource under management
Error acquiring state lockAnother process holding the state lockWait for the other process to finish; use terraform force-unlock <ID> if the lock is stale
Dependency cycle detectedResources referencing each other circularlyRefactor to remove the cycle; use data sources or depends_on to establish explicit ordering

Examples

  • "Generate Terraform for a production VPC on AWS with public/private subnets across 3 AZs, NAT gateways, VPC flow logs, and an EKS cluster."
  • "Create a CloudFormation template for an S3 bucket with versioning, server-side encryption (KMS), public access block, and lifecycle rules."
  • "Write Pulumi TypeScript code for a GCP Cloud Run service with a custom domain, Cloud SQL database, and Secret Manager integration."

Resources

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (scripts, references, assets) in skills/.curated/generating-infrastructure-as-code of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • assets/README.md
  • assets/iac_config_schema.json
  • references/README.md
  • scripts/README.md
  • scripts/iac_generate.py

Open the folder on GitHubat commit 23ea8d4

Compare with similar skills

Generating Infrastructure As Code next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Generating Infrastructure As Code compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Generating Infrastructure As Code this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.2kAutomated safety check: PassMIT
Terravision Cloud Diagramspatrickchugh/terravision1.6k—~5.6kAutomated safety check: NotesAGPL-3.0-only
TerrasharkLukasNiessen/terrashark714—~843Automated safety check: PassMIT
Provider Verificationmondoohq/mql411—~3.7kAutomated safety check: PassCustom licence
Terraform Module Librarywshobson/agents40k11 repos~1.3kAutomated safety check: PassMIT
Atmos Migrationcloudposse/atmos1.4k—~5.1kAutomated safety check: WarnApache-2.0

Similar skills

  • Terravision Cloud Diagrams

    patrickchugh/terravision

    Draw cloud architecture diagrams for AWS, Azure or GCP with the official provider icon sets, using TerraVision.

    1.6k GitHub stars~5.6k tokensUpdated 2 days ago
    DevOps & CloudAuto-check: notes
  • Terrashark

    LukasNiessen/terrashark

    Prevent Terraform/OpenTofu hallucinations by diagnosing and fixing failure modes: identity churn, secret exposure, blast-radius mistakes, CI drift, and compliance gate gaps.

    714 GitHub stars~843 tokensUpdated 6 days ago
    DevOps & CloudAuto-check passed
  • Verify mql provider resource/field changes against real cloud infrastructure.

    411 GitHub stars~3.7k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Build reusable, tested Terraform modules for AWS, Azure, GCP and OCI, with a standard file layout, an AWS VPC example, versioning rules and Terratest checks.

    40k GitHub starsUsed in 11 repos~1.3k tokens
    DevOps & CloudAuto-check passed
  • Atmos Migration

    cloudposse/atmos

    Migrate to Atmos from native Terraform, Terraform Workspaces, Terramate, Terragrunt, Make, Just, or Task; migrate tool versions from mise or Aqua CLI; migrate AWS/GCP/Azure CLI configs, Leapp…

    1.4k GitHub stars~5.1k tokensUpdated today
    DevOps & CloudAuto-check: warnings
  • Tsh Implementing Terraform Modules

    TheSoftwareHouse/copilot-collections

    Build reusable Terraform modules for AWS, Azure, and GCP infrastructure following infrastructure-as-code best practices.

    284 GitHub stars~1.6k tokensUpdated 3 days ago
    DevOps & CloudAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Analyzing Text With NLP

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to perform natural language processing and text analysis using the nlp-text-analyzer plugin.

    2.8k GitHub starsUsed in 1 repo~819 tokens
    Auto-check passed
  • Building Neural Networks

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill allows AI assistant to construct and configure neural network architectures using the neural-network-builder plugin.

    2.8k GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed
  • Detecting Data Anomalies

    jeremylongshore/tons-of-skills-marketplace

    Process identify anomalies and outliers in datasets using machine learning algorithms.

    2.8k GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check passed
  • Explaining Machine Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill enables AI assistant to provide interpretability and explainability for machine learning models.

    2.8k GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed
  • Optimizing Prompts

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill optimizes prompts for large language models (llms) to reduce token usage, lower costs, and improve performance.

    2.8k GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed

Categories

Questions about Generating Infrastructure As Code

What does Generating Infrastructure As Code do?

Execute use when generating infrastructure as code configurations. Generating Infrastructure As Code is an agent skill from jeremylongshore/tons-of-skills-marketplace. Execute use when generating infrastructure as code configurations.

When should I use Generating Infrastructure As Code?

Generating Infrastructure As Code fits situations like: generating infrastructure as code configurations; with phrases like create Terraform config; generate CloudFormation template; write Pulumi code.

How do I install Generating Infrastructure As Code in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill generating-infrastructure-as-code -a claude-code`. Or copy the skill folder (skills/.curated/generating-infrastructure-as-code in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/generating-infrastructure-as-code in your project. Claude Code loads it when a task matches its description.

How do I install Generating Infrastructure As Code in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill generating-infrastructure-as-code -a codex`. Or copy the skill folder (skills/.curated/generating-infrastructure-as-code in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/generating-infrastructure-as-code in your project. Codex loads it when a task matches its description.

Can I use Generating Infrastructure As Code in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill generating-infrastructure-as-code -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/generating-infrastructure-as-code, .gemini/skills/generating-infrastructure-as-code, .github/skills/generating-infrastructure-as-code and .opencode/skills/generating-infrastructure-as-code in your project.

What does Generating Infrastructure As Code need to run?

Going by SKILL.md and its folder, Generating Infrastructure As Code needs Python for the scripts in its folder and the command-line tools its instructions call (terraform, aws, gcloud and az). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read, Write, Edit, Grep, Glob, Bash(terraform:*), Bash(aws:*), Bash(gcloud:*), Bash(az:*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Generating Infrastructure As Code access the network?

SKILL.md names 4 domains. As links in the text: docs.aws.amazon.com, developer.hashicorp.com, pulumi.com and learn.microsoft.com. This is read from the text; nothing was executed.

Is Generating Infrastructure As Code safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Generating Infrastructure As Code use?

Generating Infrastructure As Code is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Generating Infrastructure As Code use?

About 1.2k tokens (SKILL.md is roughly 4.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 19 tokens, read only when the agent opens those files.

What are the alternatives to Generating Infrastructure As Code?

Skills that share tags, products or a category with Generating Infrastructure As Code: Terravision Cloud Diagrams (patrickchugh/terravision, 1.6k stars), Terrashark (LukasNiessen/terrashark, 714 stars), Provider Verification (mondoohq/mql, 411 stars) and Terraform Module Library (wshobson/agents, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Generating Infrastructure As Code?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,821 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 8, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.