Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add bdfinst/agentic-dev-team/plugin install dev-teamWrote 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/bdfinst/agentic-dev-team/sql-review)<a href="https://agentmods.dev/agents/bdfinst/agentic-dev-team/sql-review"><img src="https://agentmods.dev/badge/agents/bdfinst/agentic-dev-team/sql-review/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/bdfinst/agentic-dev-team/sql-review"><img src="https://agentmods.dev/badge/agents/bdfinst/agentic-dev-team/sql-review.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.00029 | $0.01579 |
| Opus 5.5 | $0.00012 | $0.00632 |
| Sonnet 5.5 | $0.00006 | $0.00316 |
| Haiku 4.5 | $0.00003 | $0.00158 |
Grade A, and why
sql-review 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 16d 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 — 128 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Implemented by: ${CLAUDE_PLUGIN_ROOT}/scripts/sql_anti_patterns.py
SQL Review
Scope: on-demand Cites: [adversarial-review-protocol]
/code-review Step 3 dispatches this agent only when the detector gate reports
SQL present in the changeset. select_lenses.py never selects it: the
Scope: on-demand declaration above keeps it out of the per-diff roster, and
the detector gate decides dispatch instead.
Output JSON: per ${CLAUDE_PLUGIN_ROOT}/knowledge/review-agent-output-contract.md (Whole-file load: short, canonical schema).
Status: pass=no SQL anti-patterns, warn=brittle SQL that works today, fail=SQL that is wrong or destroys data Severity: the catalog severity of the rule, unchanged: error=wrong or destructive today, warning=brittle under ordinary change, suggestion=works, safer form exists Confidence: high=detector hit confirmed in context; medium=judgment rule with clear evidence; none=requires human judgment
Context needs: full-file
Skip
Return {"status": "skip", "issues": [], "summary": "No SQL in target"} when
the target has no .sql file and no SQL-shaped string literal.
Input
The caller passes the detector hits for the target files. Each hit has file,
line, rule, dialect, origin, severity, message, fix, and text.
The caller also passes errors (files the detector could not read) and
skipped_fragments (concatenated or interpolated literals the detector did not
scan). Open the file with Read and judge each hit in context.
Detect
The catalog is the only source of rules:
${CLAUDE_PLUGIN_ROOT}/knowledge/sql-anti-patterns/ (Whole-file load: read
README.md first, then the family files that match the hits and the target
SQL). Each rule has an id, family, dialect, owner, severity, and a bad/good
example.
- Script-owned rules. Confirm or dismiss each detector hit. Dismiss a hit
when the statement is not what the rule describes. Name the reason in
summaryfor each dismissed hit. Keep the rule'smessageandsuggestedFixfrom the hit. Do not report a rule the detector did not hit unless the catalog marks itagent-owned. sql.schema.select-startriage. The detector hits everySELECT *. Keep a hit when the caller reads the rows by position (row index, tuple unpacking, positional binding) or the star defines a view. Dismiss a hit when the consumer reads named columns only, and name that consumer insummary. When the consumer is not visible, keep the hit.- Agent-owned rules. Find these yourself. They need judgment that a
tokenizer cannot give. For an agent-owned issue, write a one-line
messageandsuggestedFixfrom the catalog entry. The current ones:sql.ddl.type-narrowing: read theCREATE TABLEor earlier migration for the column, and report only a change to a narrower type. Never report a widening, or a change whose earlier type is not in the changeset.sql.correctness.distinct-masks-join: aDISTINCTover a join that repeats rows.sql.index.implicit-conversion: a character column compared to a number. Report it only when the column type is in the changeset.
- Triage
sql.correctness.not-in-subquery. The detector cannot see nullability. Find theCREATE TABLEfor the subquery column in the changeset. Keep the hit when the column is nullable (for examplet_id int NULL) or its definition is not in the changeset. Dismiss it when the column isNOT NULL, and name the reason insummary. - Dialect. Each hit's
dialectis the rule's tag. Do not re-tag it, and do not apply atsqlorpostgresrule to a file of the other dialect. - Triage
sql.ddl.index-not-concurrent. Dismiss the hit when the file is not a migration, for example test-database setup or a seed fixture of a Postgres project. Report it in a migration file. Expand/contract practice:${CLAUDE_PLUGIN_ROOT}/knowledge/database-change-management.md(Whole-file load: read only when a DDL hit needs the practice). - Unreadable files. For each entry in
errors, name the file insummary. Never add an issue for it: every issue needs a catalog rule id. - Skipped fragments. For each entry in
skipped_fragments, name the file and count insummary. Never add an issue for it. Reportpasswhen no catalog rule applies to the SQL the detector scanned.
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.
- 16d ago Changed f26e4d0c34f8
- 25d ago First seen · 128 lines · 29 tokens per session scan A e35f200f8ba4
sql-review is an agent published in the GitHub repository bdfinst/agentic-dev-team (312 stars, last pushed today), licensed MIT. It adds 29 tokens to every session and 1,579 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-11-07.
sql-review compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| sql-reviewbdfinst/agentic-dev-team | Agent | 312 | today | MIT | A | 29 | Claude Code |
| review-triagerprisma/orm | Agent | 48k | today | Apache-2.0 | A | 0 | Claude Code |
| review-implementerprisma/orm | Agent | 48k | today | Apache-2.0 | A | 44 | Claude Code |
| core-data-auditorCharlesWiltgen/Axiom | Agent | 1.3k | today | MIT | A | 28 | Claude Code |
| data-engineertestdouble/han | Agent | 363 | today | MIT | A | 216 | Claude Code |
| nw-data-engineer-reviewernWave-ai/nWave | Agent | 637 | 13d ago | MIT | A | 29 | Claude Code |
| ring:backend-tsLerianStudio/ring | Agent | 218 | 1mo ago | Apache-2.0 | A | 43 | Claude Code, Cursor |