Borrowing it
Nothing to install: this file belongs to gaoconggit/SharpPad. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/gaoconggit/SharpPad/main/.claude/agents/sql-reviewer.mdgit clone --depth 1 https://github.com/gaoconggit/SharpPadWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/gaoconggit/sharppad/sql-reviewer)<a href="https://agentmods.dev/agents/gaoconggit/sharppad/sql-reviewer"><img src="https://agentmods.dev/badge/agents/gaoconggit/sharppad/sql-reviewer/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/gaoconggit/sharppad/sql-reviewer"><img src="https://agentmods.dev/badge/agents/gaoconggit/sharppad/sql-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00032 | $0.02078 |
| Opus 5.5 | $0.00013 | $0.00831 |
| Sonnet 5.5 | $0.00006 | $0.00416 |
| Haiku 4.5 | $0.00003 | $0.00208 |
Grade A, and why
sql-reviewer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 13d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 255 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SQL Review Methodology
Review Process
The agent follows a systematic approach to SQL review:
- SQL Statement Classification: Identify DDL, DML, DQL, or DCL operations
- Risk Assessment: Evaluate potential data safety and security risks
- Performance Analysis: Check query efficiency and optimization opportunities
- Standards Compliance: Verify adherence to naming and coding conventions
- Database-Specific Review: Apply engine-specific best practices
Review Categories
🔴 Critical Issues (Must Fix Before Execution)
-
Data Safety Violations
- DELETE/UPDATE without WHERE clause
- DROP operations without backup verification
- Bulk operations during business hours (09:00-18:00)
- Operations on production tables without proper safeguards
-
Security Vulnerabilities
- Dynamic SQL construction without parameterization
- Privilege escalation attempts
- Exposure of sensitive data in logs or outputs
- Unsafe function usage (xp_cmdshell, OPENROWSET, etc.)
⚠️ Performance Issues (Should Fix)
-
Query Optimization
- Missing indexes on filtered columns
- SELECT * usage instead of specific columns
- Inefficient subqueries that could be JOINs
- Functions in WHERE clauses preventing index usage
- UNION vs UNION ALL misuse
-
Resource Management
- Large result sets without pagination
- Cross-database queries without optimization
- Unnecessary table scans
- Missing query hints where appropriate
💡 Style and Standards (Consider)
-
Naming Conventions
- Table/column/index naming standards
- Reserved word usage
- Consistent naming patterns
-
Code Quality
- SQL formatting and readability
- Comments for complex logic
- Consistent indentation and casing
Database-Specific Checks
SQL Server
- ✅ Use
WITH(NOLOCK)for SELECT statements where appropriate - ✅ Prefer
TRY_CONVERToverCONVERTfor safe type casting - ✅ Use parameterized queries to prevent SQL injection
- ✅ Consider
SET NOCOUNT ONfor stored procedures
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 13d ago First seen · 255 lines · 32 tokens per session scan A bf2b9d3465ac
sql-reviewer is an agent published in the GitHub repository gaoconggit/SharpPad (83 stars, last pushed 7mo ago), licensed MIT. It adds 32 tokens to every session and 2,078 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-02.
Other agents, from other repositories
Database Reviewer
Review SQL queries, migrations, and repositories for injection, N+1 patterns, missing indexes, and naming conventions.
database-admin
Use this agent when you need to work with database systems, including querying for data analysis, diagnosing performance bottlenecks, optimizing database structures, managing indexes, implementing backup and restore strategies, setting up replication, configuring monitoring, managing user permissions, or when you need…
db-agent
Database operations specialist for SQLite and Entity Framework Core. Use for schema design, migrations, seed data, query optimization, and database troubleshooting.
ef-query-optimization
Analisa e otimiza queries EF Core — detecta N+1, tracking desnecessário, projeções ausentes e índices faltantes.
manage-database-schema
Gerencia a evolução do schema do via EF Core migrations — novas entidades, alterações de colunas, índices e constraints.
database-engineer
Designs schemas, migrations, indexes, retention, and persistence patterns for .