agentleFS
Dokkabei97Dokkabei97/forged-claude-code/skills/cto/infra-as-code/SKILL.md

infra-as-code

Skill2 starsChanged 9 months agoMITView on GitHub

Generates Terraform/Pulumi infrastructure code for AWS/GCP/Azure. Provides startup-optimized templates for VPC, databases, compute, CDN, and common cloud architecture patterns.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run terraform apply (destructive, requires your approval)

    line 161

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Infra as Code - Cloud Infrastructure Generator

Overview

Generates reproducible, version-controlled cloud infrastructure. "ClickOps is technical debt."


1. When to Apply

TriggerBehavior
New cloud environment setupFull infrastructure template
"terraform", "IaC"Provider-specific IaC generation
Scaling beyond PaaS (Vercel/Railway)Migration-ready templates

2. Startup Infrastructure Patterns

Pattern A: Minimal (Pre-PMF)

VPC → Public Subnet → ECS Fargate (single service)
                    → RDS PostgreSQL (single instance)
                    → S3 (static assets)
Cost: ~$50-150/month

Pattern B: Standard (Post-PMF)

VPC → Public Subnet  → ALB → ECS Fargate (auto-scaling)
    → Private Subnet → RDS PostgreSQL (multi-AZ)
                     → ElastiCache Redis
                     → S3 + CloudFront (CDN)
Cost: ~$300-800/month

Pattern C: Scale (Series A+)

VPC → Public  → ALB → ECS/EKS (multi-service)
    → Private → RDS (read replicas)
              → ElastiCache (cluster)
              → OpenSearch
              → SQS/SNS (async)
    → Isolated → Bastion host
Cost: ~$1,000-5,000/month

3. Terraform Templates

AWS Minimal Setup

# main.tf
terraform {
  required_providers {
    aws = { source = "hashicorp/aws", version = "~> 5.0" }
  }
  backend "s3" {
    bucket = "myapp-terraform-state"
    key    = "prod/terraform.tfstate"
    region = "ap-northeast-2"
  }
}

provider "aws" {
  region = var.region
}

module "vpc" {
  source  = "terraform-aws-modules/vpc/aws"
  version = "~> 5.0"
  name    = "${var.app_name}-vpc"
  cidr    = "10.0.0.0/16"
  azs             = ["${var.region}a", "${var.region}b"]
  public_subnets  = ["10.0.1.0/24", "10.0.2.0/24"]
  private_subnets = ["10.0.11.0/24", "10.0.12.0/24"]
  enable_nat_gateway = true
  single_nat_gateway = true  # Cost saving for startups
}

Environment Variables

# variables.tf
variable "app_name"    { default = "myapp" }
variable "region"      { default = "ap-northeast-2" }
variable "environment" { default = "production" }
variable "db_password" { sensitive = true }

4. Provider Selection Guide

ProviderBest ForStartup Tier
AWSFull control, most servicesFree tier generous
GCPML/AI workloads, BigQuery$300 credits
AzureEnterprise/.NET$200 credits
VercelFrontend, skip IaC entirelyFree tier
RailwayBackend, skip IaC entirely$5/month

5. Checklist Before Production

- [ ] State file stored remotely (S3/GCS, not local)
- [ ] State file encrypted at rest
- [ ] Secrets in AWS Secrets Manager / SSM, not in .tf files
- [ ] Multi-AZ for database (if budget allows)
- [ ] Backups enabled for database
- [ ] CloudWatch/monitoring alarms set
- [ ] SSL/TLS certificates configured
- [ ] Security groups follow least privilege
- [ ] Tags applied for cost tracking

6. Tool Coordination

ToolPurpose
WriteGenerate Terraform/Pulumi files
ReadAnalyze existing infrastructure code
BashRun terraform plan, terraform validate
GlobFind existing .tf files

7. Boundaries

Will:

  • Generate Terraform/Pulumi templates for common patterns
  • Provide cost estimates per pattern
  • Include security best practices
  • Support AWS, GCP, Azure

Will Not:

  • Run terraform apply (destructive, requires your approval)
  • Manage DNS or domain registration
  • Set up billing alerts (provider-specific console)
  • Replace professional cloud architecture review for scale

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.