rad-modules: Command for Claude Code

.claude/commands/add-docs.md

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

A command for creating or updating documentation for rad-modules, which are reusable Terraform infrastructure components.

In plain words
What is it for?
Use it to document selected modules or every module when documentation needs to be generated or refreshed.
Why use it?
It keeps module documentation aligned with the module's inputs, outputs, providers, resources, and project conventions.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions CLAUDE.md.

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/add-docs.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 add-docs

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/techequitycloud/rad-modules/add-docs"><img src="https://agentmods.dev/badge/commands/techequitycloud/rad-modules/add-docs.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 744 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.00744
Opus 5.5 $0.00000 $0.00298
Sonnet 5.5 $0.00000 $0.00149
Haiku 4.5 $0.00000 $0.00074

Measured 1mo ago against content hash 33e582bf84e9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

add-docs 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 1mo 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/add-docs.md · 59 lines

What it actually says

Generate or refresh documentation for one or more rad-modules modules: $ARGUMENTS

$ARGUMENTS is a comma/space-separated list of module names (e.g. "Istio_GKE", "Bank_GKE EKS_GKE"). If empty, process every module under modules/.

For each module, produce/update three artifacts to match variables.tf/outputs.tf and the shapes defined in .agent/skills/module-conventions/SKILL.md → "Documentation". Read an existing well-formed module (Bank_GKE or Container_Migration) first to match table style.


ARTIFACT 1 — README.md (~90–110 lines)

Sections, in order:

  1. One-paragraph overview, including the mig-{deployment_id}-* (or module-appropriate) resource-naming convention.
  2. A link to the lab guide: [<Module>.md](../../docs/labs/<Module>.md). NEVER link to a LAB_GUIDE.md inside the module directory.
  3. ## Usage — a minimal module "<name>" { source = "..." ... } block with the required inputs.
  4. ## Requirements — provider/version table from versions.tf or provider.tf.
  5. ## Providers — the same providers.
  6. ## Modules — only if the module has nested helpers under modules/.
  7. ## Resources — name | type table of the resources the module creates.
  8. ## Inputs — a row for EVERY variable in variables.tf: name, description (verbatim minus the {{UIMeta ...}} tag), type, default, required. Required = "yes" when there is no default.
  9. ## Outputs — a row for every output in outputs.tf (and outputs in main.tf, if any).

The Inputs/Outputs tables must be exhaustive and exact — they are the module's contract.


ARTIFACT 2 — docs/modules/<Module>.md (long-form deep dive, published to the docs site)

An educational deep dive into how the module works: the architecture it provisions, the provider-auth pattern it uses and why, the post-provisioning null_resource flow, key design decisions (e.g. Istio's IstioOperator HPA block, MC_Bank's static provider aliases), and gotchas. This is narrative prose with code excerpts, not a table dump.


ARTIFACT 3 — docs/labs/<Module>.md (shared lab guide)

A hands-on lab guide. Structure: Overview & Architecture → Lab Setup (prereqs, project, bucket, varfile) → numbered Exercises (deploy via rad-launcher, explore, modify) → Cleanup (radlab.py -m <Module> -a delete ...) → Reference. If this file already exists, update it rather than overwriting hand-written exercises.


AFTER GENERATING

  • Set/verify module_documentation default in variables.tf points to the GitHub URL of docs/labs/<Module>.md.
  • Add the module to the "Module Families" table in CLAUDE.md if missing. Do NOT add it to README.md — that file is the upstream OpenTofu project README and has no module list.
  • Report what was written/updated per module. Do not commit unless asked.
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. 1mo ago First seen · 59 lines · 0 tokens per session scan A 33e582bf84e9

Subscribe to this mod's changes

add-docs 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 744 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.