google-agents-cli-scaffold
Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.
infra-terraform
Enforces Terraform best practices for safe and scalable infrastructure as code. Emphasizes modularity, state management, and security. Automatically applied for IaC implementation.
Full skill instructions
This skill provides best practices for Terraform infrastructure management. It emphasizes module design, state management, security, and CI/โCD integration to build reliable infrastructure.
This skill is automatically applied when:
.tf, .tfvars)terraform-project/
โโโ environments/ # Environment-specific root modules
โ โโโ dev/
โ โ โโโ main.tf
โ โ โโโ variables.tf
โ โ โโโ outputs.tf
โ โ โโโ terraform.tfvars
โ โ โโโ backend.tf
โ โโโ staging/
โ โ โโโ ...
โ โโโ prod/
โ โโโ ...
โโโ modules/ # Reusable modules
โ โโโ network/
โ โ โโโ main.tf
โ โ โโโ variables.tf
โ โ โโโ outputs.tf
โ โ โโโ README.md
โ โโโ compute/
โ โ โโโ ...
โ โโโ database/
โ โโโ ...
โโโ .terraform.lock.hcl # Provider version lock
โโโ .gitignore
โโโ README.md
main.tf - Main resource definitionsvariables.tf - Input variable declarationsoutputs.tf - Output value declarationsversions.tf - Terraform/โprovider versionsbackend.tf - Remote backend configurationdata.tf - Data source definitions (optional)locals.tf - Local variable definitions (optional)# modules/โnetwork/โmain.tf
resource "aws_vpc" "main" {
cidr_block = var.vpc_cidr
enable_dns_hostnames = var.enable_dns_hostnames
enable_dns_support = var.enable_dns_support
tags = merge(
var.tags,
{
Name = "${var.environment}-vpc"
}
)
}
resource "aws_subnet" "public" {
count = length(var.public_subnet_cidrs)
vpc_id = aws_vpc.main.id
cidr_block = var.public_subnet_cidrs[count.index]
availability_zone = var.availability_zones[count.index]
map_public_ip_on_launch = true
tags = merge(
var.tags,
{
Name = "${var.environment}-public-subnet-${count.index + 1}"
Type = "public"
}
)
}
# modules/โnetwork/โvariables.tf
variable "environment" {
description = "Environment name (e.g., dev, staging, prod)"
type = string
validation {
condition = contains(["dev", "staging", "prod"], var.environment)
error_message = "Environment must be dev, staging, or prod."
}
}
variable "vpc_cidr" {
description = "CIDR block for VPC"
type = string
default = "10.0.0.0/โ16"
}
variable "public_subnet_cidrs" {
description = "List of CIDR blocks for public subnets"
type = list(string)
validation {
condition = alltrue([
for cidr in var.public_subnet_cidrs : can(cidrnetmask(cidr))
])
error_message = "All subnet CIDRs must be valid CIDR blocks."
}
}
variable "tags" {
description = "Common tags to apply to all resources"
type = map(string)
default = {}
}
# modules/โnetwork/โoutputs.tf
output "vpc_id" {
description = "ID of the VPC"
value = aws_vpc.main.id
}
output "public_subnet_ids" {
description = "List of public subnet IDs"
value = aws_subnet.public[*].id
}
output "vpc_cidr_block" {
description = "CIDR block of the VPC"
value = aws_vpc.main.cidr_block
}
# environments/โprod/โmain.tf
module "network" {
source = "../โ../โmodules/โnetwork"
environment = "prod"
vpc_cidr = "10.0.0.0/โ16"
public_subnet_cidrs = ["10.0.1.0/โ24", "10.0.2.0/โ24", "10.0.3.0/โ24"]
availability_zones = ["ap-northeast-1a", "ap-northeast-1c", "ap-northeast-1d"]
tags = local.common_tags
}
module "compute" {
source = "../โ../โmodules/โcompute"
environment = "prod"
vpc_id = module.network.vpc_id
subnet_ids = module.network.public_subnet_ids
instance_type = "t3.medium"
tags = local.common_tags
}
# environments/โprod/โbackend.tf
terraform {
backend "s3" {
bucket = "mycompany-terraform-state-prod"
key = "prod/โterraform.tfstate"
region = "ap-northeast-1"
encrypt = true
dynamodb_table = "terraform-state-lock-prod"
# Enable versioning (recommended)
versioning = true
}
}
# Separate by environment
environments/
โโโ dev/ # dev environment state
โโโ staging/ # staging environment state
โโโ prod/ # prod environment state (most strictly managed)
# Or use workspaces
terraform workspace new dev
terraform workspace new staging
terraform workspace new prod
# Create DynamoDB table (for AWS)
resource "aws_dynamodb_table" "terraform_lock" {
name = "terraform-state-lock-${var.environment}"
billing_mode = "PAY_PER_REQUEST"
hash_key = "LockID"
attribute {
name = "LockID"
type = "S"
}
tags = {
Name = "Terraform State Lock Table"
Environment = var.environment
}
}
# versions.tf
terraform {
required_version = ">= 1.5.0"
required_providers {
aws = {
source = "hashicorp/โaws"
version = "~> 5.0"
}
random = {
source = "hashicorp/โrandom"
version = "~> 3.5"
}
}
}
provider "aws" {
region = var.aws_region
default_tags {
tags = local.common_tags
}
}
# variables.tf
variable "environment" {
description = "Environment name"
type = string
}
variable "instance_count" {
description = "Number of instances to create"
type = number
default = 1
validation {
condition = var.instance_count > 0 && var.instance_count <= 10
error_message = "Instance count must be between 1 and 10."
}
}
variable "enable_monitoring" {
description = "Enable detailed monitoring"
type = bool
default = false
}
variable "tags" {
description = "Resource tags"
type = map(string)
default = {}
}
# environments/โprod/โterraform.tfvars
environment = "prod"
aws_region = "ap-northeast-1"
instance_count = 3
instance_type = "t3.large"
enable_monitoring = true
tags = {
Project = "MyApp"
ManagedBy = "Terraform"
CostCenter = "Engineering"
}
# locals.tf
locals {
common_tags = merge(
var.tags,
{
Environment = var.environment
ManagedBy = "Terraform"
Timestamp = timestamp()
}
)
# Environment-specific configuration
instance_type = {
dev = "t3.micro"
staging = "t3.small"
prod = "t3.large"
}
current_instance_type = local.instance_type[var.environment]
}
# โ BAD - Hardcoded secrets
resource "aws_db_instance" "bad" {
password = "hardcoded-password" # Never do this
}
# โ
GOOD - Use Secrets Manager
data "aws_secretsmanager_secret_version" "db_password" {
secret_id = "prod/โdb/โpassword"
}
resource "aws_db_instance" "good" {
password = data.aws_secretsmanager_secret_version.db_password.secret_string
}
# โ
GOOD - Use environment variables
variable "db_password" {
description = "Database password"
type = string
sensitive = true
}
variable "api_key" {
description = "API key for external service"
type = string
sensitive = true
}
output "connection_string" {
description = "Database connection string"
value = aws_db_instance.main.endpoint
sensitive = true
}
resource "aws_iam_role_policy" "app" {
name = "${var.environment}-app-policy"
role = aws_iam_role.app.id
policy = jsonencode({
Version = "2012-10-17"
Statement = [
{
Effect = "Allow"
Action = [
"s3:GetObject",
"s3:PutObject"
]
Resource = "${aws_s3_bucket.app.arn}/โ*"
}
]
})
}
# Naming pattern: {environment}-{service}-{resource-type}-{index}
resource "aws_instance" "web" {
count = var.instance_count
tags = {
Name = "${var.environment}-web-server-${count.index + 1}"
}
}
# Example: prod-web-server-1, prod-web-server-2, prod-web-server-3
# Reference existing resources
data "aws_ami" "amazon_linux" {
most_recent = true
owners = ["amazon"]
filter {
name = "name"
values = ["amzn2-ami-hvm-*-x86_64-gp2"]
}
}
data "aws_vpc" "existing" {
id = var.vpc_id
}
resource "aws_instance" "app" {
ami = data.aws_ami.amazon_linux.id
instance_type = var.instance_type
subnet_id = data.aws_vpc.existing.subnet_ids[0]
}
resource "aws_instance" "web" {
count = var.create_instances ? var.instance_count : 0
ami = data.aws_ami.amazon_linux.id
instance_type = var.instance_type
}
variable "users" {
type = map(object({
role = string
}))
default = {
"alice" = { role = "admin" }
"bob" = { role = "developer" }
}
}
resource "aws_iam_user" "users" {
for_each = var.users
name = each.key
tags = {
Role = each.value.role
}
}
resource "aws_security_group" "app" {
name = "${var.environment}-app-sg"
vpc_id = var.vpc_id
dynamic "ingress" {
for_each = var.ingress_rules
content {
from_port = ingress.value.from_port
to_port = ingress.value.to_port
protocol = ingress.value.protocol
cidr_blocks = ingress.value.cidr_blocks
}
}
}
# .github/โworkflows/โterraform.yml
name: Terraform CI/โCD
on:
pull_request:
paths:
- 'terraform/โ**'
push:
branches:
- main
jobs:
terraform:
runs-on: ubuntu-latest
steps:
- uses: actions/โcheckout@v3
- name: Setup Terraform
uses: hashicorp/โsetup-terraform@v2
with:
terraform_version: 1.5.0
- name: Terraform Format Check
run: terraform fmt -check -recursive
- name: Terraform Init
run: terraform init
working-directory: ./โenvironments/โprod
- name: Terraform Validate
run: terraform validate
working-directory: ./โenvironments/โprod
- name: Terraform Plan
run: terraform plan -out=tfplan
working-directory: ./โenvironments/โprod
- name: Terraform Apply
if: github.ref == 'refs/โheads/โmain'
run: terraform apply -auto-approve tfplan
working-directory: ./โenvironments/โprod
# .pre-commit-config.yaml
repos:
- repo: https://github.com/โantonbabenko/โpre-commit-terraform
rev: v1.83.0
hooks:
- id: terraform_fmt
- id: terraform_validate
- id: terraform_docs
- id: terraform_tflint
terraform fmtterraform validateterraform planterraform destroy in production# Show state file
terraform show
# List state file contents
terraform state list
# Show specific resource details
terraform state show aws_instance.web[0]
# Import existing resources
terraform import aws_instance.web i-1234567890abcdef0
# Refresh state (fix drift)
terraform refresh
# Detect drift
terraform plan -detailed-exitcode
# Cost allocation via tags
locals {
cost_tags = {
CostCenter = var.cost_center
Project = var.project_name
Environment = var.environment
}
}
# Auto-shutdown for non-production (example)
resource "aws_instance" "app" {
# ... other configuration ...
# Only run in production 24/โ7
count = var.environment == "prod" ? var.instance_count : 0
tags = merge(
local.cost_tags,
{
AutoShutdown = var.environment != "prod" ? "true" : "false"
}
)
}
This skill ensures:
Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.
Set up tracing, logging, and monitoring for deployed ADK agents across Cloud Trace, BigQuery, and third-party platforms.
Enterprise Azure infrastructure architect generating Bicep or Terraform from workload descriptions.
Plan and configure production-ready Azure Kubernetes Service clusters with Day-0 and Day-1 best practices.
Raw mechanical interfaces fusing Swiss typographic print with military terminal aesthetics. Rigid grids, extreme type scale contrast, utilitarian color, analog degradation effects. For data-heavy dashboards, portfolios, or editorial sites that need to feel like declassified blueprints.
Web search, scraping, extraction, crawling, and monitoring via ScrapeGraph AI CLI.
Skill for working with Firebase Hosting (Classic). Use this when you want to deploy static web apps, Single Page Apps (SPAs), or simple microservices. Do NOT use for Firebase App Hosting.
Deploy and manage web apps with Firebase App Hosting. Use this skill when deploying Next.js/Angular apps with backends.
Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".
Build SEO-optimized pages at scale using templates, data, and proven playbook patterns.
Design and build isolated, reusable Convex backend components with clear boundaries and app-facing wrappers.
Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login โ e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".
Opus.ai: Revolutionize Your Web Experience
Build a no-code AI app in minutes.
An IDE for code migration from legacy to modern frameworks through coding agents.
Automate CGI animation in live-action scenes
Branded artistic QR-code concepts
Launch a website in seconds with AI.
Streamline Your Coding Experience with AI Code Helper
Convert any screenshot or design to clean code.