infrastructure-as-code

infrastructure-as-code is a skill for Claude Code from atretyak1985/swarmery. It costs 78 tokens per session (3,778 once invoked), scanned A, original, Apache-2.0.

A guide for infrastructure as code, where server and cloud configuration is stored in files instead of being changed only by hand. It checks whether live Kubernetes, database, or cloud settings match those files.

In plain words
What is it for?
Use it to detect configuration drift, record manual fixes in the right source files, prepare populated settings files, and diagnose unresolved variables in Kubernetes secrets.
Why use it?
It prevents manual fixes from being lost and helps ensure a new environment can be deployed from the repository alone.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./files/mapEnvValuesFromEnv.sh -en <envAlias>.

Part of the infra-pack plugin — 11 skills, 1 command, 3 agents shipped together

Good fit Use it to detect configuration drift, record manual fixes in the right source files, prepare populated settings files, and diagnose unresolved variables in Kubernetes secrets.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/atretyak1985/swarmery
agentmods
npx agentmods add skills/atretyak1985/swarmery/infrastructure-as-code

Made for: Claude Code.

Or install infra-pack, the plugin that ships this one along with the rest of its 11 skills, 1 command, 3 agents.

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 infrastructure-as-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/atretyak1985/swarmery/infrastructure-as-code.svg)](https://agentmods.dev/skills/atretyak1985/swarmery/infrastructure-as-code)
Your own site
<a href="https://agentmods.dev/skills/atretyak1985/swarmery/infrastructure-as-code"><img src="https://agentmods.dev/badge/skills/atretyak1985/swarmery/infrastructure-as-code.svg" alt="Measured on agentmods" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,778 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.00078 $0.03778
Opus 5 $0.00039 $0.01889
Sonnet 5 $0.00016 $0.00756
Haiku 4.5 $0.00008 $0.00378

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

Security

Grade A, and why

infrastructure-as-code 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 4d 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.

plugins/infra-pack/skills/infrastructure-as-code/SKILL.md · 294 lines

How it starts

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

Purpose

Enforce the invariant that a fresh server deploy of the project must succeed from code alone, without any manual kubectl patch, kubectl exec, or helm --set overrides that are not persisted. Covers config drift detection, the populated values pattern, post-incident IaC capture, and the "Where Changes Go" decision map.

When to use this skill (triggers)

  • Deploying the platform to a new server or environment and verifying all config is in code
  • Auditing config drift after manual cluster fixes (kubectl patch, psql exec, gcloud console changes)
  • Preparing or regenerating .populated.yaml values files via the infrastructure repo's mapEnvValuesFromEnv.sh (or equivalent env-mapping script)
  • Verifying that all manual cluster changes are captured in the correct source file (Helm values, Terraform, migration script)
  • Diagnosing literal $VARIABLE_NAME strings appearing in K8s Secrets

When NOT to use this skill (anti-triggers)

  • Writing or debugging Helm chart templates -- use helm-chart-expert
  • Checking migration safety or schema alignment -- use migration-check
  • Deploying the edge service (project.json → device) to edge devices or managing k3s -- use kubernetes-deployment
  • Managing Keycloak realm/client configuration -- use keycloak

Required environment (Runtime: .claude/skills/infrastructure-as-code/SKILL.md)

  • Tools/libraries: helm (v3.10+), kubectl, terraform, diff, bash
  • Scripts: the infrastructure repo's files/mapEnvValuesFromEnv.sh and files/runDatabaseMigrations.sh (or the project's equivalents)
  • Repos: the infrastructure, chart, and Terraform repos (project.json → repos)

Terraform environment layout (canonical reference)

Canonical doc: the Terraform repo's README §Environment layout. Read it before adding any new resource; it is the single source of truth for current vs legacy env dirs.

Common patterns to watch for:

Element Pattern
Active env dirs the currently maintained environments/<org>/{shared,dev,...} tree
Legacy (DEAD) env dirs superseded environments/... trees whose backend state buckets no longer exist -- do not add resources there
GCS state bucket often a single bucket, with per-env discrimination via prefix = "iac/env-<name>"
Terraform runner GCP project may differ from the cluster's GCP project -- trust the repo README, not stale variable defaults
Environment naming the staging alias (project.json → cloud.envAlias) may appear as dev in Terraform paths -- same environment
Cutover history look for cutover notes committed alongside the env dirs

Read the full file on GitHub · 294 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. 4d ago First seen · 294 lines · 78 tokens per session scan A 7e56a65034eb

Subscribe to this mod's changes

infrastructure-as-code is a skill published in the GitHub repository atretyak1985/swarmery (4 stars, last pushed today), licensed Apache-2.0. It adds 78 tokens to every session and 3,778 once invoked, about $0.0004 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-09-03.

Related

Other skills, from other repositories

tailscale

This skill should be used when managing Tailscale mesh VPN networks. Use when the user asks to "check tailscale status", "list tailscale devices", "ping a device", "send file via tailscale", "tailscale funnel", "tailscale serve", "create auth key", "check who's online", "tailscale exit node", "Magic DNS", or mentions…

jmagar/claude-homelab · 93 tokens

gws-script

Apps Script: Deploy and manage Google Apps Script projects with gws script +push.

fakoli/fakoli-plugins · 21 tokens

linkerd-patterns

Implement Linkerd service mesh patterns for lightweight, security-focused service mesh deployments. Use when setting up Linkerd, configuring traffic policies, or implementing zero-trust networking with minimal overhead.

wshobson/agents · 41 tokens

azure-resource-manager-durabletask-dotnet

Azure Resource Manager SDK for Durable Task Scheduler in .NET. Use for MANAGEMENT PLANE operations: creating/managing Durable Task Schedulers, Task Hubs, and retention policies via Azure Resource Manager. Triggers: "Durable Task Scheduler", "create scheduler", "task hub", "DurableTaskSchedulerResource", "provision…

microsoft/skills · 84 tokens

azure-eventhub-dotnet

Azure Event Hubs SDK for .NET. Use for high-throughput event streaming: sending events (EventHubProducerClient, EventHubBufferedProducerClient), receiving events (EventProcessorClient with checkpointing), partition management, and real-time data ingestion. Triggers: "Event Hubs", "event streaming"…

microsoft/skills · 94 tokens

azure-mgmt-botservice-dotnet

Azure Resource Manager SDK for Bot Service in .NET. Management plane operations for creating and managing Azure Bot resources, channels (Teams, DirectLine, Slack), and connection settings. Triggers: "Bot Service", "BotResource", "Azure Bot", "DirectLine channel", "Teams channel", "bot management .NET", "create bot".

microsoft/skills · 78 tokens