ワンクリックで
dba-review
[pr-review-focus-area: Database] Database schema and query audit for correctness, performance, and conventions.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
[pr-review-focus-area: Database] Database schema and query audit for correctness, performance, and conventions.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Research a work item, draft an implementation plan, and begin work after approval.
Guided one-shot install — discover installed plugins (or help install new ones), pick install scope, calibrate risk tolerance into a concrete allowlist + hooks, scaffold or merge CLAUDE.md, and sanity-check the result.
Finalize work — commit via /commit, push, and create PRs on feature branches.
Reviewer-side PR workflow — checks out the branch in a worktree, runs focus-area reviews plus a senior-engineering pass, optionally cross-checks against an autonomous reviewer, and posts inline findings only on explicit approval. Read-only — never edits, commits, or pushes.
Fetch PR review comments, classify by severity and confidence, and fix the selected subset.
Triage CVE and SBOM scanner output (Trivy, Grype, Snyk, Docker Scout, Dependabot) into a ranked, deduplicated action list.
| name | dba-review |
| description | [pr-review-focus-area: Database] Database schema and query audit for correctness, performance, and conventions. |
| user-invocable | true |
| disable-model-invocation | true |
| allowed-tools | ["Read","Grep","Glob"] |
Audit database schemas and queries for correctness, performance, and naming conventions.
/dba-review — reviews changed schema and query files.
text over varchar unless a strict length constraint is required.timestamptz (timestamp with time zone), never timestamp without timezone.bigint / bigserial for primary keys on tables expected to grow unbounded.jsonb over json for any JSON column (supports indexing and operators).uuid type for UUID columns, not text or varchar(36).boolean, not int or smallint.snake_case, plural (e.g., users, order_items).snake_case, singular descriptive (e.g., created_at, user_id).idx_{table}_{columns}.fk_{table}_{referenced_table} or {referenced_table}_id column name.NOT NULL unless the column genuinely needs to be nullable. Flag nullable columns without justification.CHECK constraints for columns with bounded values (e.g., status, priority).UNIQUE constraints where business rules require uniqueness.UPDATE or DELETE without a WHERE clause as [BLOCK].SELECT without LIMIT on potentially large tables.LIKE '%value%' (leading wildcard prevents index usage).WHERE, JOIN, or ORDER BY.ORDER BY on unindexed columns for large tables.After the schema and query checks, dispatch to the data-engineer subagent with the findings. Ask it to apply its data-layer lens — index/query hygiene confirmed against the plan where possible, integrity guarantees that belong in the schema, and behavior at production row counts rather than dev scale — and to rank what it would block on. Integrate its top findings into the report below; do not replace the skill's [BLOCK]/[FAIL]/[WARN] verdict contract.
Agent({
subagent_type: "data-engineer",
description: "DBA senior review",
prompt: "Review these database findings: <schema and query issues with table/column/path:line>. Apply senior data-engineer scrutiny — index and query hygiene at production scale, integrity constraints that belong in the schema, N+1 and unbounded-result risks. Rank what you would block on versus hardening. Return findings in severity order, quoting the table, column, or query for each."
})
## DBA Review
### Schema Issues
- [FAIL] users table: FK column `org_id` has no index
- [WARN] posts table: `created_at` uses `timestamp`, should be `timestamptz`
### Query Issues
- [BLOCK] src/data/users.ts:42 — DELETE without WHERE clause
- [WARN] src/data/posts.ts:18 — SELECT * should specify columns
- [WARN] src/data/orders.ts:55 — N+1 query pattern in loop
### Summary: 1 BLOCK, 1 FAIL, 3 WARN