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.
git clone --depth 1 https://github.com/nedcodes-ok/cursorrules-collectionWrote 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/rules/nedcodes-ok/cursorrules-collection/migration-safety)<a href="https://agentmods.dev/rules/nedcodes-ok/cursorrules-collection/migration-safety"><img src="https://agentmods.dev/badge/rules/nedcodes-ok/cursorrules-collection/migration-safety/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/rules/nedcodes-ok/cursorrules-collection/migration-safety"><img src="https://agentmods.dev/badge/rules/nedcodes-ok/cursorrules-collection/migration-safety.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00592 | $0.00592 |
| Opus 5.5 | $0.00237 | $0.00237 |
| Sonnet 5.5 | $0.00118 | $0.00118 |
| Haiku 4.5 | $0.00059 | $0.00059 |
Grade A, and why
migration-safety 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 2mo 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 — 58 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Migration Safety Cursor Rules
You are an expert in safe database migration practices. Follow these rules:
Migration Structure
- One migration per file, sequentially numbered or timestamped
- Every migration has an up AND a down — no exceptions
- Test the down migration before deploying the up
- Migration files are immutable once applied — never edit, only append new migrations
- Include a description comment at the top of each migration file
Backward-Compatible Changes (Safe to Deploy)
- Adding a new table
- Adding a nullable column (existing code ignores it)
- Adding an index (CREATE INDEX CONCURRENTLY in PostgreSQL)
- Adding a new enum value (if DB supports it without rewrite)
- Widening a column type (int → bigint, varchar(50) → varchar(100))
Breaking Changes (Require Multi-Step)
- Renaming a column: add new → backfill → deploy code using new → drop old
- Removing a column: deploy code that ignores it → then drop in next migration
- Changing column type: add new column → backfill → switch code → drop old
- Renaming a table: same pattern as column rename
- Never rename + drop in the same deploy as the code change
Zero-Downtime Pattern
- Migration adds new structure (column, table) — backward compatible
- Deploy code that writes to both old and new
- Backfill existing data from old to new
- Deploy code that reads from new only
- Migration removes old structure
- Each step is a separate deploy. Never combine steps.
Rollback Plans
- Before running any migration, verify you can roll back: run down migration on staging
- For data migrations: backup the affected tables/rows before modifying
- If a migration is irreversible (data deletion), flag it clearly and require manual approval
- Keep the previous application version deployable for at least 1 hour post-migration
Anti-Patterns — Do NOT
- ❌ Running ALTER TABLE on large tables without CONCURRENTLY (locks the table)
- ❌ Adding a NOT NULL column without a DEFAULT (fails on existing rows)
- ❌ Deploying code + migration atomically — if the migration fails, the code is broken
- ❌ Using ORM auto-migration in production (Prisma db push, Django migrate without review)
- ❌ Deleting migration files from the history — they're your audit trail
- ❌ Running migrations during peak traffic
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.
- 2mo ago First seen · 58 lines · 592 tokens per session scan A 30b32d4920a6
migration-safety is a cursor rule published in the GitHub repository nedcodes-ok/cursorrules-collection (38 stars, last pushed 9mo ago), licensed MIT. It adds 592 tokens to every session, about $0.0024 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-09-03.
migration-safety compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| migration-safetynedcodes-ok/cursorrules-collection | Cursor rule | 38 | 9mo ago | MIT | A | 592 | Cursor |
| 26-data-persistenceorbitalsonic/AndroidPilot | Cursor rule | 1 | 1mo ago | none | A | 0 | Cursor |
| mysql-autousrrname/cursorrules | Cursor rule | 11 | 7mo ago | ISC | A | 0 | Cursor |
| 40-cache-redisaiagentwithdhruv/ai-dev-stack | Cursor rule | 11 | 5mo ago | MIT | A | 0 | Cursor |
| 23-app-startuporbitalsonic/AndroidPilot | Cursor rule | 1 | 1mo ago | none | A | 0 | Cursor |
| 29-screen-startuporbitalsonic/AndroidPilot | Cursor rule | 1 | 1mo ago | none | A | 0 | Cursor |
| 21-ads-billingorbitalsonic/AndroidPilot | Cursor rule | 1 | 1mo ago | none | A | 0 | Cursor |