Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Diagnose, repair, and prevent Drizzle Kit migration conflicts involving generated SQL, snapshots, journals, merge queues, and team workflows.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 101% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 125% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 183% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 28% | 0% |
| case-05 | ✓→✗ | ▼ Worse | 90% | 0% |
Use this skill to help a user diagnose, repair, and prevent Drizzle Kit migration conflicts in a multi-developer repository. Drizzle migrations encode both SQL and migration snapshots, so the safe answer depends on the current migration directory shape, the Drizzle Kit version, and the git state.
_journal.json, or snapshot.json conflict after a pull, merge, rebase, or PR update.drizzle-kit check reports non-commutative migrations or migration folder conflicts.drizzle-kit migrate, drizzle-kit push, database seed scripts, or any command thatconnects to a live database unless the user explicitly requests it and the target is clear.
drizzle-kit check, project typechecks, and tests as command execution that may load projectconfig, environment variables, or scripts. Inspect scripts/config first, and require an explicit non-production or disposable target before any DB-backed validation.
_journal.json, or run git checkout --ours,git checkout --theirs, git restore, or rm unless the user has confirmed the exact side and files to change.
drizzle-kit push as the production solution for migration conflicts; it skipsthe auditable migration history that teams need.
--ignore-conflicts as an exception for a known false positive, not as the normal fix.repair normally discards generated migrations and regenerates them from the merged schema.
ours and theirs could mean different branches depending on merge direction, ask the user toidentify the parent branch before suggesting checkout commands.
references/sources.md when the answer depends on current Drizzle behavior, officialguidance, or one of the preserved external links.
references/conflict-resolution.md before recommending a repair flow.references/ci-policy.md before proposing CI, merge queue, or team workflow changes.references/report-template.md before writing a diagnostic report.The full list of official docs, Drizzle GitHub discussions, community scripts, and merge-queue references lives in references/sources.md with trust levels and caveats. Read that file whenever the answer depends on current Drizzle behavior. Re-verify the official docs and the most relevant discussion when the project's drizzle-kit major version changes, since migration internals (snapshot format, journal shape, drizzle-kit check semantics) have shifted between releases.
Classify the task first:
drizzle-kit check and wants to understand it.When the mode is not explicit, choose Diagnose.
Each mode unlocks a specific set of actions. Do not cross these boundaries without an explicit upgrade:
git status, git ls-files -u, the helper script, and fileinspection. Do not run drizzle-kit check, typechecks, tests, or any write command. Report findings and the proposed repair path, but do not execute it.
drizzle-kit generate/check execution, each gated by theSafety rules and explicit confirmation of the exact files and side (ours/theirs) to change.
against the user's database to validate the workflow; validate the workflow syntax and logic only.
Collect repo facts before giving commands:
bashgit status --short git rev-parse --show-toplevel git rev-parse --abbrev-ref HEAD git ls-files -u rg --files -g 'drizzle.config.*' -g 'package.json' -g 'pnpm-lock.yaml' -g 'yarn.lock' -g 'package-lock.json'
Then inspect the relevant files:
drizzle.config.* for out, schema, dialect, and config shape.package.json scripts for the project-approved generate, check, and migrate commands.package.json dependencies or lockfile snippets for drizzle-kit and drizzle-orm versions.drizzle/, migrations/,or src/db/migrations/.
If this skill's helper script is available, run it in read-only mode:
bashpython3 <skill-dir>/scripts/check_drizzle_migrations.py --root .
Resolve <skill-dir> to the installed skill directory before running. Check these locations in order and use the first that contains scripts/check_drizzle_migrations.py:
<repo-root>/skills/drizzle-migration-conflict.~/.claude/skills/drizzle-migration-conflict.If none of these resolve, fall back to the manual git/rg inspection commands above and tell the user the helper script was not found. Use --config <file> and --migrations-dir <dir> when the project has multiple Drizzle configs or outputs. The script never connects to a database and never writes files; it only reads migration directories and reports structural issues.
Identify the structure before proposing a fix:
<out>/meta/_journal.json, <out>/meta/*_snapshot.json, and root-levelmigration SQL files such as <out>/0003_name.sql.
migration.sql andsnapshot.json.
not one side's stale snapshot.
branch after updating from that branch.
snapshot files.
check only after confirming its config/env cannot point at production; then project tests only after inspecting the scripts and any database targets.
write.
drizzle.config.*, .env, or environment variables, do notinclude database URLs, passwords, tokens, or connection strings in the report. Reference them as <redacted> or describe only whether they point at a production-like target.
references/report-template.md for diagnostic reports:NO_CONFLICT_FOUND, SAFE_TO_REGENERATE, NEEDS_USER_CONFIRMATION, or BLOCKED_BY_AMBIGUITY.
Use these prompts to validate the skill behavior:
_journal.json and 0003_snapshot.json conflict during merge. Tell me what to do."drizzle-kit check reports a non-commutative conflict."drizzle-kit push?"drizzle.config.ts sets out from process.env.MIGRATIONS_DIR, and the helper says no out directory was found. What now?"drizzle-kit check keeps failing on a migration we know commutes. Can we just always pass --ignore-conflicts?"Other measured skills in the registry, with their headline benchmark lift.