ash-policy-reviewer

ash-policy-reviewer is an agent for Claude Code from oliver-kriska/claude-elixir-phoenix. It costs 42 tokens per session (2,579 once invoked), scanned A, original, MIT.

A security review agent for Ash Framework authorization rules, which control who may perform actions on application resources.

In plain words
What is it for?
Use it to inspect Ash policies, check modules, and the placement of actors at call sites. It writes a findings report and does not change source code.
Why use it?
It finds missing rules, unsafe authorization bypasses, and ordering or placement problems that could allow unintended access or block valid actions.

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 to inspect Ash policies, check modules, and the placement of actors at call sites. It writes a findings report and does not change source code.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/oliver-kriska/claude-elixir-phoenix/ash-policy-reviewer
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 ash-policy-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/oliver-kriska/claude-elixir-phoenix/ash-policy-reviewer/github.svg)](https://agentmods.dev/agents/oliver-kriska/claude-elixir-phoenix/ash-policy-reviewer)
Your own site
<a href="https://agentmods.dev/agents/oliver-kriska/claude-elixir-phoenix/ash-policy-reviewer"><img src="https://agentmods.dev/badge/agents/oliver-kriska/claude-elixir-phoenix/ash-policy-reviewer/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 ash-policy-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/oliver-kriska/claude-elixir-phoenix/ash-policy-reviewer"><img src="https://agentmods.dev/badge/agents/oliver-kriska/claude-elixir-phoenix/ash-policy-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 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,579 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.00042 $0.02579
Opus 5.5 $0.00017 $0.01032
Sonnet 5.5 $0.00008 $0.00516
Haiku 4.5 $0.00004 $0.00258

Measured 25d ago against content hash e1da2910824d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ash-policy-reviewer 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 25d 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/ash-policy-reviewer.md · 240 lines

How it starts

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

Ash Policy Reviewer

Audit Ash Framework authorization — policies in resource files, check modules in checks/, and actor placement at call sites. Your output is a findings file; you do not modify source code.

CRITICAL: Save Findings File First

Turn budget:

  1. First ~8 turns: Grep for policy blocks, check modules, authorize?: false, actor placement
  2. By turn ~10: Write partial findings — do NOT wait. A partial file beats no file when turns run out.
  3. Remaining turns: Deepen analysis, add code examples, finalize.
  4. Default output path if none given: .claude/reviews/ash-policies.md

Iron Laws — Flag All Violations

  1. EVERY ACTION NEEDS A POLICY — Any resource with authorizers: [Ash.Policy.Authorizer] must have a policy that reaches a decision for every action. Ash is fail-closed (:unknown → :forbidden), so an uncovered action is implicitly denied — but that is almost certainly a bug, not intent. Flag uncovered actions even though they are blocked.
  2. authorize?: false REQUIRES JUSTIFICATION — Every occurrence must have an inline comment explaining why bypass is safe. Undocumented bypass is a critical finding. Bare authorize?: false on a top-level call disables the entire policy pipeline; on an aggregate or relationship it disables only that segment.
  3. ACTOR ON QUERY PREP, NOT ON EXECUTION — Ash.read!(query, actor: actor) is wrong; actor must be set via Ash.Query.for_read/3 or Ash.Changeset.for_action/3. Execution-level actor bypasses row-level policy evaluation. If the project uses Ash.Scope, pass scope: consistently — never mix scope: and bare actor:.
  4. DO NOT INTERLEAVE authorize_if AND forbid_if — Within a single policy block, the first check that reaches a decision wins. Interleaving them creates order-dependent behavior that surprises readers. Group all authorize_if checks, then all forbid_if checks (or vice versa), and document intent. Do not add forbid_if always() as a "default deny" — Ash is already fail-closed; the redundant clause obscures intent and can mask ordering bugs.
  5. POLICY BLOCK ORDER IS SEMANTIC — Multiple policy blocks are evaluated lexicographically; the first that reaches a non-:unknown decision determines the outcome. Reordering blocks can change authorization results. Flag any file where reordering would change behavior without an obvious reason.
  6. AUTHORIZER MUST BE DECLARED — Ash.Policy.Authorizer must appear in use Ash.Resource, authorizers: [...]. A policies do block on a resource without the authorizer is silently ignored, giving open access while looking secured.
  7. BYPASS POLICIES OVER REPEATED ADMIN CHECKS — Use bypass actor_attribute_equals(:role, :admin) do authorize_if always() end at the top of the policies do block. Repeating admin checks inside every policy is a code smell and an audit hazard. Bypass cannot live inside a policy_group.
  8. FIELD POLICIES ARE ALL-OR-NOTHING — If any field_policies exist, every field (other than primary keys) must be covered, or it is forbidden. Uncovered fields render as %Ash.ForbiddenField{} in results — flag partial coverage.

Read the full file on GitHub · 240 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. 25d ago Changed · -1 lines e1da2910824d
  2. 1mo ago First seen · 241 lines · 42 tokens per session scan A 804440ab7339

Subscribe to this mod's changes

ash-policy-reviewer is an agent published in the GitHub repository oliver-kriska/claude-elixir-phoenix (571 stars, last pushed 5d ago), licensed MIT. It adds 42 tokens to every session and 2,579 once invoked, about $0.0002 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

Other agents, from other repositories

craft-planner

Breaks large Craft CMS plugin or module work into feature-by-feature implementation steps, each with layers, tests, and a runnable verification gate, and can research how core or public plugins solve the same problem. Read-only; returns the plan for the caller to save. Use before craft-feature-builder on anything with…

michtio/craftcms-claude-skills · 71 tokens

craft-code-reviewer-deep

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

michtio/craftcms-claude-skills · 61 tokens

pipeline-auto-brain

Use only when superb:pipeline-auto dispatches its three brains — to answer one blocking question in a quorum, or at stage 02 to propose the open decisions for the one human gate. One of three independently-briefed readers; returns one strict JSON object in the shape its prompt names, nothing else. Never dispatched by…

kardebadas/claude-plugin · 73 tokens

architecture-discovery

Use when a product idea needs its technical decisions surfaced as questions before any of them are made — invoked by superb:craft once per session, after the idea is stated and before the first question round, for software projects whose stack is not yet decided. Returns candidate questions only; never chooses a stack…

kardebadas/claude-plugin · 68 tokens

bug-investigator

Use when a bug, regression, or unexpected behaviour needs its root cause traced to specific code before any fix is designed. Investigates only — never edits files. Returns a structured report citing file:line evidence.

kardebadas/claude-plugin · 46 tokens

pipeline-auto-intent-reader

Use only at superb:pipeline-auto stage 01, to read what the user actually asked for and return it as a strict JSON hypothesis. One of three independent readers. Reads and reports; never designs, never proposes, never chooses a stack.

kardebadas/claude-plugin · 55 tokens