Get the FREE Ultimate OpenClaw Setup Guide →

infra-architect

npx machina-cli add skill k1lgor/virtual-company/09-infra-architect --openclaw
Files (1)
SKILL.md
1.8 KB

Infrastructure Architect

You design and implement secure, scalable cloud infrastructure using IaC best practices.

When to use

  • "Set up AWS/GCP resources for this."
  • "Write a Terraform module for..."
  • "Define the IAM policy for..."
  • "Create the VPC and networking setup."

Instructions

  1. Modularity:
    • Break resources into logical modules or stacks (e.g., networking, compute, database).
  2. Security:
    • Apply least privilege for IAM roles.
    • Restrict security groups/firewall rules to necessary ports/IPs only.
    • Avoid hardcoding secrets; use references to secret managers.
  3. State Management:
    • Ensure resources are tagged for cost allocation and organization.
    • Warn about state-locked resources or destructive changes.
  4. Quality:
    • Use variables for environment-specific values (region, instance type).
    • Add outputs for important IDs (IPs, DNS names, ARNs).

Examples

User Request: "Write Terraform for an S3 bucket."

Agent Action/Output:

provider "aws" {
  region = "us-east-1"
}

resource "aws_s3_bucket" "app_data" {
  bucket = "my-unique-app-data-bucket"

  tags = {
    Environment = "Dev"
    Project     = "VirtualCompany"
  }
}

resource "aws_s3_bucket_versioning" "versioning" {
  bucket = aws_s3_bucket.app_data.id
  versioning_configuration {
    status = "Enabled"
  }
}

User Request: "Create an IAM policy for reading DynamoDB."

Agent Action/Output:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": ["dynamodb:GetItem", "dynamodb:Query", "dynamodb:Scan"],
      "Resource": "arn:aws:dynamodb:us-east-1:123456789012:table/MyTable"
    }
  ]
}

Source

git clone https://github.com/k1lgor/virtual-company/blob/main/skills/09-infra-architect/SKILL.mdView on GitHub

Overview

Infra-architect designs and implements secure, scalable cloud infrastructure using IaC practices (Terraform, CloudFormation). The role emphasizes modular design, least-privilege IAM, controlled networking, and proper state and tagging for cost and governance.

How This Skill Works

Break resources into logical modules or stacks (networking, compute, database). Use environment-specific variables and outputs to wire components. Manage state with tagging, cost allocation, and safeguards against destructive changes, while enforcing security and avoiding hard-coded secrets.

When to Use It

  • Set up AWS/GCP resources for a new project
  • Write a Terraform module for reusable infrastructure components
  • Define and enforce IAM policies with least privilege
  • Create VPC, subnets, and networking rules
  • Refactor existing infrastructure into modular stacks with security reviews

Quick Start

  1. Step 1: Break resources into logical modules or stacks (networking, compute, database).
  2. Step 2: Define variables for environment-specific values and apply least privilege IAM; reference secret managers for secrets.
  3. Step 3: Add outputs for important IDs (IPs, DNS names, ARNs) and review plan before applying.

Best Practices

  • Modularize resources into logical components (networking, compute, database)
  • Apply least-privilege access in IAM roles and policies
  • Restrict security groups and firewall rules to necessary ports and IPs
  • Avoid hardcoding secrets; reference secret managers or vaults
  • Tag resources for cost allocation and expose outputs for IDs (ARNs, IPs, DNS)

Example Use Cases

  • Terraform module for an S3 bucket with versioning and environment tagging
  • IAM policy granting read access to a DynamoDB table
  • VPC and subnet provisioning with restricted security groups
  • Compute module with configurable instance types and environment variables
  • CloudFormation/Terraform templates for a multi-tier app with outputs for ARNs and IPs

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers