ecto-patterns SKILL.md skillA

ecto-patterns from oliver-kriska/claude-elixir-phoenix is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add oliver-kriska/claude-elixir-phoenix/ecto-patterns@git:20260929.c08ad14

Pins git:20260929.c08ad14 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 17 of 17 checks passed
Kind
SKILL.md skill
Repository
oliver-kriska/claude-elixir-phoenix
Path
plugins/elixir-phoenix/skills/ecto-patterns/SKILL.md
Versions recorded
7
Latest version
git:20260929.c08ad14, committed Sep 29, 2026
First version recorded
Mar 21, 2026
Size
3,645 bytes
Repository stars
573
License
MIT

Use when a task touches Ecto, even a how-to question: schemas, changesets, validations, queries, preloads, Multi, migrations, constraints, money fields. Load it before writing Ecto code. Skip for Ash.

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# Ecto Patterns Reference

Reference for working with Ecto schemas, queries, and migrations.

## Iron Laws — Never Violate These

1. **CHANGESETS ARE FOR EXTERNAL DATA** — Use `cast/4` for user/API input, `change/2` or `put_change/3` for internal trusted data
2. **NEVER USE `:float` FOR MONEY** — Always use `:decimal` or `:integer` (cents)
3. **NO RAILS-STYLE POLYMORPHIC ASSOCIATIONS** — They break foreign key constraints; use multiple nullable FKs or separate join tables
4. **ALWAYS PIN VALUES IN QUERIES** — `u.name == ^user_input` is safe, string interpolation causes SQL injection
5. **PRELOAD COLLECTIONS, NOT INDIVIDUALS** — Preloading in loops = N+1 queries
6. **CONSTRAINTS BEAT VALIDATIONS FOR RACE CONDITIONS** — Validations provide quick feedback, constraints provide DB-level safety
7. **SEPARATE QUERIES FOR `has_many`, JOIN FOR `belongs_to`** — Avoids row multiplication
8. **NO IMPLICIT CROSS JOINS** — `from(a in A, b in B)` without `on:` creates Cartesian product
9. **DEDUP BEFORE `cast_assoc` WITH SHARED DATA** — When multiple parents share child data, deduplicate child records BEFORE building changesets. Dedup only works within a single changeset
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add oliver-kriska/claude-elixir-phoenix/ecto-patterns@sha256:3d7f0e835b849c15

