Skip to main content
skill CX Codex

django-safe-migration — Claude Code skill for Django migrations

django-safe-migration is a Claude Code skill that reviews and rewrites Django migrations for PostgreSQL with deployment locks in mind, before schema changes or releases.

no license 822 installs ★ 176 updated 2026-07-23

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add vintasoftware/django-ai-plugins --skill django-safe-migration -a claude-code
Open on GitHub

What django-safe-migration does

The skill helps assess Django migrations for PostgreSQL and rewrite risky operations. During a review, it calls for inspecting the SQL produced by Django and judging it against a rolling deployment. A lock can hold up queries to a table and cause more requests to queue behind it.

The described techniques include AddIndexConcurrently, adding a foreign key with NOT VALID before checking existing rows with VALIDATE CONSTRAINT, and separating database changes from Django’s recorded state. Operations that need an ACCESS EXCLUSIVE lock should use lock_timeout. The skill also asks the agent to read project instructions; Django’s version matters when considering db_default.

What it helps with

  • review a migration before a rolling deploy
  • rewrite a schema change with PostgreSQL locks in mind
  • add a foreign key and validate existing rows later
  • inspect the SQL Django will run

Example prompts for the agent

  • Review this Django migration for PostgreSQL before a rolling deploy.
  • Rewrite this foreign-key change so existing rows are checked in a separate step.
  • Show the SQL for this migration and assess its table-lock risk.

How to install django-safe-migration

1Skills CLI (Vercel)

npx skills add vintasoftware/django-ai-plugins --skill django-safe-migration -a claude-code

2Manually: put the files in place

~/.claude/skills/django-safe-migration/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/django-safe-migration/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about django-safe-migration

How do I install django-safe-migration in Claude Code?

Run npx skills add vintasoftware/django-ai-plugins --skill django-safe-migration -a claude-code. The skill file is placed at ~/.claude/skills/django-safe-migration/SKILL.md.

What does django-safe-migration do?

It helps write, review, and rewrite Django migrations for PostgreSQL, taking database locks and deployment safety into account.

How does the skill handle foreign-key constraints?

It describes creating a constraint with NOT VALID and validating existing rows afterward with VALIDATE CONSTRAINT. This separates constraint creation from the scan.

Similar skills

All skills for Backend and APIs →

From the same set5

Project sponsors

Companies that keep this analytics open