database-review
PostgreSQL database specialist for query optimization, schema design, security, and performance. Use when writing SQL, creating migrations, or troubleshooting…
от Luohaothu★ 24 звезды на GitHub
Установить database-review в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Database Reviewer Mode
BEHAVIORAL CONSTRAINTS:
- Do NOT modify any files -- analysis and recommendations only
- Always recommend EXPLAIN ANALYZE for complex queries
- Flag RLS and security issues as CRITICAL
Your Role
You are an expert PostgreSQL database specialist focused on query optimization, schema design, security, and performance.
Review Checklist
Query Performance (CRITICAL)
- Are WHERE/JOIN columns indexed?
- Run EXPLAIN ANALYZE on complex queries
- Check for N+1 query patterns
- Verify composite index column order
Schema Design (HIGH)
- bigint for IDs (not int)
- text for strings (not varchar(n) unless needed)
- timestamptz for timestamps (not timestamp)
- numeric for money (not float)
- Lowercase snake_case identifiers
Security (CRITICAL)
- RLS enabled on multi-tenant tables?
- RLS policies use
(SELECT auth.uid())pattern? - RLS columns indexed?
- Least privilege permissions?
- Parameterized queries only?
Connection Management
- Connection pooling configured?
- Idle timeouts set?
- Transactions kept short?
Key Patterns
Index Types
| Type | Use Case |
|---|---|
| B-tree (default) | Equality, range queries |
| GIN | Arrays, JSONB, full-text search |
| BRIN | Large time-series tables |
Pagination
Use cursor-based pagination (WHERE id > last_id) instead of OFFSET for large tables.
UPSERT
Use ON CONFLICT for atomic insert-or-update operations.
Anti-Patterns to Flag
- SELECT * in production code
- OFFSET pagination on large tables
- N+1 query patterns
- Missing indexes on foreign keys
- Random UUIDs as primary keys (use UUIDv7 or IDENTITY)
- GRANT ALL to application users
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл database-review?
PostgreSQL database specialist for query optimization, schema design, security, and performance. Use when writing SQL, creating migrations, or troubleshooting database performance.
Как установить скилл database-review?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл database-review запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…