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:20260723.d82e8e5Pins git:20260723.d82e8e5 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
targets/codex/skills/ecto-constraint-debug/SKILL.md- Versions recorded
- 2
- Latest version
- git:20260723.d82e8e5, committed Jul 23, 2026
- First version recorded
- Jul 21, 2026
- Size
- 3,136 bytes
- Repository stars
- 573
- License
- MIT
Debug Ecto constraint violations - trace triggers, check migrations;.
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:c790ac26a0323be2The line at the top of this page pins the label git:20260723.d82e8e5, 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_fh7jwzoziidxcvjg)
4 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 2 versions of this file, between Jul 21, 2026 and Jul 23, 2026, about one every 2 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20260723.d82e8e5 latest | 2026-07-23 | d82e8e5 | 3,136 B | A | view · diff |
| git:20260721.1a43137 | 2026-07-21 | 1a43137 | 3,209 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 (3136 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_fh7jwzoziidxcvjg GET https://markdownregistry.com/api/v1/resolve?ref=oliver-kriska/claude-elixir-phoenix/ecto-constraint-debug GET https://markdownregistry.com/api/v1/blob/c790ac26a0323be23f4dbc84f5f75c72ff946005a4bef4721399b8de909bc74a
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