一键导入
db-review
Review database schemas and suggest improvements for indexing, types, and constraints.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Review database schemas and suggest improvements for indexing, types, and constraints.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Ruthlessly tear apart code design — naming, abstractions, coupling, complexity, and everything else.
Generate Mermaid diagrams in the README to visualise architecture, flows, or relationships from the codebase.
Analyse test coverage gaps and report uncovered code before making changes.
Run tests, fix failures, and re-run until the suite passes.
Write and improve tests — reuse existing patterns, ensure consistency, and maintain quality.
Isolate a function or code block into a self-contained, runnable script for study and manual testing.
| name | db-review |
| description | Review database schemas and suggest improvements for indexing, types, and constraints. |
| argument-hint | <files> [instructions] |
| user-invocable | true |
| context | fork |
| agent | Explore |
| allowed-tools | Read, Grep, Glob |
| paths | *.sql, *.prisma, *.schema, **/migrations/**, **/models/** |
Analyse the specified database schema files and provide actionable improvement suggestions.
Files and instructions: $ARGUMENTS
VARCHAR(255) where VARCHAR(50) suffices, BIGINT where INT is enough), incorrect types (e.g. strings for dates, floats for currency), and missing precision on decimals.NOT NULL where nullability is unlikely intentional, missing UNIQUE constraints, missing CHECK constraints for bounded values, and missing DEFAULT values.created_at/updated_at audit columns, soft-delete patterns without indexes on the deleted flag, missing composite primary keys on junction tables.The arguments are free-form and flexible. They may contain:
@schema.sql, migrations/001.sql, models.py, schema.prisma, schema.rb db/structure.sqlParse the arguments to identify which files to review and what additional instructions apply. When additional instructions reference related files (e.g. migrations, ORM models), follow those instructions to identify and include those files as well.
/db-review @schema.sql — review a single schema file/db-review schema.prisma, migrations/001.sql — review multiple files/db-review @models.py this is a write-heavy OLTP workload on PostgreSQL — review with workload context/db-review @schema.sql focus on indexing and performance only — targeted review