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,628 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, 10 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, 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 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,628 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.02628
Opus 5 $0.00015 $0.01314
Sonnet 5 $0.00006 $0.00526
Haiku 4.5 $0.00003 $0.00263

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

How it starts

The opening of the file, as written. The whole thing — 362 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 DATAcast/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 · 362 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. 9d 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 (541 stars, last pushed 3d ago), licensed MIT. It adds 30 tokens to every session and 2,628 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 agents, from other repositories

database-engineer

Designs database schemas, writes migrations, optimizes queries, and ensures data integrity and performance. Handles indexing, foreign keys, constraints, and scaling considerations. Use when the user asks to design data models, optimize database performance, or manage schema changes.

saitarrun/Sdlc-ai-workflow · 54 tokens

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

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

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

wiki-dev-eng-schema

Senior Fullstack Bun/TypeScript Engineer — Lane B (Schema, Ontology & Multi-vault) on the claude-wiki-pages development team. Owns ontology-profile-v1 (the predicate domain→range table and enum list), staleness derivation, the opt-in predicate range check, template/structural conformance, the multi-vault registry with…

odere-pro/claude-wiki-pages-plugin · 161 tokens

database-migrations

Role: Database Migration Safety Reviewer. Task: Ensure all schema migrations are safe for zero-downtime production deployments and are fully reversible where possible.

PlanVault/ai-engineering-playbook · 8 tokens