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/girijashankarj/cursor-handbookWrote 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/girijashankarj/cursor-handbook/migration-rules)<a href="https://agentmods.dev/rules/girijashankarj/cursor-handbook/migration-rules"><img src="https://agentmods.dev/badge/rules/girijashankarj/cursor-handbook/migration-rules/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/girijashankarj/cursor-handbook/migration-rules"><img src="https://agentmods.dev/badge/rules/girijashankarj/cursor-handbook/migration-rules.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.00000 | $0.00459 |
| Opus 5.5 | $0.00000 | $0.00184 |
| Sonnet 5.5 | $0.00000 | $0.00092 |
| Haiku 4.5 | $0.00000 | $0.00046 |
Grade A, and why
migration-rules 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 3mo 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.
What it actually says
Database Migration Rules
Migration Safety
Pre-Migration Checklist
- Migration has both UP and DOWN functions
- Tested against a copy of production data
- No data loss in the migration
- Backward compatible with current code
- Performance tested for large tables
- Reviewed by another developer
Safe Migration Patterns
-- SAFE: Adding a column with a default
ALTER TABLE orders ADD COLUMN priority VARCHAR(20) DEFAULT 'normal';
-- SAFE: Adding an index concurrently (PostgreSQL)
CREATE INDEX CONCURRENTLY idx_orders_priority ON orders(priority);
-- UNSAFE: Renaming a column (breaks existing queries)
-- Instead: Add new column → migrate data → update code → remove old column
-- UNSAFE: Changing column type directly
-- Instead: Add new column → migrate data → swap columns
Migration Naming
Format: YYYYMMDDHHMMSS_descriptive_action.sql
Examples:
20260101120000_create_orders_table.sql
20260102090000_add_priority_to_orders.sql
20260103150000_create_idx_orders_user_id.sql
Zero-Downtime Migration Strategy
For production databases, follow this sequence:
- Expand: Add new columns/tables (backward compatible)
- Migrate: Backfill data to new structure
- Contract: Update code to use new structure
- Cleanup: Remove old columns/tables (after verification)
Rollback Plan
- Every migration MUST have a rollback script
- Test rollback in staging before production deployment
- Keep rollback scripts for the last 10 migrations
- Document manual steps if automated rollback isn't possible
Data Backfill
- Use batch processing for large tables (1000-5000 rows per batch)
- Include progress logging
- Implement idempotent backfills (safe to re-run)
- Run during low-traffic periods for large tables
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.
- 3mo ago First seen · 62 lines · 0 tokens per session scan A dee8c90b2b85
migration-rules is a cursor rule published in the GitHub repository girijashankarj/cursor-handbook (33 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 459 tokens. 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-rules compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| migration-rulesgirijashankarj/cursor-handbook | Cursor rule | 33 | 3mo ago | MIT | A | 0 | Cursor |
| full-stack-ship-disciplinekensaurus/cursor-kenji | Cursor rule | 9 | 2mo ago | MIT | A | 53 | Cursor |
| supabasekensaurus/cursor-kenji | Cursor rule | 9 | 2mo ago | MIT | A | 0 | Cursor |
| sqlinboxpraveen/Minimize-Cursor-Cost | Cursor rule | 12 | 2mo ago | Apache-2.0 | A | 0 | Cursor |
| graphstackMertCapkin/GraphStack | Cursor rule | 8 | 5mo ago | MIT | A | 1,573 | Cursor |
| mysql-autousrrname/cursorrules | Cursor rule | 11 | 8mo ago | ISC | A | 0 | Cursor |
| supabasenedcodes-ok/cursorrules-collection | Cursor rule | 38 | 9mo ago | MIT | A | 1,061 | Cursor |