The line at the top of this page pins the label git:20260929.c08ad14, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_fqrpzz6wtuwpfvt7.svg)](https://markdownregistry.com/a/art_fqrpzz6wtuwpfvt7)

4 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 7 versions of this file, between Mar 21, 2026 and Sep 29, 2026, about one every 32 days.

versioncommittedcommitsizeaudit
git:20260929.c08ad14 latest2026-09-29 c08ad14 3,645 BA view · diff
git:20260921.69af5df2026-09-21 69af5df 3,651 BA view · diff
git:20260720.42d1e412026-07-20 42d1e41 3,617 BA view · diff
git:20260402.ab983572026-04-02 ab98357 3,498 BA view · diff
git:20260401.f2ab67a2026-04-01 f2ab67a 3,420 BA view · diff
git:20260325.d20c8dd2026-03-25 d20c8dd 3,597 BA view · diff
git:20260321.4e9d9e92026-03-21 4e9d9e9 3,575 BA view

Audit of the latest version

A  17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (3645 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

oliver-kriska/claude-elixir-phoenix · 573 stars · license MIT · pushed 2026-11-06 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_fqrpzz6wtuwpfvt7
GET https://markdownregistry.com/api/v1/resolve?ref=oliver-kriska/claude-elixir-phoenix/ecto-patterns
GET https://markdownregistry.com/api/v1/blob/3d7f0e835b849c157bca596d869a791d43164012af6e0f0e415e0ee54a92610f

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from oliver-kriska/claude-elixir-phoenix

cc-changelog SKILL.md skill
oliver-kriska/claude-elixir-phoenix · .claude/skills/cc-changelog/SKILL.md · CONTRIBUTOR TOOL - Track CC changelog, extract new versions since last check, analyze impact on plugin (breaking…
git:20260611.6992d66 · audit A · 573 stars
codex-ab SKILL.md skill
oliver-kriska/claude-elixir-phoenix · .claude/skills/codex-ab/SKILL.md · Run an A/B codex review experiment — holistic codex review vs 3 focused dimension passes (security, ecto, liveview) on…
git:20260710.9a61290 · audit A · 573 stars
docs-check SKILL.md skill
oliver-kriska/claude-elixir-phoenix · .claude/skills/docs-check/SKILL.md · CONTRIBUTOR TOOL - Validate plugin against latest Claude Code documentation. Catches breaking changes, deprecations…
git:20260217.1cf0144 · audit A · 573 stars
plugin-dev-workflow SKILL.md skill
oliver-kriska/claude-elixir-phoenix · .claude/skills/plugin-dev-workflow/SKILL.md · Guide plugin development workflow — editing skills, agents, hooks, or eval framework in this repo. Use when modifying…
git:20261001.8fc26af · audit A · 573 stars
promote SKILL.md skill
oliver-kriska/claude-elixir-phoenix · .claude/skills/promote/SKILL.md · Generate X/Twitter release promotion posts with ASCII tables and CodeSnap rendering. Use when writing release posts…
git:20260403.784ba36 · audit A · 573 stars
release SKILL.md skill
oliver-kriska/claude-elixir-phoenix · .claude/skills/release/SKILL.md · CONTRIBUTOR TOOL - Cut a plugin release: bump plugin.json version, finalize CHANGELOG, update README if needed, gate on…
git:20260929.978317b · audit A · 573 stars
session-deep-dive SKILL.md skill
oliver-kriska/claude-elixir-phoenix · .claude/skills/session-deep-dive/SKILL.md · Deep qualitative analysis of high-signal sessions. Spawns subagents with v2 template, synthesizes patterns, compares…
git:20260303.db45ce1 · audit A · 573 stars
session-scan SKILL.md skill
oliver-kriska/claude-elixir-phoenix · .claude/skills/session-scan/SKILL.md · Compute metrics for Claude Code sessions. Discovers via ccrider, filters trivial, computes…
git:20260303.db45ce1 · audit A · 573 stars
session-trends SKILL.md skill
oliver-kriska/claude-elixir-phoenix · .claude/skills/session-trends/SKILL.md · Analyze trends across session metrics. Computes windowed aggregates, deltas, and compares against MEMORY.md findings…
git:20260508.18aaa0f · audit A · 573 stars
skill-monitor SKILL.md skill
oliver-kriska/claude-elixir-phoenix · .claude/skills/skill-monitor/SKILL.md · Analyze skill effectiveness across sessions. Computes per-skill metrics (action rate, friction, outcomes), identifies…
git:20260508.9272353 · audit A · 573 stars
CLAUDE.md CLAUDE.md file
oliver-kriska/claude-elixir-phoenix · CLAUDE.md
git:20261102.4621ae4 · audit A · 573 stars
lab:autoresearch SKILL.md skill
oliver-kriska/claude-elixir-phoenix · lab/autoresearch/SKILL.md · Self-improving loop for plugin skills. Reads program.md, proposes one mutation per iteration, evaluates against…
git:20260325.91f9837 · audit A · 573 stars

Every file in oliver-kriska/claude-elixir-phoenix

Other files named ecto-patterns

ecto-patterns SKILL.md skill
oliver-kriska/claude-elixir-phoenix · targets/amp/skills/ecto-patterns/SKILL.md · 'Use when a task touches Ecto, even a how-to question: schemas, changesets,
git:20260929.c08ad14 · audit A · 573 stars
ecto-patterns SKILL.md skill
oliver-kriska/claude-elixir-phoenix · targets/dsh/skills/ecto-patterns/SKILL.md · 'Use when a task touches Ecto, even a how-to question: schemas, changesets,
git:20260929.c08ad14 · audit A · 573 stars
ecto-patterns SKILL.md skill
oliver-kriska/claude-elixir-phoenix · targets/codex/skills/ecto-patterns/SKILL.md · 'Use when a task touches Ecto, even a how-to question: schemas, changesets,
git:20260929.c08ad14 · audit A · 573 stars

Browse by kind, by grade A, or by owner.