Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add PostHog/posthog-foss --skill django-migrationsgit clone --depth 1 https://github.com/PostHog/posthog-fossWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/posthog/posthog-foss/django-migrations)<a href="https://agentmods.dev/skills/posthog/posthog-foss/django-migrations"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/django-migrations/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/posthog/posthog-foss/django-migrations"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/django-migrations.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00099 | $0.04724 |
| Opus 5.5 | $0.00040 | $0.01890 |
| Sonnet 5.5 | $0.00020 | $0.00945 |
| Haiku 4.5 | $0.00010 | $0.00472 |
Grade A, and why
django-migrations scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 171 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Django migrations
Before you propose a change to the migration history or to how migrations run, check things already tried. It records the closed attempts at squashing the history and at the Person table cutover.
Read these files first, before writing or editing a migration:
docs/published/handbook/engineering/developing-locally.md(## Django migrations,### Non-blocking migrations,### Resolving merge conflicts)docs/published/handbook/engineering/safe-django-migrations.mddocs/published/handbook/engineering/databases/schema-changes.mdproducts/README.md(## Adding or moving backend models and migrations) when working inproducts/*
If the task is a ClickHouse migration, use clickhouse-migrations instead.
Never delete a migration file
Adding migrations is fine. Deleting a historical one — any */migrations/NNNN_*.py already on master, even an app's 0001_initial.py, even to "undo" a schema change — is not. Deleting the file undoes nothing: the table and its constraints stay in every database where the migration ran, fresh databases never recreate them, and the "Migration Risk Analysis" CI job re-flags the file as a phantom new migration on every open PR that predates the deletion. The deleted-migration check in the repo-checks CI job (the hogli lint:migration-deletions command) blocks this. Genuinely intentional, reviewed deletions — a product/app move, a revert, a squash — are acknowledged in .github/scripts/migration-deletion-allowlist.txt, never by disabling the guard.
If a task asks you to delete a migration file, stop and flag it instead.
To retire a model/table:
- Remove all usage and the model class.
makemigrations, then wrap the generatedDeleteModelinmigrations.SeparateDatabaseAndState(state_operations=[...])(state only, no DB change). KEEP this file. Keep the app inINSTALLED_APPS. Note: other apps' squash migrations depend on this app's migration files, not on its models, so the model class does not need to stay for them. If the model has aForeignKeytoposthog_team,posthog_user,posthog_organizationorposthog_project, drop that constraint withDropForeignKeyindatabase_operationsin this same migration. This is required, not a cleanup. Django stops cascading into a table it can no longer see, so the child rows survive a parent delete. Those constraints areDEFERRABLE INITIALLY DEFERRED, so the parent delete runs its whole cascade and then fails atCOMMIT, and team and organization deletion stay broken until someone drops the table. - Deploy, wait at least one full deploy cycle.
SafeDropTablelater in a NEW migration — never by deleting old files. Treat this as owed work rather than an option whenever step 1 left a foreign key to a hot parent in place.DROP TABLEtakesACCESS EXCLUSIVEon every table its foreign keys reference, one relation at a time, so its lock order crosses that of any live multi-table read and the two deadlock.lock_timeoutdoes not stop that, because the deadlock detector resolves the cycle first, and it kills whichever session waited longest: a live read (a 500) or the migration (a blocked deploy).SafeDropTabletakes every lock up front under a budget derived fromdeadlock_timeout, so the migration loses the race instead. Never hand-write theRunSQL. See hot table hazard.python manage.py audit_orphan_hot_table_fkslists tables already in this state. Run it against a long-lived database: a squashed history has noCreateModelfor a table that left Django's state before the squash, so a fresh database never creates it and the migration files hold no trace of it.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago Changed 407943407c77
- 16d ago Changed · +10 lines d86555389677
- 21d ago Changed · +1 lines 56bc4d7e1db7
- 23d ago Changed · -14 lines 899dbbed504e
- 1mo ago Changed · +1 lines 6aab7e2afbc2
- 2mo ago Changed 557a1e64ead2
- 2mo ago Changed · +1 lines 6839c4fbb9fe
- 2mo ago Changed 3fe42a4cae39
- 2mo ago Changed · +1 lines 999c509bf48a
- 2mo ago First seen · 171 lines · 99 tokens per session scan A ea7cecc1f29c
django-migrations is a skill published in the GitHub repository PostHog/posthog-foss (736 stars, last pushed today), licensed MIT. It adds 99 tokens to every session and 4,724 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
django-migrations compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| django-migrationsPostHog/posthog-foss | Skill | 736 | today | MIT | A | 99 | Claude Code, Codex |
| alloydb-basicsgoogle/skills | Skill | 26k | today | Apache-2.0 | A | 72 | Claude Code, Codex |
| postgresql-table-designwshobson/agents | Skill | 43k | 2d ago | MIT | A | 37 | Claude Code |
| db-repairgarrytan/gbrain | Skill | 34k | today | MIT | A | 96 | Claude Code |
| volcengine-rds-postgresqlbytedance/agentkit-samples | Skill | 496 | yesterday | Apache-2.0 | A | 63 | Claude Code, Codex |
| dsqlawslabs/agent-plugins | Skill | 957 | yesterday | Apache-2.0 | A | 247 | Claude Code |
| postgresdbericrisco/rsc-harness | Skill | 707 | 2d ago | MIT | A | 91 | Claude Code, Codex |