ash-framework

ash-framework is a skill for Claude Code from oliver-kriska/claude-elixir-phoenix. It costs 48 tokens per session (1,353 once invoked), scanned A, original, MIT.

A reference for building Phoenix applications with Ash, a framework for defining data resources, actions, rules, and calculations. It covers how Ash works with LiveView, forms, policies, and database migrations.

In plain words
What is it for?
It is for generating and changing Ash resources, actions, policies, validations, calculations, forms, and migrations in Elixir and Phoenix projects.
Why use it?
It prevents common integration mistakes, such as bypassing domain interfaces, applying authorization at the wrong stage, or writing migrations manually after resource changes.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

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

Good fit It is for generating and changing Ash resources, actions, policies, validations, calculations…

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

Any agent
npx skills add oliver-kriska/claude-elixir-phoenix --skill ash-framework
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 ash-framework

README.md
[![agentmods](https://agentmods.dev/badge/skills/oliver-kriska/claude-elixir-phoenix/ash-framework.svg)](https://agentmods.dev/skills/oliver-kriska/claude-elixir-phoenix/ash-framework)
Your own site
<a href="https://agentmods.dev/skills/oliver-kriska/claude-elixir-phoenix/ash-framework"><img src="https://agentmods.dev/badge/skills/oliver-kriska/claude-elixir-phoenix/ash-framework.svg" alt="Measured on agentmods" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,353 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.00048 $0.01353
Opus 5 $0.00024 $0.00677
Sonnet 5 $0.00010 $0.00271
Haiku 4.5 $0.00005 $0.00135

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

Security

Grade A, and why

ash-framework 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 7d 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/skills/ash-framework/SKILL.md · 131 lines

How it starts

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

Ash Framework Reference

Reference for Ash Framework in Phoenix/LiveView projects. Ash complements Phoenix/Ecto — LiveView, security, and OTP Iron Laws still apply. Only data access patterns shift toward Ash actions and domain code interfaces.

Iron Laws

  1. USE DOMAIN CODE INTERFACES — Never call Ash.create/Ash.read directly in LiveViews or Controllers; use domain code interfaces: MyApp.Accounts.register_user() not Ash.create(User, attrs)
  2. SET ACTOR/SCOPE AT QUERY PREP, NOT EXECUTION — Pass actor: or scope: to for_read/for_create/for_action (prep), NOT to Ash.read!/Ash.create! (execution); execution-level actor bypasses row-level policy evaluation. If project uses Ash.Scope, pass scope: consistently instead of bare actor: — do not mix styles
  3. GENERATORS FIRST — Before writing Ash code manually, run mix ash.gen.resource or mix ash.gen.domain with --yes; check mix help ash.gen.<task> for options
  4. CODEGEN AFTER RESOURCE CHANGES — Always run mix ash.codegen after modifying resources; this generates migrations from resource snapshots — never write AshPostgres migrations by hand
  5. ACTIONS OVER FUNCTIONS — Put business logic in named actions, not domain functions; expose via code interfaces defined on the domain
  6. NEVER EDIT RESOURCE SNAPSHOTSpriv/resource_snapshots/ is owned exclusively by mix ash.codegen; manual edits corrupt migration tracking
  7. NO DIRECT Repo.* IN ASH PROJECTSRepo.all/get/insert bypass Ash policies and notifications; use domain code interfaces. Any Repo call in an Ash project is an escape hatch and must be documented

Quick Reference

Domain Code Interface Pattern

# Domain definition
defmodule MyApp.Accounts do
  use Ash.Domain

  resources do
    resource MyApp.Accounts.User do
      define :register_user, action: :create, args: [:email, :password]
      define :get_user_by_email, action: :read, get_by: [:email]
    end
  end
end

# In LiveView/Controller — always via domain, never Ash.create directly
{:ok, user} = MyApp.Accounts.register_user(email, password, actor: nil)
user = MyApp.Accounts.get_user_by_email!(email, actor: current_user)

Read the full file on GitHub · 131 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. 7d ago First seen · 131 lines · 48 tokens per session scan A c897baddcaa4

Subscribe to this mod's changes

ash-framework is a skill published in the GitHub repository oliver-kriska/claude-elixir-phoenix (538 stars, last pushed yesterday), licensed MIT. It adds 48 tokens to every session and 1,353 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-30.

Related

Other skills, from other repositories

craft-content-modeling

Craft CMS 5 content modeling — sections, entry types, fields, Matrix, relations, project config, and content architecture strategy. Covers choosing section types, designing entry types and field layouts, selecting field types, configuring Matrix and nested entries, relations and eager loading, and multi-site…

michtio/craftcms-claude-skills · 303 tokens

craftcms

Craft CMS 5 plugin and module development — extending Craft with PHP. Covers elements, element queries, services, models, records, controllers, migrations, queue jobs, console commands, field types, native fields, events, behaviors, Twig extensions, widgets, filesystems, permissions, project config, GraphQL, testing…

michtio/craftcms-claude-skills · 327 tokens

apifox-cli

A command-line skill for managing Apifox, a platform for documenting and testing web APIs.

codingSamss/all-my-ai-needs · 102 tokens

fullstack-coder

Full-stack implementation agent that writes complete, production-ready code following an approved architecture and schema. Triggers on: write the code, implement features, build the app, code the MVP, generate codebase.

batterfried-philosophy172/Agent-Startup-Skills · 46 tokens

system-architect

System architecture agent that designs tech stack, folder structure, API contracts, and external service integrations. Triggers on: system design, tech stack, architecture, API design, folder structure, choose framework.

batterfried-philosophy172/Agent-Startup-Skills · 44 tokens

skill-developer-relations

SDK development, external developer communication, code samples, API client libraries, community engagement, and developer experience. Use when creating SDKs, writing external guides, creating code samples, or improving developer experience.

saitarrun/Sdlc-ai-workflow · 46 tokens