Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By jedwards1230v0.7.1MITIn 1 marketplace
OpenTofu quality gates — auto-format on edit, and on stop check formatting (tofu fmt) and validate config (tofu validate), mirroring CI. Includes a /tofu skill carrying recent-release summaries in context.
Claude hands work to one, or you mention it with @.
1 caution to review before installing
A hook runs when Claude writes or edits files
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
OpenTofu quality gates — auto-format on edit (tofu fmt), and on Stop/
SubagentStop/TaskCompleted/TeammateIdle:
tofu fmt -check) — blocks (exit 2) when a modified
.tf / .tofu / .tfvars file is not formatted. Pure and deterministic; no
provider/backend init required.tofu validate) — blocks on genuine validation errors in
directories owning the config files modified on this branch. Mirrors CI's
tofu init -backend=false && tofu validate.All gates are diff-based: they act only on .tf / .tofu / .tfvars /
.tf.json / .tofu.json files modified in the working tree, staged, or on the
current branch vs. its merge-base with the default branch (origin/HEAD,
falling back to origin/main/origin/master and then the local refs). .terraform/ caches and
nested worktrees/ are excluded, and a stop_hook_active guard prevents
infinite Stop loops.
tofu validate requires an initialized working directory. Without
tofu init, it fails with "Missing required provider" even on perfectly valid
config — that's an environment gap, not a code defect. Blocking on it would
false-fire on every Stop. So the validate hook:
tofu init -backend=false -input=false first when a directory has no
.terraform/. Providers are cached via TF_PLUGIN_CACHE_DIR (under the
plugin's persistent data dir), so only the first run hits the network.tofu validate errors once init has
succeeded (or the directory was already initialized).Note: running validate auto-creates a
.terraform/directory (and may write a.terraform.lock.hcl) in initialized config dirs — the same artifactstofu initalways produces..terraform/is conventionally gitignored.
A PostToolUse hook runs tofu fmt <file> in place after every Write/Edit
of a .tf / .tofu / .tfvars file (the gofmt -w equivalent). It never
blocks. JSON config (.tf.json / .tofu.json) is left untouched — tofu fmt
only formats HCL native syntax.
/tofu skillA tofu skill ships a recent-release reference. Its description is always in
context, so a one-line summary of the three latest OpenTofu minor releases
(v1.10–v1.12) rides along in every session — a hedge against the model's
training cutoff predating those releases (e.g. not knowing 1.12 records
all-platform lockfile checksums). Invoke /tofu to load the fuller body:
a sentence or two per release plus deprecation and compatibility one-liners,
with a pointer to https://github.com/opentofu/opentofu/releases for detail.
Keep it current: when a new OpenTofu minor lands, update the three release lines
in the skill description and the matching body section.
In Claude Code Web (CLAUDE_CODE_REMOTE=true), the SessionStart hook installs
the OpenTofu CLI (a single static binary, SHA256-verified) and jq into the
ephemeral environment so the format/validate gates work out of the box.
Provider downloads for validate are not pre-fetched — validate stays
best-effort there.
On a validate failure, the full tofu output is written to a log file and only
the first N lines are emitted to the Stop feedback, followed by a footer
pointing at the log and a reproduce command. This keeps the Stop feedback from
being flooded every turn.
CLAUDE_QUALITY_MAX_LINES env var
(or the CLAUDE_PLUGIN_OPTION_MAX_LINES plugin option, if your host exposes
one).${CLAUDE_PLUGIN_DATA} — the sanctioned persistent
per-plugin dir (~/.claude/plugins/data/{id}/). Falls back to
${TMPDIR:-/tmp} on older hosts. Validate logs are named per directory
(validate-<dir-slug>.log, where the slug is the directory path with every
non-[A-Za-z0-9._-] char replaced by -) so multiple failing directories
don't overwrite each other.tofu (OpenTofu CLI) — brew install opentofujq — used by the hooks to parse hook stdin (loop guard + edited-file path)If a tool is missing the gates degrade gracefully (skip with a warning) rather
than erroring; the SessionStart probe reports what's degraded.
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground
npx claudepluginhub jedwards1230/claude-plugins --plugin tofu-quality