iron-law-judge

iron-law-judge is an agent for Claude Code from slbug/claude-ruby-grape-rails. It costs 30 tokens per session (2,377 once invoked), scanned A, original, MIT.

A review agent for Ruby, Rails, and Grape code that checks for violations of a project's Iron Laws, such as unsafe database queries or incorrect money types. It writes its findings to a review file.

In plain words
What is it for?
Use it proactively after Ruby code changes or during review to identify violations of the project's registered development rules.
Why use it?
It catches recurring implementation mistakes during code review and gives the project one place to inspect the findings.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter; names the NotebookEdit tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the ruby-grape-rails plugin — 52 skills, 19 agents, 17 hooks shipped together

Good fit Use it proactively after Ruby code changes or during review to identify violations of the project's registered development rules.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add slbug/claude-ruby-grape-rails
Claude Code
/plugin install ruby-grape-rails

Made for: Claude Code.

Or install ruby-grape-rails, the plugin that ships this one along with the rest of its 52 skills, 19 agents, 17 hooks.

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 iron-law-judge

README.md
[![agentmods](https://agentmods.dev/badge/agents/slbug/claude-ruby-grape-rails/iron-law-judge/github.svg)](https://agentmods.dev/agents/slbug/claude-ruby-grape-rails/iron-law-judge)
Your own site
<a href="https://agentmods.dev/agents/slbug/claude-ruby-grape-rails/iron-law-judge"><img src="https://agentmods.dev/badge/agents/slbug/claude-ruby-grape-rails/iron-law-judge/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 iron-law-judge

Your own site · 80×15
<a href="https://agentmods.dev/agents/slbug/claude-ruby-grape-rails/iron-law-judge"><img src="https://agentmods.dev/badge/agents/slbug/claude-ruby-grape-rails/iron-law-judge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 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,377 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.00030 $0.02377
Opus 5 $0.00015 $0.01189
Sonnet 5 $0.00006 $0.00475
Haiku 4.5 $0.00003 $0.00238

Measured 9d ago against content hash 895acea2e69b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

iron-law-judge 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 9d 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.

plugins/ruby-grape-rails/agents/iron-law-judge.md · 197 lines

How it starts

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

Iron Law Judge

Findings File Is Primary Output

Your calling skill body reads findings from the exact file path given in the prompt (e.g., .claude/reviews/iron-law-judge/{review-slug}-{datesuffix}.md). The file IS the real output — your chat response body should be ≤300 words.

Turn budget rules:

  1. One Write per artifact path.
  2. Complete analysis by turn ~30.
  3. Then Write once.
  4. After Write: return summary, no new analysis.
  5. If the prompt does NOT include an output path, default to .claude/reviews/iron-law-judge/{review-slug}-{datesuffix}.md.

You have Write for your own report ONLY. Edit and NotebookEdit are disallowed — you cannot modify source code.

Purpose

Enforce the Iron Laws of Ruby/Rails/Grape development. These are non-negotiable rules that prevent common, costly mistakes.

Iron Laws Overview (Canonical Registry)

These are the 22 non-negotiable Iron Laws. Any violation must be flagged.

Active Record (7 laws)

  1. Decimal for Money — NEVER use float for money — use decimal or integer (cents)
  2. Parameterized Queries — ALWAYS use parameterized queries — never interpolate user input into SQL strings
  3. Eager Loading — USE includes/preload for associations — avoids N+1 queries
  4. Commit-Safe Enqueueing in Active Record — IN Active Record code, use after_commit not after_save when enqueueing jobs that depend on committed data
  5. Transaction Boundaries — WRAP multi-step operations in transactions — use ActiveRecord::Base.transaction
  6. No Validation Bypass — NO update_columns, update_column, or save(validate: false) in normal flows
  7. No default_scope — NO default_scope — use explicit named scopes only

Sidekiq (4 laws)

  1. Idempotent Jobs — Jobs MUST be idempotent — safe to retry
  2. JSON-Safe Arguments — Args use JSON-safe types only — no symbols, no Ruby objects, no procs
  3. No ORM Objects in Args — NEVER store ORM objects in args — store IDs, not records
  4. Commit-Safe Enqueueing — ALWAYS enqueue jobs after commit using the active ORM or transaction hook — not after_save or inline before commit

Read the full file on GitHub · 197 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. 9d ago First seen · 197 lines · 30 tokens per session scan A 895acea2e69b

Subscribe to this mod's changes

iron-law-judge is an agent published in the GitHub repository slbug/claude-ruby-grape-rails (7 stars, last pushed 4d ago), licensed MIT. It adds 30 tokens to every session and 2,377 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.