sync-docs

A command that checks whether a Terraform/OpenTofu codebase and its documentation still agree. It compares module folders, inputs, outputs, and other documented details, then fixes mismatches.

In plain words
What is it for?
Use it to audit module lists, README input and output tables, and other documentation against the code. It is intended for maintaining the rad-modules repository.
Why use it?
Documentation can become outdated as code changes, leading developers to use missing modules, wrong settings, or incorrect examples. This command finds those differences across the listed documentation files.

Command for Claude Code

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 commands/techequitycloud/rad-modules/sync-docs
Clone the repo
git clone --depth 1 https://github.com/techequitycloud/rad-modules

Made for: Claude Code.

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 718 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.00000 $0.00718
Opus 5 $0.00000 $0.00359
Sonnet 5 $0.00000 $0.00144
Haiku 4.5 $0.00000 $0.00072

Measured yesterday against content hash 2c7cd08daa38, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sync-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 yesterday.

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/sync-docs.md · 67 lines

What it actually says

Find and fix all documentation drift between the rad-modules codebase and its docs (CLAUDE.md, README.md, SKILLS.md, AGENTS.md, per-module README.md/<Module>.md, and docs/labs/<Module>.md).

Run every check below and apply fixes directly.


CHECK 1 — MODULE LIST

List every directory under modules/ that is a real module (has main.tf or variables.tf; PascalCase_WithUnderscores name). Compare against: a) The "Module Families" table in CLAUDE.md. b) (Nothing in README.md — it is the upstream OpenTofu project README and carries no module list. Do not add one.) c) Any module enumeration in SKILLS.md and AGENTS.md. Add missing modules; remove entries whose directory no longer exists. Keep the "what it deploys" one-liners accurate.


CHECK 2 — README INPUTS/OUTPUTS TABLES

For each module, compare its README.md ## Inputs table against variables.tf and its ## Outputs table against outputs.tf (and any outputs in main.tf): a) Every variable appears as a row with matching default and a description that matches variables.tf verbatim minus the {{UIMeta ...}} tag. b) Every output appears in the Outputs table. Add missing rows, fix stale defaults/descriptions. Do the same for the ## Requirements and ## Providers tables against versions.tf / provider.tf.


CHECK 3 — LAB GUIDE LINKS

For each module: a) module_documentation default in variables.tf must point at that module's published documentation — https://docs.radmodules.dev/docs/modules/<Module> (the preferred form, used by AKS_GKE/Bank_GKE/EKS_GKE/Istio_GKE/MC_Bank_GKE) or the GitHub URL of docs/labs/<Module>.md (still used by Container_Migration/Migration_Center/VMware_Engine). Fix only if it points at neither — especially a LAB_GUIDE.md. b) README.md links the lab guide as ../../docs/labs/<Module>.md. Fix broken links. c) Confirm docs/labs/<Module>.md exists; if a module has none, report it. d) Report (do not auto-delete) any LAB_GUIDE.md found inside a module directory — that file should not exist; the lab guide always lives under docs/labs/.


CHECK 4 — SKILL FILE ACCURACY

For each .agent/skills/*/SKILL.md, verify any file lists, module names, variable names, or counts it states still match the codebase. Update stale references. Pay attention to module-conventions/SKILL.md (the ten standard variables, provider patterns) and repository-context/SKILL.md.


CHECK 5 — SCRIPT & PATH REFERENCES

Scan CLAUDE.md, AGENTS.md, README.md, and SKILLS.md for references to scripts/<name>, rad-launcher/<name>, and workflow files. Verify each path exists; fix broken references.


After applying all fixes, run tofu fmt -recursive modules/ if any .tf changed, then report a summary of what was updated. 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. yesterday First seen · 67 lines · 0 tokens per session scan A 2c7cd08daa38

Subscribe to this mod's changes

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