ecto-patterns
SolidEcto patterns — schemas, changesets, queries, migrations, Multi, associations, preloads, upserts. Use when editing Repo calls, Ecto.Query, or schema fields. Skip for Ash.
Install
Quality Score: 97/100
Skill Content
Details
- Author
- oliver-kriska
- Repository
- oliver-kriska/claude-elixir-phoenix
- Created
- 4 months ago
- Last Updated
- today
- Language
- Python
- License
- MIT
Integrates with
Similar Skills
Semantically similar based on skill content — not just same category
ecto-thinking
This skill should be used when the user asks to "add a database table", "create a new context", "query the database", "add a field to a schema", "validate form input", "fix N+1 queries", "preload this association", "separate these concerns", or mentions Repo, changesets, migrations, Ecto.Multi, has_many, belongs_to, transactions, query composition, or how contexts should talk to each other.
ecton1-check
Detect N+1 query anti-patterns specifically — Repo calls inside Enum/for loops, missing preloads on associations. Use when N+1 is explicitly suspected, NOT for unrelated Ecto questions or wider database performance.
pattern-engineer-database
Ship migrations safely. Models are the source of truth; generate with `alembic revision --autogenerate`; test each via `pytest-alembic` (round-trip + post-state assertions); run in a `migrate` compose service before the backend, never the entrypoint; commit model + migration together. Plus runtime DB patterns: index FKs + RLS columns; RLS with `(SELECT auth.uid())`; project columns; cursor pagination; `SKIP LOCKED` queues. Activate on `alembic/versions/*`, the `migrate` service, or query work.