ecto-constraint-debug
仓库创建 2026年2月12日最近提交 5 小时前SkillHot 收录 20 天前
▸ 精选理由
针对 unique/foreign/check constraint 错误能显著缩短排查时间。
这个 Skill 做什么
系统化定位 Ecto 的约束冲突,追踪触发器、迁移与重复数据源。
遇到 Ecto 的 unique_constraint、foreign_key_constraint 或 Ecto.ConstraintError 时,帮你系统化排查数据库约束冲突:回溯触发器、检查 migrations、定位重复或脏数据来源。会把可能的触发点、迁移历史和数据问题串成一条可操作的诊断路径,指出修复优先级。特别之处在于把触发器、迁移与数据三条线索合并,快速锁定根因而不是盲目改 schema。
▸ 展开 SKILL.md 英文原文
Debug Ecto constraint violations - trace triggers, check migrations, find duplicate data. Use when seeing unique_constraint, foreign_key_constraint, or check_constraint errors.
505
Stars
34
Forks
40
仓库内 Skill
+35
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/oliver-kriska/claude-elixir-phoenix/main/plugins/elixir-phoenix/skills/ecto-constraint-debug/SKILL.md或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/oliver-kriska/claude-elixir-phoenix/main/plugins/elixir-phoenix/skills/ecto-constraint-debug/SKILL.md"SKILL.MD 节选查看完整文件 ↗
# 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. **T
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有