ecto-constraint-debug SKILL.md skillA
ecto-constraint-debug from oliver-kriska/claude-elixir-phoenix is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add oliver-kriska/claude-elixir-phoenix/ecto-constraint-debug@git:20260724.918f809Pins git:20260724.918f809 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-constraint-debug/SKILL.md- Versions recorded
- 4
- Latest version
- git:20260724.918f809, committed Jul 24, 2026
- First version recorded
- Mar 21, 2026
- Size
- 3,260 bytes
- Repository stars
- 573
- License
- MIT
Debug Ecto constraint violations - trace triggers, check migrations, find duplicate data. Use when seeing unique_constraint, foreign_key_constraint, or check_constraint errors.
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 Constraint Debugging > **Ash projects**: Ash surfaces DB constraints through its own error DSL. Use the `ash-framework` skill — `mix usage_rules.search_docs "constraint" -p ash_postgres`. Systematic approach to diagnosing constraint violations. Load when you see `Ecto.ConstraintError`, `unique_constraint`, `foreign_key_constraint`, or constraint-related changeset errors. ## Iron Laws 1. **READ THE CONSTRAINT NAME** — The constraint name (e.g., `links_url_index`) tells you exactly which index/constraint failed. Parse it from the error message first 2. **CHECK MIGRATION BEFORE CODE** — Verify the constraint definition in `priv/repo/migrations/` matches what the schema expects 3. **TRACE ALL INSERT PATHS** — Find every code path that inserts into the constrained table. The bug is often in a path you didn't consider 4. **RACE CONDITION UNTIL PROVEN OTHERWISE** — If validation passes but constraint fails, assume concurrent inserts until you prove a single-request cause ## Step-by-Step Debugging ### Step 1: Parse the Error Extract from the error message: - **Constraint name** (e.g., `users_email_index`) - **Table name** (e.g., `users`) …
Read the whole file at its exact version.
How to install
mdr add oliver-kriska/claude-elixir-phoenix/ecto-constraint-debug@sha256:7588507394b3bf67The line at the top of this page pins the label git:20260724.918f809, 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.
[](https://markdownregistry.com/a/art_dlkbi4f5q2wuvl3a)
3 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 4 versions of this file, between Mar 21, 2026 and Jul 24, 2026, about one every 42 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20260724.918f809 latest | 2026-07-24 | 918f809 | 3,260 B | A | view · diff |
| git:20260703.22397cb | 2026-07-03 | 22397cb | 3,260 B | A | view · diff |
| git:20260403.be7aa86 | 2026-04-03 | be7aa86 | 3,090 B | A | view · diff |
| git:20260321.4e9d9e9 | 2026-03-21 | 4e9d9e9 | 3,057 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (3260 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
oliver-kriska/claude-elixir-phoenix · 573 stars · license MIT · pushed 2026-11-06 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_dlkbi4f5q2wuvl3a GET https://markdownregistry.com/api/v1/resolve?ref=oliver-kriska/claude-elixir-phoenix/ecto-constraint-debug GET https://markdownregistry.com/api/v1/blob/7588507394b3bf67fe5eeb9dc6fabc5aee0bbc13169a8052a6973f1c22c0bbf4
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
Every file in oliver-kriska/claude-elixir-phoenix