# Schema Diff

> Schema Diff is an Agent Skill for development published in the Archive228/loopkit repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Compare two schema states and surface the risky changes. Use before applying migrations or after a model change.

- Skill name: `schema-diff`
- Category: [Development](https://www.openparable.com/skill/development/1)
- Source: https://github.com/Archive228/loopkit/blob/HEAD/skills/schema-diff/SKILL.md
- Repository: Archive228/loopkit (638 GitHub stars when collected)

## SKILL.md

# Schema Diff
Diff old vs new schema. Flag by risk:
- **Destructive** (high): dropped column/table, narrowed type, new NOT NULL on existing rows, dropped index a query relies on.
- **Locking** (high at scale): index without CONCURRENTLY, type change that rewrites the table.
- **Safe**: new nullable column, new table, new index CONCURRENTLY.
For each destructive change: is data lost? is it reversible? is there a backfill? Output a risk-ranked list and a go/no-go with the safe rollout order.

---

Source: https://www.openparable.com/skill/development/schema-diff (OpenParable). Cite the canonical URL above.
