infra-test

infra-test is a skill for Claude Code, Codex from srnichols/plan-forge. It costs 43 tokens per session (1,196 once invoked), scanned A, original, MIT.

A test process for infrastructure-as-code, which means configuration files that define cloud and deployment resources. It checks Bicep, Terraform, PowerShell, and Pester tests, with an optional pre-deployment comparison.

In plain words
What is it for?
Use it to lint Bicep, validate and format Terraform, analyse PowerShell, run unit and integration tests with Pester, and perform an Azure deployment what-if check.
Why use it?
It helps catch configuration errors and failed tests before infrastructure is deployed. It also checks whether a proposed deployment would change resources unexpectedly.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/srnichols/plan-forge/infra-test
Any agent
npx skills add srnichols/plan-forge --skill infra-test
Clone the repo
git clone --depth 1 https://github.com/srnichols/plan-forge

Made for: Claude Code, Codex.

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 infra-test

README.md
[![agentmods](https://agentmods.dev/badge/skills/srnichols/plan-forge/infra-test.svg)](https://agentmods.dev/skills/srnichols/plan-forge/infra-test)
Your own site
<a href="https://agentmods.dev/skills/srnichols/plan-forge/infra-test"><img src="https://agentmods.dev/badge/skills/srnichols/plan-forge/infra-test.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,196 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00043 $0.01196
Opus 5 $0.00022 $0.00598
Sonnet 5 $0.00009 $0.00239
Haiku 4.5 $0.00004 $0.00120

Measured 5d ago against content hash 561ebad91df2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

infra-test 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 5d 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.

presets/azure-iac/.github/skills/infra-test/SKILL.md · 130 lines

How it starts

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

Infrastructure Test Skill

Trigger

"Run infra tests" / "Test infrastructure" / "Validate before deploy" / "Run Pester"

Steps

1. Static Analysis

# PSScriptAnalyzer — PowerShell scripts
Invoke-ScriptAnalyzer -Path ./scripts -Recurse -Severity Error -ReportSummary

# Bicep lint
az bicep lint --file infra/main.bicep

# Terraform
terraform init -backend=false
terraform fmt -check -recursive
terraform validate

2. Pester Unit Tests

Install-Module Pester -MinimumVersion 5.0 -Force -Scope CurrentUser
Import-Module Pester

$config = New-PesterConfiguration
$config.Run.Path          = './tests/unit'
$config.Output.Verbosity  = 'Detailed'
$config.TestResult.Enabled         = $true
$config.TestResult.OutputPath      = 'TestResults-Unit.xml'
$config.TestResult.OutputFormat    = 'JUnitXml'
$config.CodeCoverage.Enabled       = $true
$config.CodeCoverage.Path          = './modules/**/*.ps1'

$result = Invoke-Pester -Configuration $config

if ($result.FailedCount -gt 0) {
    Write-Error "Unit tests failed: $($result.FailedCount) failures"
    exit 1
}

3. Bicep What-If (Pre-deploy Validation)

az deployment group what-if \
  --resource-group $resourceGroup \
  --template-file infra/main.bicep \
  --parameters infra/main.parameters.json \
  --no-pretty-print

4. Terraform Plan

terraform plan -compact-warnings -out=tfplan
terraform show -json tfplan | jq '.resource_changes[] | select(.change.actions[] | contains("delete"))'

5. Integration Tests (Requires Deployed Environment)

# Run against a real environment — requires Az authentication
$config = New-PesterConfiguration
$config.Run.Path = './tests/integration'
$config.Output.Verbosity = 'Detailed'
$config.TestResult.Enabled = $true
$config.TestResult.OutputPath = 'TestResults-Integration.xml'

Invoke-Pester -Configuration $config

Pass / Fail Gates

Gate Command Required
PSScriptAnalyzer Invoke-ScriptAnalyzer -Severity Error
Bicep lint az bicep lint
Pester unit Invoke-Pester ./tests/unit
Bicep what-if az deployment group what-if ✅ pre-deploy
Terraform validate terraform validate
Terraform fmt terraform fmt -check
Pester integration Invoke-Pester ./tests/integration ✅ post-deploy

Read the full file on GitHub · 130 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. 5d ago First seen · 130 lines · 43 tokens per session scan A 561ebad91df2

Subscribe to this mod's changes

infra-test is a skill published in the GitHub repository srnichols/plan-forge (5 stars, last pushed 2d ago), licensed MIT. It adds 43 tokens to every session and 1,196 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.