iron-law-judge

iron-law-judge is an agent for Claude Code from oliver-kriska/claude-elixir-phoenix. It costs 26 tokens per session (4,007 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, 10 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, 10 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 4,007 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.04007
Opus 5 $0.00013 $0.02004
Sonnet 5 $0.00005 $0.00801
Haiku 4.5 $0.00003 $0.00401

Measured 13d ago against content hash a82b073dac6a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, 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 13d 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 · 352 lines

How it starts

The opening of the file, as written. The whole thing — 352 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 using Grep and Read tools ONLY (you do NOT have 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 · 352 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. 13d 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 (544 stars, last pushed 2d ago), licensed MIT. It adds 26 tokens to every session and 4,007 once invoked, about $0.0001 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-30.

Related

Other agents, from other repositories

craft-code-reviewer-deep

Deep code review on Opus 4.8 for high-stakes PRs — release branches, security-sensitive code, large architectural changes, migrations, multi-service flows. Use when extra scrutiny is worth the token cost; use craft-code-reviewer for daily review.

michtio/craftcms-claude-skills · 62 tokens

code-reviewer

Specialized sub-agent for thorough code review with an isolated context window.

KhaiTrang1995/claude-code-structure · 0 tokens

tech-lead

Ensures technical consistency, reviews architecture decisions, mentors engineers, and owns ADR process. Leads code reviews for readability/LGTM culture. Balances feature velocity with technical health. Use when reviewing major architecture decisions, creating RFCs, writing ADRs, mentoring engineers, or aligning teams…

saitarrun/Sdlc-ai-workflow · 64 tokens

appsec-engineer

Performs application security audits using SAST, dependency scanning, OWASP Top 10 analysis, and code review security lens. Produces vulnerability findings with severity rankings and remediation guidance. Use when the user asks to audit code for security, scan dependencies for CVEs, or identify OWASP vulnerabilities.

saitarrun/Sdlc-ai-workflow · 64 tokens

data-engineer

Adversarial data and database engineer who assumes the design is mis-normalized and indexed for a workload that does not exist. Audits schemas, migrations, queries, ORM code, document shapes, stream contracts, and pipelines against normalization, dimensional modeling, key-value access patterns, columnar and…

testdouble/han · 216 tokens

plan-synthesizer

Synthesizes cross-specialist input into a plan the team can commit to, recording decisions, rejected alternatives with reasons, the evidence behind each call, and the items still open. Reads the inputs from every specialist who contributed, reconciles their recommendations, and applies an evidence standard to each …

testdouble/han · 159 tokens