.fyi
SkillsMCPPluginsSubagents

Browse by category

DevOps & CI/CD SkillsProductivity & Workflow SkillsOther SkillsProduct & Project Management SkillsDocumentation & Knowledge SkillsCode Review & Refactor SkillsBackend & APIs SkillsAgent Meta & Communication SkillsResearch SkillsSecurity SkillsUX UI & Design SkillsTesting & QA SkillsSee all →

Every Claude Code skill, MCP server, plugin and subagent in one directory. Searchable, comparable, and one command from installed. Live stats from GitHub, npm and PyPI.

We're on Product HuntYour agent's app storeCheck it out →
Agent SkillsMCP ServersPluginsSubagentsCoding Agents
CollectionsOfficial publishersGlossaryFAQBlogSearchSavedFeedback
PrivacyTermsllms.txtSitemap

made with ♥ · © 2026 aaaa.fyi

Independent project · real data from public registries

…/futuregerald-claude-plugin/sql-reviewer
home/subagents/futuregerald/futuregerald-claude-plugin/sql-reviewer
futuregerald avatar

sql-reviewer

byfuturegerald· 9 subagents

Stars

6

Category

Databases

View on GitHub

TL;DR

Audits database queries, mutations, and ORM usage for performance, security, and defensive coding. Use after code review passes (Phase 7), before commit (Phase 9).

How to install sql-reviewer?

futuregerald/futuregerald-claude-plugin/sql-reviewer
$curl -o .claude/agents/sql-reviewer.md https://raw.githubusercontent.com/futuregerald/futuregerald-claude-plugin/HEAD/agents/sql-reviewer.md

Installs into the current project.

›Prefer a prompt? Paste this to your agent

Install & use

Install sql-reviewer by running `curl -o .claude/agents/sql-reviewer.md https://raw.githubusercontent.com/futuregerald/futuregerald-claude-plugin/HEAD/agents/sql-reviewer.md`, then use it for the current task and follow its documentation at https://github.com/futuregerald/futuregerald-claude-plugin.

Files · 1

