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 1mo 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.
- 1mo ago First seen · 255 lines · 32 tokens per session scan A bf2b9d3465ac
sql-reviewer is an agent published in the GitHub repository gaoconggit/SharpPad (82 stars, last pushed 8mo 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.
sql-reviewer compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| sql-reviewergaoconggit/SharpPad | Agent | 82 | 8mo ago | MIT | A | 32 | Claude Code |
| Database Reviewersrnichols/plan-forge | Agent | 6 | 25d ago | MIT | A | 26 | Claude Code |
| db-agentjohanolofsson72/Claude | Agent | 3 | 5d ago | none | A | 30 | Claude Code |
| database-adminduongthinh03/portfolio | Agent | 82 | 5mo ago | none | A | 0 | Claude Code |
| manage-database-schemaJAXTech-Labs/claude-code-template | Agent | 2 | 7mo ago | none | A | 39 | Claude Code |
| ef-query-optimizationJAXTech-Labs/claude-code-template | Agent | 2 | 7mo ago | none | A | 34 | Claude Code |
| database-engineerJAXTech-Labs/claude-code-template | Agent | 2 | 7mo ago | none | A | 29 | Claude Code |