infra-test

infra-test is a skill for Claude Code from srnichols/plan-forge. It costs 43 tokens per session (1,198 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 Code

Written for Claude Code: argument-hint in frontmatter.

Good fit 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.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/srnichols/plan-forge/infra-test
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 srnichols/plan-forge --skill infra-test
Clone the repo
git clone --depth 1 https://github.com/srnichols/plan-forge

Made for: Claude Code.

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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for infra-test

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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,198 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.
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.01198
Opus 5.5 $0.00017 $0.00479
Sonnet 5.5 $0.00009 $0.00240
Haiku 4.5 $0.00004 $0.00120

Measured 19d ago against content hash 84453e806261, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 19d 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 6.2.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. 19d ago Changed 84453e806261
  2. 1mo 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 (6 stars, last pushed 7d ago), licensed MIT. It adds 43 tokens to every session and 1,198 once invoked, about $0.0002 per session on Opus 5.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.

Related

Other skills, from other repositories

migrate-xunit-to-xunit-v3

Migrate .NET test projects from xUnit.net v2 to xunit.v3 and fix v3 breaks. Use for package/CPM conversion, OutputType=Exe, preserving the VSTest or MTP runner (including projects currently using YTest.MTP.XUnit2), incompatible TFMs, async void tests, string-to-Type attributes, custom Fact/Theory/BeforeAfterTest…

managedcode/dotnet-skills · 149 tokens

crap-score

Calculates CRAP (Change Risk Anti-Patterns) for a named .NET method, class, or file. USE FOR: explicit CRAP calculation or coverage-and-complexity risk within that named target, including which tests to prioritize. DO NOT USE FOR: project-wide coverage/CRAP, plateaus, or project-wide blockers/priorities…

managedcode/dotnet-skills · 99 tokens

nunit

Write, run, or repair .NET tests that use NUnit. Use when a repo uses NUnit, [Test], [TestCase], [TestFixture], or NUnit3TestAdapter for VSTest or Microsoft.Testing.Platform execution. USE FOR: writing or reviewing NUnit tests; using [Test], [TestCase], [TestFixture], [SetUp], [TearDown] attributes; configuring…

managedcode/dotnet-skills · 146 tokens

diagnostics-mcp

Use dotnet-diagnostics-mcp for MCP-driven .NET CPU, allocation, GC, and test-host profiling. USE FOR: profiling unit tests or investigating runtime bottlenecks. DO NOT USE FOR: writing test assertions, coverage collection, or precise microbenchmark timing. INVOKES: connect the MCP server, select target processes…

managedcode/dotnet-skills · 82 tokens

coverlet

Use the open-source free coverlet toolchain for .NET code coverage. Use when a repo needs line and branch coverage, collector versus MSBuild driver selection, or CI-safe coverage commands. USE FOR: coverlet setup; CI line or branch coverage; choosing between collector and MSBuild drivers. DO NOT USE FOR: coverage…

managedcode/dotnet-skills · 114 tokens

mstest

Write, run, or repair .NET tests that use MSTest. Use when a repo uses MSTest.Sdk, MSTest, [TestClass], [TestMethod], DataRow, or Microsoft.Testing.Platform-based MSTest execution. USE FOR: the repo uses MSTest; you need to add, run, debug, or repair MSTest tests; the repo is moving between VSTest and…

managedcode/dotnet-skills · 139 tokens