Sponsor Suno AI Music arrow_forward
Subagent

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
GitHub stars
843
License
MIT
Repo last updated
Sep 3, 2026
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

  1. Download database-reviewer.md from the repository.
  2. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
  3. 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

  1. 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.
  2. 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
  1. Query review: Check WHERE/JOIN indexes, run EXPLAIN ANALYZE, detect N+1, verify composite index column order
  2. Schema review: Verify data types, constraints (PK, FK with ON DELETE, NOT NULL), naming, PK strategy (IDENTITY vs UUIDv7), partitioning need (>100M rows)
  3. Security review: Verify RLS enabled, policies use (SELECT auth.uid()), RLS columns indexed, least privilege
  4. 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

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.