iron-law-judge

iron-law-judge is an agent for Claude Code from oliver-kriska/claude-elixir-phoenix. It costs 26 tokens per session (3,960 once invoked), scanned A, original, MIT.

A code reviewer that looks for violations of the project's Iron Laws in Elixir and Phoenix files using known code patterns.

In plain words
What is it for?
Use it after modifying Elixir, test, or Phoenix template files, or as part of a code review that includes Iron Law checks.
Why use it?
It helps catch specific rule violations after code changes without changing the source code itself. Its findings are saved for the wider review process.

Agent for Claude Code

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

Part of the phx plugin — 50 skills, 26 agents, 8 hooks shipped together

Good fit Use it after modifying Elixir, test, or Phoenix template files, or as part of a code review that includes Iron Law checks.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/oliver-kriska/claude-elixir-phoenix/iron-law-judge
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.

Clone the repo
git clone --depth 1 https://github.com/oliver-kriska/claude-elixir-phoenix

Made for: Claude Code.

Or install phx, the plugin that ships this one along with the rest of its 50 skills, 26 agents, 8 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/oliver-kriska/claude-elixir-phoenix/iron-law-judge/github.svg)](https://agentmods.dev/agents/oliver-kriska/claude-elixir-phoenix/iron-law-judge)
Your own site
<a href="https://agentmods.dev/agents/oliver-kriska/claude-elixir-phoenix/iron-law-judge"><img src="https://agentmods.dev/badge/agents/oliver-kriska/claude-elixir-phoenix/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/oliver-kriska/claude-elixir-phoenix/iron-law-judge"><img src="https://agentmods.dev/badge/agents/oliver-kriska/claude-elixir-phoenix/iron-law-judge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,960 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.00026 $0.03960
Opus 5.5 $0.00010 $0.01584
Sonnet 5.5 $0.00005 $0.00792
Haiku 4.5 $0.00003 $0.00396

Measured 1mo ago against content hash 7b55454e6d3e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 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.

plugins/elixir-phoenix/agents/iron-law-judge.md · 349 lines

How it starts

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

Iron Law Judge

You scan Elixir/Phoenix code for Iron Law violations using pattern-based detection.

CRITICAL: Save Findings File First

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

Turn budget rules:

  1. First ~10 turns: Read/Grep analysis
  2. By turn ~12: call Write with whatever findings you have — do NOT wait until the end. A partial file is better than no file when turns run out.
  3. Remaining turns: continue analysis and Write again to overwrite with the complete version.
  4. If the prompt does NOT include an output path, default to .claude/reviews/iron-laws.md.

You have Write for your own report ONLY. Edit and NotebookEdit are disallowed — you cannot modify source code, which upholds Review Iron Law #1.

How to Run

  1. Get list of changed files from the review prompt (files will be provided)
  2. Filter to relevant file types (.ex, .exs, .heex)
  3. Run detection patterns with Grep and Read (this agent has no Bash access)
  4. Report violations with severity, location, and fix suggestion

Iron Law Detection Patterns

LiveView Iron Laws

#1 No unconditional DB queries in disconnected mount

The rule: mount/3 runs TWICE on full page load (HTTP + WebSocket). Unconditional Repo.* calls double DB pressure for zero benefit. BUT the disconnected render IS the HTML that Googlebot, GPTBot, PerplexityBot, ClaudeBot, and noscript clients see — for SEO-visible content, fetching there is INTENTIONAL.

Detection is 4-state, not binary:

  • Files: *_live.ex
  • Detection approach: Use Grep on each file for def mount(, Repo\., connected?, assign_async, stream_async, Cache\., :persistent_term, :ets\.lookup. Then Read the mount function body and classify into one of the four cases below.

Cases:

Pattern Verdict Severity
Repo.* in mount with NO connected? guard, NO assign_async, NO cache CRITICAL — 2× DB load BLOCKER
assign_async or stream_async CLEAN — preferred default (skip, do not report)
connected?(socket) guard, disconnected branch returns []/nil/skeleton CLEAN — fast dead-render (skip)
connected?(socket) guard, disconnected branch calls Cache.* / :persistent_term.get / ETS lookup CLEAN — SEO/dead-render pattern (cache-backed) (skip, optional INFO note)
Repo.* in else branch of connected? guard (uncached) SUGGESTION — likely SEO intent, but cache-backed is faster SUGGESTION
Repo.* in mount with no guard, but file is a public marketing/article route (e.g., *landing*, *article*, *blog*, *post_show*, *public*) SUGGESTION — SEO intent likely; recommend cache-backed pattern SUGGESTION

Read the full file on GitHub · 349 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. 1mo ago Changed · -1 lines 7b55454e6d3e
  2. 2mo ago Changed · -2 lines b9f3910265d1
  3. 3mo ago First seen · 352 lines · 26 tokens per session scan A a82b073dac6a

Subscribe to this mod's changes

iron-law-judge is an agent published in the GitHub repository oliver-kriska/claude-elixir-phoenix (578 stars, last pushed 3d ago), licensed MIT. It adds 26 tokens to every session and 3,960 once invoked, about $0.0001 per session on Opus 5.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-30.

Related

iron-law-judge compared with agents from other repositories

iron-law-judge next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
iron-law-judgeoliver-kriska/claude-elixir-phoenixAgent5783d agoMITA26Claude Code
craft-review-checkermichtio/craftcms-claude-skillsAgent903d agoMITA82Claude Code
craft-code-reviewer-deepmichtio/craftcms-claude-skillsAgent903d agoMITA76Claude Code
code-reviewerKhaiTrang1995/claude-code-structureAgent27mo agoMITA0Claude Code
data-engineertestdouble/hanAgent36217d agoMITA216Claude Code
plan-synthesizertestdouble/hanAgent36217d agoMITA159Claude Code
discussion-facilitatortestdouble/hanAgent36217d agoMITA160Claude Code