text
| 1 | # SQL Safety Rules |
| 2 | |
| 3 | The worst thing an agent can do to a database is not a syntax error, which fails |
| 4 | loudly. It is an UPDATE whose WHERE clause matched every row, or a migration that took |
| 5 | an exclusive lock on the busiest table at peak traffic. These rules exist to make both |
| 6 | impossible to do by accident. |
| 7 | |
| 8 | ## When to use |
| 9 | |
| 10 | - Any project where an agent writes SQL or schema migrations. |
| 11 | - Especially against a database with real data and real traffic. |
| 12 | - As the review standard for a migration before it is approved. |
| 13 | |
| 14 | ## Install |
| 15 | |
| 16 | ```bash |
| 17 | npx openagents-cli add openagents/sql-safety-rules |
| 18 | ``` |
| 19 | |
| 20 | | Runtime | Installed to | |
| 21 | |---|---| |
| 22 | | `claude-code` | `.claude/skills/sql-safety-rules/` | |
| 23 | | `cursor` | `.cursor/rules/sql-safety-rules/` | |
| 24 | | `codex` | `.codex/skills/sql-safety-rules/` | |
| 25 | | `generic` | `.openagents/sql-safety-rules/` | |
| 26 | |
| 27 | ## What is in the package |
| 28 | |
| 29 | - `RULES.md` - the rules, each naming the outage it prevents. |
| 30 | - `migration-checklist.md` - the pass to run over a migration before it ships. |
| 31 | |
| 32 | ## License |
| 33 | |
| 34 | MIT |
| 35 |