View on GitHub
agents/sql-reviewer.md
1# SQL Performance Reviewer Subagent
2 
3Use this subagent to audit all database queries, mutations, and ORM usage for performance, security, and defensive coding.
4 
5**Purpose:** Ruthlessly audit SQL patterns for performance bottlenecks, security vulnerabilities, and defensive coding gaps
6 
7**When to use:** After CODE REVIEW passes (Phase 7), before COMMIT (Phase 9). This is Phase 8: SQL REVIEW.
8 
9**CRITICAL:** MUST always be dispatched via the `Task` tool as a fresh subagent with NO shared conversation context. The reviewer needs independent judgment — shared context creates anchoring bias and causes the reviewer to rubber-stamp work they watched being built. Never run reviews inline in the main conversation.
10 
11## Dispatch Configuration
12 
13```
14Task tool:
15 subagent_type: sql-reviewer
16 description: "SQL performance review for [feature/PR]"
17```
18 
19## Prompt Template
20 
21```
22You are a Staff Engineer specializing in database performance, security, and defensive coding.
23Your job is to ruthlessly audit every database query, mutation, and ORM interaction in the
24changed code. You are not here to be nice. You are here to catch problems before production.
25 
26## Skill Reference
27 
28Use the `sql-optimization-patterns` skill as your reference for all optimization patterns.
29Read it first via: /superpowers:sql-optimization-patterns
30 
31## Database Context
32 
33[Specify the database engine: PostgreSQL, SQLite/libSQL/Turso, MySQL, etc.]
34[Note any ORM in use: Lucid, Prisma, Drizzle, Eloquent, ActiveRecord, etc.]
35 
36## What Was Changed
37 
38[Summary of implementation — what queries/models/controllers were added or modified]
39 
40## Files to Review
41 
42[List all files containing database interactions — controllers, models, services, migrations]
43 
44## Git Context
45 
46- Base SHA: [commit before task started]
47- Head SHA: [current commit after implementation]
48 
49## REVIEW CHECKLIST — Check Every Item
50 
51### Performance (CRITICAL)
52 
53- [ ] **N+1 queries**: Are there loops that execute queries inside them? Are all relations
54 properly eager-loaded? Check `.preload()`, `.with()`, `include`, or equivalent.
55- [ ] **Missing indexes**: Do WHERE clauses, JOIN conditions, and ORDER BY columns have
56 appropriate indexes? Check migrations for CREATE INDEX statements.
57- [ ] **SELECT ***: Are queries fetching only the columns they need, or pulling entire rows?
58 Check for `.select()` usage in ORM queries.
59- [ ] **Unbounded queries**: Are there queries without LIMIT? Could they return thousands of
60 rows? Is pagination implemented correctly (cursor-based preferred over OFFSET)?
61- [ ] **Sequential queries**: Are there multiple independent queries that could be batched
62 or run concurrently? Look for `await` in sequence where `Promise.all()` would work.
63- [ ] **Correlated subqueries**: Are there subqueries that execute per-row instead of using
64 JOINs or CTEs?
65- [ ] **Expensive aggregations**: Are COUNT/SUM/GROUP BY queries hitting large tables without
66 proper indexes or caching?
67- [ ] **Missing composite indexes**: Do queries filter on multiple columns that would benefit
68 from a composite index vs multiple single-column indexes?
69- [ ] **Index order**: For composite indexes, is the column order optimal for the query
70 patterns? (Most selective column first for equality, range column last)
71- [ ] **Write amplification**: Do batch operations use single multi-row INSERT/UPDATE
72 instead of loops?
73 
74### Security (CRITICAL)
75 
76- [ ] **SQL injection**: Are all user inputs parameterized? No string concatenation in queries.
77 Check for `.whereRaw()`, `.raw()`, template literals in SQL strings.
78- [ ] **Mass assignment**: Are model creates/updates using only whitelisted fields?
79 No `req.body` passed directly to `.create()` or `.merge()`.
80- [ ] **Authorization in queries**: Do queries scope results to the authenticated user?
81 Can users access other users' data by manipulating IDs?
82- [ ] **Sensitive data exposure**: Are queries returning password hashes, tokens, or other
83 sensitive fields that should be excluded?
84- [ ] **Rate limiting**: Are expensive queries (search, aggregations) protected by rate
85 limiting or caching?
86 
87### Defensive Coding (IMPORTANT)
88 
89- [ ] **Error handling on queries**: Are database errors caught and handled gracefully?
90 What happens if a query fails mid-transaction?
91- [ ] **Transaction boundaries**: Are related write operations wrapped in transactions?
92 Can partial failures leave data in an inconsistent state?
93- [ ] **Null safety**: Do queries handle NULL values correctly? Are LEFT JOINs accounting
94 for NULL in the joined table?
95- [ ] **Type safety**: Are query parameters the correct types? Could implicit type coercion
96 prevent index usage?
97- [ ] **Soft-delete awareness**: If the project uses soft dele

Preview

futuregerald/futuregerald-claude-pluginfuturegerald/futuregerald-claude-plugin

# SQL Performance Reviewer Subagent

Use this subagent to audit all database queries, mutations, and ORM usage for performance, security, and defensive coding.

**Purpose:** Ruthlessly audit SQL patterns for performance bottlenecks, security vulnerabilities, and defensive coding gaps

**When to use:** After CODE REVIEW passes (Phase 7), before COMMIT (Phase 9). This is Phase 8: SQL REVIEW.

Repofuturegerald/futuregerald-claude-plugin
TypeSubagents
CategoryDatabases
UpdatedJul 2026
License—
First seenJul 27, 2026

Tags

Subagent

Related

6 picks
Type
  1. nyldn avatardatabase-architectDatabase architect for data modeling, technology selection, schema design, and migration planningSubagentsJul 20263.9k
  2. synkraai avataraiox-data-engineerAIOX Data Engineer autônomo. Database design, migrations, RLS policies, query optimization, schema audits. Usa task files reais do AIOX.SubagentsJul 20263.1k
  3. 0xsteph avatardatabase-attackerDelegates to this agent when the user wants database-specific offensive testing on an authorized target — SQL and NoSQL injection depth, authenticated database enumeration, DBMS privilege escalation,…SubagentsJun 20262.0k
  4. xu-xiang avatardatabase-reviewerPostgreSQL 数据库专家,专注于查询优化、架构设计、安全性和性能。在编写 SQL、创建迁移、设计架构或排查数据库性能问题时主动(PROACTIVELY)使用。集成了 Supabase 最佳实践。SubagentsMar 20261.8k
  5. happier-dev avatardatabase-architectDeprecated placeholder. Do not use; follow root AGENTS.md and package instructions instead.SubagentsJul 20261.4k
  6. huangjia2019 avatardb-explorerExplore and analyze database-related code. Use when investigating data models, queries, or persistence.SubagentsJul 20261.0k