rad-modules: Command for Claude Code

.claude/commands/audit-module.md

audit-module is a command for Claude Code from techequitycloud/rad-modules. It costs 0 tokens per session (869 once invoked), scanned A, original, MPL-2.0.

A checklist command for reviewing a Terraform module, which is a set of files that defines cloud infrastructure. It checks required variables, naming rules, and other project conventions.

In plain words
What is it for?
Use it to audit a named module under the modules/ directory, run mechanical checks, review additional issues, and report the final issue count.
Why use it?
It finds missing or incorrectly defined parts before the module is used or deployed, reducing manual review work and convention-related errors.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

This is techequitycloud/rad-modules's own configuration. It tells Claude Code how to work on rad-modules itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything rad-modules configures →

Reuse

Borrowing it

Nothing to install: this file belongs to techequitycloud/rad-modules. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/techequitycloud/rad-modules/main/.claude/commands/audit-module.md
Clone the repo
git clone --depth 1 https://github.com/techequitycloud/rad-modules

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 audit-module

README.md
[![agentmods](https://agentmods.dev/badge/commands/techequitycloud/rad-modules/audit-module/github.svg)](https://agentmods.dev/commands/techequitycloud/rad-modules/audit-module)
Your own site
<a href="https://agentmods.dev/commands/techequitycloud/rad-modules/audit-module"><img src="https://agentmods.dev/badge/commands/techequitycloud/rad-modules/audit-module/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 audit-module

Your own site · 80×15
<a href="https://agentmods.dev/commands/techequitycloud/rad-modules/audit-module"><img src="https://agentmods.dev/badge/commands/techequitycloud/rad-modules/audit-module.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 869 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.00000 $0.00869
Opus 5.5 $0.00000 $0.00348
Sonnet 5.5 $0.00000 $0.00174
Haiku 4.5 $0.00000 $0.00087

Measured 26d ago against content hash 200ebc9e46b3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

audit-module 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 26d 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.

.claude/commands/audit-module.md · 91 lines

What it actually says

Audit the rad-modules module: $ARGUMENTS

Resolve $ARGUMENTS to a directory under modules/ (e.g. "Istio_GKE", "Bank_GKE", "AKS_GKE"). If it doesn't match a directory, report the available modules and stop.

Run every check below and report findings. For each issue, state what is wrong and the correct fix per .agent/skills/module-conventions/SKILL.md. End with: "Module $ARGUMENTS: N issue(s) found." or "Module $ARGUMENTS passes all checks."

You may run python3 scripts/check_conventions.py --modules-dir modules/ first for the mechanical checks, then add the judgement-based ones below.


CHECK 1 — TEN STANDARD VARIABLES

Read the module's variables.tf. Verify all ten standard variables are declared with the correct names: module_description, module_dependency, module_services, credit_cost, require_credit_purchases, enable_purge, public_access, deployment_id, resource_creator_identity, trusted_users. Also verify enable_services is declared.

Note legitimate exceptions: AKS_GKE, EKS_GKE and Migration_Center omit enable_services (they enable local.default_apis unconditionally); Container_Migration, Gemini_Enterprise, Migration_Center and VMware_Engine omit trusted_users. Report omissions, but classify these as informational for those module types.


CHECK 2 — UIMETA TAGS

Every variable description must contain a {{UIMeta group=N order=M}} tag inside the description string (not a separate comment). Report any variable missing it. Confirm enable_services, where present, uses group=0 order=109.


CHECK 3 — SENSITIVE CREDENTIALS

Any variable whose name contains client_secret, aws_secret_key, aws_access_key, private_key, or service_account_key must set sensitive = true AND must have no hardcoded default (no default, or default = ""). Report violations.


CHECK 4 — PROVIDER AUTH PATTERN

Determine which pattern the module uses and confirm it is internally consistent:

  • Pattern A (direct): a single provider.tf, no impersonation. Used by AKS_GKE, EKS_GKE.
  • Pattern B (impersonated): versions.tf (requirements) + provider-auth.tf declaring both the google and google-beta providers with impersonate_service_account = length(var.resource_creator_identity) != 0 ? var.resource_creator_identity : null.

Flag: both provider.tf and provider-auth.tf present (should be one or the other); a module using google-beta under Pattern A (must be Pattern B); a hardcoded access_token.


CHECK 5 — API ENABLEMENT INVARIANT

For every google_project_service resource (usually in main.tf), confirm BOTH: disable_dependent_services = false disable_on_destroy = false and that it does NOT use lifecycle { prevent_destroy = true }. These are critical: multiple modules share a project, so disabling APIs on destroy breaks the others.


CHECK 6 — LICENSE HEADERS

Every .tf file should begin with the Apache 2.0 block-comment header (Google LLC). Report any .tf file missing it.


CHECK 7 — OUTPUTS

outputs.tf should export at least deployment_id and project_id. For attached-cluster modules that keep outputs in main.tf, confirm those two outputs exist somewhere. Report if absent.


CHECK 8 — DOCUMENTATION CONSISTENCY

a) README.md exists and its Inputs table lists every variable in variables.tf with matching defaults (minus the {{UIMeta}} tag). b) module_documentation default in variables.tf points to the GitHub URL of docs/labs/<Module>.md — NOT a LAB_GUIDE.md inside the module directory. c) The lab guide docs/labs/<Module>.md exists. d) No LAB_GUIDE.md file exists inside the module directory.

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. 26d ago Changed 200ebc9e46b3
  2. 1mo ago First seen · 91 lines · 0 tokens per session scan A d2166e2ae57b

Subscribe to this mod's changes

audit-module is a command published in the GitHub repository techequitycloud/rad-modules (2 stars, last pushed yesterday), licensed MPL-2.0. It costs nothing until one of its globs matches a file; then it loads 869 tokens. 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.