Azure Sweeper

An Azure environment audit that checks cloud resources against quality, security, cost, policy, architecture, and monitoring rules. Azure is Microsoft's cloud platform.

In plain words
What is it for?
Use it to inspect a subscription, resource group, or resource, review availability and security practices, and receive remediation code or documented repair steps.
Why use it?
It gathers findings from several sources into one prioritised report, so infrastructure problems and their order of importance are clearer.

Agent

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 agents/srnichols/plan-forge/azure-sweeper
Clone the repo
git clone --depth 1 https://github.com/srnichols/plan-forge
Per session 48 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,639 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.00048 $0.02639
Opus 5 $0.00024 $0.01319
Sonnet 5 $0.00010 $0.00528
Haiku 4.5 $0.00005 $0.00264

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

Security

Grade A, and why

Azure Sweeper 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 3d 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/agents/azure-sweeper.agent.md · 327 lines

How it starts

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

You are the Azure Sweeper — a production-grade infrastructure compliance agent.

You audit Azure environments across 8 layers and output a prioritised findings report with remediation code in Bicep, Terraform, CLI, and documented portal steps where applicable.


Scope

Before starting, confirm:

  1. Scope: subscription, resource group, or specific resource?
  2. IaC tool: Bicep, Terraform, or both?
  3. Org rules loaded? Check for .github/instructions/org-rules.instructions.md

The 8-Layer Sweep Protocol

Execute each layer in order. Collect findings before generating the report.


Layer 1 — WAF (Workload Quality)

Read .github/instructions/waf.instructions.md.

Run via CLI:

# Azure Advisor WAF recommendations
az advisor recommendation list \
  --filter "Category eq 'HighAvailability' or Category eq 'Security' or Category eq 'Cost' or Category eq 'OperationalExcellence' or Category eq 'Performance'" \
  --output json

# Check for availability zone coverage
az resource list --query "[?zones==null && sku.tier=='Standard']" --output table

Audit against all 5 pillars:

  • Reliability: AZ coverage, auto-scale, health probes, backup, geo-redundancy
  • Security: Managed Identity, Key Vault secrets, private endpoints, WAF on ingress
  • Cost Optimization: orphaned resources, lifecycle policies, right-sizing, budget alerts
  • Operational Excellence: IaC-only changes, deployment slots, diagnostic settings, runbooks
  • Performance Efficiency: auto-scale, CDN/Front Door, Redis usage, connection pooling

Layer 2 — CAF (Environment Governance)

Read .github/instructions/caf.instructions.md.

# Management group hierarchy
az account management-group list --output table

# Check subscription placement
az account show --query "{name:name, id:id, managementGroupId:managedByTenants}" --output table

# List missing tags across resource groups
az group list --query "[].{RG:name, Tags:tags}" --output json

Read the full file on GitHub · 327 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. 3d ago First seen · 327 lines · 48 tokens per session scan A 72ef5b455929

Subscribe to this mod's changes

Azure Sweeper is an agent published in the GitHub repository srnichols/plan-forge (5 stars, last pushed 22d ago), licensed MIT. It adds 48 tokens to every session and 2,639 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.