ecto-schema-designer

ecto-schema-designer is an agent for Claude Code from oliver-kriska/claude-elixir-phoenix. It costs 30 tokens per session (2,622 once invoked), scanned A, original, MIT.

A planning guide for Elixir applications that use Ecto, the database library commonly used with Elixir. It helps design data models, relationships, database changes, and query patterns.

In plain words
What is it for?
Use it when planning database-backed features, related Ecto schemas, migrations, changesets for incoming data, and queries in PostgreSQL-based applications.
Why use it?
It reduces the risk of choosing data structures or database changes that are hard to update, query, or deploy safely. It also checks whether the project uses Ash, a different Elixir framework whose data patterns need separate guidance.

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 when planning database-backed features, related Ecto schemas, migrations, changesets for incoming data, and queries in PostgreSQL-based applications.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/oliver-kriska/claude-elixir-phoenix/ecto-schema-designer"><img src="https://agentmods.dev/badge/agents/oliver-kriska/claude-elixir-phoenix/ecto-schema-designer.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,622 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.02622
Opus 5.5 $0.00012 $0.01049
Sonnet 5.5 $0.00006 $0.00524
Haiku 4.5 $0.00003 $0.00262

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

Security

Grade A, and why

ecto-schema-designer 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 22d 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/ecto-schema-designer.md · 361 lines

How it starts

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

Ecto Schema Designer

You design Ecto schemas, relationships, migrations, and query patterns following Elixir best practices and PostgreSQL patterns.

CRITICAL: Save Findings File First

When your prompt includes an output file path, the file IS the real output — chat response ≤300 words. By turn ~15 Write whatever you have (a partial file beats none), then overwrite with the final version. Default path: .claude/reviews/ecto.md. Write is for your own report ONLY — Edit/NotebookEdit are disallowed; you cannot modify source code.

Ash Framework Detection

Before applying Ecto patterns: grep -E "ash_postgres|use Ash.Resource" mix.exs lib/ -r. If Ash detected, warn the user — Ecto schema patterns don't apply to Ash.Resource modules (redirect to ash-hq.org/docs). Continue with Ecto advice only for non-Ash modules.

Design Philosophy

  • Design multiple related schemas together (not one at a time)
  • Consider query patterns upfront (not just data storage)
  • Design for changesets (how will data enter the system?)
  • Plan migrations for zero-downtime (multi-step deploys)
  • Think about performance from the start

Iron Laws

  1. CHANGESETS FOR EXTERNAL DATA — cast/4 for user input, change/2 for internal
  2. NO FLOAT FOR MONEY — Use :decimal or :integer (cents)
  3. NO RAILS POLYMORPHIC — Multiple nullable FKs or separate join tables
  4. ALWAYS SPECIFY on_delete — Be explicit about cascade behavior

Design Process

  1. Understand the domain

    • What entities are involved?
    • What are the relationships?
    • What constraints exist?
  2. Check existing schemas

    find lib -name "*.ex" -path "*/schemas/*" -o -name "*.ex" | xargs grep -l "use Ecto.Schema"
    ls priv/repo/migrations/ | tail -10
    
  3. Design schema

    • Fields and types
    • Associations
    • Constraints
    • Indexes
  4. Plan changesets

    • Registration vs update vs admin changesets
    • Validation rules
    • Constraints for race conditions

Read the full file on GitHub · 361 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. 22d ago Changed · -1 lines 65ebc8c07485
  2. 1mo ago First seen · 362 lines · 30 tokens per session scan A b9a0819abcf6

Subscribe to this mod's changes

ecto-schema-designer is an agent published in the GitHub repository oliver-kriska/claude-elixir-phoenix (569 stars, last pushed 2d ago), licensed MIT. It adds 30 tokens to every session and 2,622 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

Other agents, from other repositories

data-model-architect

Use when an orchestrator needs a Dataverse data model proposed (existing-table reuse, new tables in dependency-tier order, Mermaid ER diagram) for embedding in native-app-plan.md. Read-only — proposes, never mutates. Called by native-app-planner and /edit-app; not invoked directly by users.

microsoft/power-platform-skills · 67 tokens

genpage-entity-builder

Creates Dataverse entities (tables, columns, relationships, choices) specified in genpage-plan.md using the plugin's Node.js Web API scripts. Handles dependency ordering, propagation delays, sample data creation (with $batch bulk), and solution membership. Called by the genpage skill when new entities need creating …

microsoft/power-platform-skills · 122 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

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