aws-iac-safety-skill

aws-iac-safety-skill is a skill for OpenCode from darellchua2/opencode-config-template. It costs 43 tokens per session (1,393 once invoked), scanned A, original, Apache-2.0.

A set of safety patterns for AWS infrastructure code and GitHub Actions delivery pipelines. Infrastructure as Code means describing cloud resources in files so they can be created and changed repeatably.

In plain words
What is it for?
Reviewing Terraform or OpenTofu modules, configuring multi-environment CI/CD, managing ECR repositories, and deploying one Docker image to EC2 and Lambda.
Why use it?
It helps avoid resource-ownership mistakes, unsafe deployments, configuration errors, and security problems that can cause outages.

Skill for OpenCode

Written for OpenCode: installed under .opencode/. Also seen: mentions OpenCode.

Good fit Reviewing Terraform or OpenTofu modules, configuring multi-environment CI/CD, managing ECR repositories, and deploying one Docker image to EC2 and Lambda.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/darellchua2/opencode-config-template/aws-iac-safety-skill
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add darellchua2/opencode-config-template --skill aws-iac-safety-skill
Clone the repo
git clone --depth 1 https://github.com/darellchua2/opencode-config-template

Made for: OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for aws-iac-safety-skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/aws-iac-safety-skill.svg)](https://agentmods.dev/skills/darellchua2/opencode-config-template/aws-iac-safety-skill)
Your own site
<a href="https://agentmods.dev/skills/darellchua2/opencode-config-template/aws-iac-safety-skill"><img src="https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/aws-iac-safety-skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,393 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.01393
Opus 5 $0.00022 $0.00696
Sonnet 5 $0.00009 $0.00279
Haiku 4.5 $0.00004 $0.00139

Measured 8d ago against content hash f32af33ca9d0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

aws-iac-safety-skill scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

opencode_app/.opencode/skills/aws-iac-safety-skill/SKILL.md · 154 lines

How it starts

The opening of the file, as written. The whole thing — 154 lines — stays where its author put it; the contents beside it link to each section on GitHub.

What I do

I provide safety patterns for AWS Infrastructure-as-Code (Terraform/OpenTofu) and GitHub Actions CI/CD, extracted from production incidents. Each pattern caused a real outage or security issue.

When to use me

Use this skill when:

  • Writing or reviewing Terraform/OpenTofu modules managing GitHub or AWS resources
  • Setting up multi-environment CI/CD with SSM parameters
  • Managing ECR repositories across multiple modules
  • Deploying the same Docker image to both EC2 and Lambda
  • Auditing IaC for cross-module ownership violations
  • opentofu-aws-explorer-skill: AWS resource discovery (Lambda Function URL CNAME pattern).
  • opentofu-ecr-provision-skill: ECR provisioning (lowercase-safe naming pattern).
  • security-audit-skill: Security auditing (Lambda public-without-auth, local Terraform state patterns).
  • docker-containerization-skill: Docker patterns (no-rollback-on-deploy pattern).

A. GitHub Resource Management

A1. Repo-Level GitHub Resources Without Count Gating

GitHub repo-level variables/secrets are singular — one per name, shared across environments. Without count gating, non-dev environments attempt to create resources that already exist, triggering HTTP 422 conflicts.

# BAD — creates in ALL environments, 422 on non-dev
resource "github_actions_variable" "registry_token" {
  repository = var.repo_name
  variable_name  = "REGISTRY_TOKEN"
  variable_value = var.registry_token
}

# GOOD — only dev creates repo-level resources
resource "github_actions_variable" "registry_token" {
  count          = var.environment == "dev" ? 1 : 0
  repository     = var.repo_name
  variable_name  = "REGISTRY_TOKEN"
  variable_value = var.registry_token
}

Gotcha: The CI cleanup-resources mechanism uses tofu state rm (not import). After state rm, OpenTofu sees no state for the resource and attempts CREATE on the next plan — triggering the 422 again. The fix is count-gating, not state manipulation.

Read the full file on GitHub · 154 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 154 lines · 43 tokens per session scan A f32af33ca9d0

Subscribe to this mod's changes

aws-iac-safety-skill is a skill published in the GitHub repository darellchua2/opencode-config-template (6 stars, last pushed 2d ago), licensed Apache-2.0. It adds 43 tokens to every session and 1,393 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.