Database Reviewer by sangrokjung
Use when writing SQL queries, creating migrations, or troubleshooting database performance in Supabase/PostgreSQL projects. Reviews indexes, RLS policies, schema types, N+1 patterns. Read-only reviewer with EXPLAIN ANALYZE capability.
- Type
- Subagent
- Repository
- sangrokjung/claude-forge
- GitHub stars
- 843
- License
- MIT
- Repo last updated
- Sep 3, 2026
- Source file
- agents/database-reviewer.md
- Model
- sonnet
What Database Reviewer by sangrokjung is
Database Reviewer by sangrokjung is a subagent published in the sangrokjung/claude-forge repository on GitHub, which has about 843 stars. The repository describes itself as: “oh-my-zsh for Claude Code — 16 agents, 35 commands, 32 skills, 21 safety hooks in one install. v4.0 adds an adversarial review loop: a second agent that never sees the first one's reasoning. MIT.”
A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.
Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Database Reviewer and get back a compact result.
It is set up to use these tools: Read, Grep, Glob, Bash. Limiting tools is a good sign: the subagent can only do what those tools allow.
How to install Database Reviewer by sangrokjung
Claude Code
- Download database-reviewer.md from the repository.
- Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
- Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Claude Cowork
- Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
- Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.
Inside the source file
An excerpt from agents/database-reviewer.md, shared under the repository's MIT license. Read the full file on GitHub.
You are Database Reviewer. Your mission is to ensure database code follows PostgreSQL best practices, prevents performance issues, and maintains data integrity. You are responsible for query performance optimization, schema design review, security and RLS implementation, connection management, and N+1 detection. You are not responsible for implementing application logic (executor), designing system architecture (architect), or writing application tests (test-engineer).
- Every SQL query verified for proper index usage (WHERE/JOIN columns)
- Schema uses correct data types (bigint, text, timestamptz, numeric)
- RLS enabled on all multi-tenant tables with (SELECT auth.uid()) pattern
- No N+1 query patterns
- EXPLAIN ANALYZE run on complex queries
- Issues rated by severity with SQL fix examples
- Never approve: int for IDs (use bigint), varchar(255) without reason (use text), timestamp without timezone (use timestamptz), float for money (use numeric), GRANT ALL to app users
- Always verify: FK indexes, RLS on multi-tenant tables, (SELECT auth.uid()) not bare auth.uid(), lowercase_snake_case identifiers
- Use Supabase MCP tools for database operations
- Query review: Check WHERE/JOIN indexes, run EXPLAIN ANALYZE, detect N+1, verify composite index column order
- Schema review: Verify data types, constraints (PK, FK with ON DELETE, NOT NULL), naming, PK strategy (IDENTITY vs UUIDv7), partitioning need (>100M rows)
- Security review: Verify RLS enabled, policies use (SELECT auth.uid()), RLS columns indexed, least privilege
- Rate each issue by severity, provide SQL fix
- Use mcpsupabaseexecute_sql for EXPLAIN ANALYZE
- Use mcpsupabaselist_tables for schema overview
- Use Read/Grep for SQL in application code
- Use mcpcontext7* for PostgreSQL/Supabase documentation (상세 패턴은 context7로 조회)
핵심 판단 기준
EXPLAIN ANALYZE 경고 신호
인덱스 선택
RLS 필수 패턴
ALTER TABLE orders ENABLE ROW LEVEL SECURITY;
CREATE POLICY orders_policy ON orders
USING ((SELECT auth.uid()) = user_id); -- SELECT 래핑 필수 (100x 빠름)
CREATE INDEX orders_user_id_idx ON orders (user_id);N+1 감지
-- BAD: 개별 쿼리 반복
SELECT * FROM orders WHERE user_id = 1; -- x100
-- GOOD: ANY 또는 JOIN
SELECT * FROM orders WHERE user_id = ANY(ARRAY[1,2,3,...]);스키마 타입 가이드
상세 PostgreSQL 패턴 및 예시는 mcpcontext7query-docs로 조회.
Related MCP Tools
- mcp__supabase__*: DB 직접 관리
- mcp__context7__*: PostgreSQL/Supabase 문서
Related Skills
- postgres-patterns, clickhouse-io, backend-patterns
Before you install
- Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
- Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
- Try it in a test project or a copy of your files before pointing it at real work.
- Pin the version you tested, and review changes before updating.
- Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.
FAQ
What is Database Reviewer by sangrokjung?
Database Reviewer by sangrokjung is a subagent for Claude Code and Claude Cowork from the sangrokjung/claude-forge repository on GitHub. Use when writing SQL queries, creating migrations, or troubleshooting database performance in Supabase/PostgreSQL projects. Reviews indexes, RLS policies, schema types, N+1 patterns. Read-only reviewer with EXPLAIN ANALYZE capability.
How do I install Database Reviewer by sangrokjung in Claude Code?
Download database-reviewer.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Can I use Database Reviewer by sangrokjung in Claude Cowork?
Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
Is Database Reviewer by sangrokjung safe to install?
It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.
Similar resources
- Claude Forge oh-my-zsh for Claude Code — 16 agents, 35 commands, 33 skills, 22 hooks + 9 examples (21 events), 14 rules, 4 MCP (minimal: playwright, context7, jina-reader, [email protected]). Adversarial verification loop (maker≠checker), unattended API-error auto-resume, session relay, and Korean prose quality guardrails. One-line install: curl -fsSL https://raw.githubusercontent.com/… Plugin · sangrokjung/claude-forge
- E2e Runner Use when creating, maintaining, or running E2E tests for critical user journeys (auth, payments, core features), or diagnosing memory leaks, console errors, and network waterfalls in flaky tests. Subagent · sangrokjung/claude-forge
- Vision Specialist Expert in vision models, OCR systems, barcode detection, and visual AI. Stays current with latest models (GPT-4V, Claude Vision, Mistral-OCR, etc.), optimization techniques, and specialized libraries. Use PROACTIVELY for image processing, document analysis, or visual AI tasks. Subagent · ccplugins/awesome-claude-code-plugins
- Changelog Manager Manages changelog generation and version tracking. Use after commits, before releases, or when preparing release notes. Analyzes git history to generate structured changelogs following Keep a Changelog format. Subagent · borghei/Claude-Skills
- Unit Test Generator Expert Flutter/Dart unit test specialist that systematically improves test coverage using automated workflows with strict validation, git management, and Aurigo corporate standards. Use for comprehensive test suite creation and coverage improvement. Subagent · ccplugins/awesome-claude-code-plugins
- Code Reviewer Reviews code for quality, security, performance, and best practices. Use proactively after code changes, before commits, or when reviewing PRs. Identifies bugs, anti-patterns, security vulnerabilities, and suggests improvements. Subagent · borghei/Claude-Skills
- Project Curator Reorganizes project structure by cleaning root clutter, creating logical folder hierarchies, and moving files to optimal locations. Tracks dependencies and fixes broken imports/paths. Use PROACTIVELY when project structure becomes unwieldy or needs architectural cleanup. Subagent · ccplugins/awesome-claude-code-plugins
- Content Strategist Editorial-minded strategist who combines narrative craft with data-driven distribution. Thinks in audience journeys, content systems, and compounding assets. Subagent · borghei/Claude-Skills