review-sql
Skill8 starsChanged 2 months agoMITView on GitHub
Review SQL and query code for injection risk, parameterization, indexing and performance, transactions, NULL and constraints, and dialect portability. Language-only atomic skill; output is a findings list.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- erikdarlingdata/DarlingDatatheir own version, first seen Oct 8, 2026
- atsushi-green/ds-ai-coding-skillstheir own version, first seen Sep 25, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- erikdarlingdata/DarlingData★ 730same name
- atsushi-green/ds-ai-coding-skills★ 86same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository77 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- archive-milestoneSkill
- assess-product-opportunitySkill
- automate-testsSkill
- bump-versionSkill
- capture-work-itemsSkill
- commit-workSkill
- competitive-researchSkill
- consume-nats-messageSkill
- decontextualize-textSkill
- deep-researchSkill
- define-docs-normsSkill
- define-missionSkill
- define-north-starSkill
- define-roadmapSkill
- define-strategic-pillarsSkill
- define-visionSkill
- deliver-featureSkill
- design-strategic-goalsSkill
- eli5Skill
- establish-delivery-workflowSkill
- execute-delivery-workflowSkill
- generate-agent-entrySkill
- generate-github-workflowSkill
- generate-standard-readmeSkill
- inspect-artifact-stateSkill
- integrate-branchesSkill
- manage-secretSkill
- map-item-dependenciesSkill
- market-researchSkill
- orchestrate-code-reviewSkill
- orchestrate-governance-stepSkill
- orchestrate-repair-loopSkill
- orchestrate-repair-requirements-loopSkill
- orchestrate-roadmap-planningSkill
- plan-milestonesSkill
- plan-nextSkill
- policy-researchSkill
- ponytailSkill
- prepare-presales-responseSkill
- prepare-version-notesSkill
- prioritize-backlogSkill
- product-opportunity-analysisSkill
- promote-roadmap-itemsSkill
- publish-nats-messageSkill
- record-milestone-achievementSkill
- redeploy-localSkill
- refine-skill-designSkill
- review-architectureSkill
- review-codebaseSkill
- review-diffSkill
- review-dotnetSkill
- review-error-surfacingSkill
- review-functional-designSkill
- review-goSkill
- review-implementation-alignmentSkill
- review-javaSkill
- review-observabilitySkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 5 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 53
Handoff point: When all SQL findings are emitted, hand off to orchestrate-code-review for aggregation.
- Distinctive: line 60
SQL-only review: When the user wants only query correctness, performance, and safety checked.
- Distinctive: line 61
Migration or portability: Check dialect-specific constructs and portability across databases.
- Distinctive: line 63
When to use: When the code under review includes SQL (raw .sql, embedded in code, or ORM-generated).
- Distinctive: line 76
Injection and parameterization: No string concatenation or interpolation for user input in SQL.
- Very specific: line 115
Do NOT select or define the code scope — scope is determined by the caller or orchestrate-code-review
- Very specific: line 116
Do NOT perform broad security analysis beyond SQL injection — use review-security
- Very specific: line 117
Do NOT perform architecture analysis — use review-architecture
- Very specific: line 118
Do NOT review non-SQL code for SQL conventions (SQL injection in application code should be flagged by review-security)
- Very specific: line 122
When all SQL findings are emitted, hand off to orchestrate-code-review for aggregation
- Very specific: line 123
When the user needs broader security analysis (auth, crypto, config), redirect to review-security
- Very specific: line 124
When the user needs a full review (scope + language + cognitive), redirect to orchestrate-code-review
- Distinctive: line 165
Input: Only application code using an ORM.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: Review SQL
Purpose
Review SQL and query-related code for language and query conventions only. Cover injection and parameterization, indexing and execution-plan concerns, transactions and isolation, NULL and unique constraints, dialect portability, large-table and paging patterns, and sensitive columns and permissions. Emit a findings list in the standard format for aggregation. Do not define scope or perform full security/architecture review; injection is in scope here as an SQL-specific concern, but broader security is for review-security.
Core Objective
Primary goal: Produce a SQL-focused findings list covering injection/parameterization, indexing, transactions, NULL/constraints, dialect portability, paging patterns, and sensitive column access for the given code scope.
Success Criteria (ALL must be met):
- ✅ SQL-only scope: Only SQL and query conventions are reviewed; no scope selection, full security, or architecture analysis performed
- ✅ All seven SQL dimensions covered: Injection/parameterization, indexing/execution plan, transactions/isolation, NULL/unique constraints, dialect/portability, large table/paging patterns, and sensitive columns/permissions are assessed where relevant
- ✅ Findings format compliant: Every finding carries every element findings-list §5.1 requires, with category
language-sql - ✅ Critical injection issues flagged: SQL injection patterns (string concatenation, interpolation with user input) are marked as
criticalseverity - ✅ Location-precise references: All findings reference specific file:line or query identifier locations
Acceptance Test: Does the output contain a SQL findings list covering all relevant query dimensions, with injection risks marked critical and specific location references for every finding?
Scope Boundaries
This skill handles:
- SQL injection via string concatenation or interpolation — parameterized queries and prepared statements
- Indexing gaps for WHERE/JOIN/ORDER BY columns
- Transaction boundaries, isolation levels, deadlock risk, long-running transactions
- NULL handling in comparisons/aggregates, unique constraints, NOT NULL correctness
- Database dialect portability (LIMIT/OFFSET/FETCH, date functions, vendor-specific syntax)
- Large table full scans, paging strategies (keyset vs OFFSET)
- Sensitive column exposure in SELECT, least-privilege role usage
This skill does NOT handle:
- Scope selection — scope is provided by the caller
- Broader security analysis (beyond SQL injection) — use
review-security - Architecture analysis — use
review-architecture - Full orchestrated review — use
orchestrate-code-review
Handoff point: When all SQL findings are emitted, hand off to orchestrate-code-review for aggregation. For broader security concerns (auth, crypto, config), redirect to review-security.
Use Cases
- Orchestrated review: Used as the language step when orchestrate-code-review runs for projects that include SQL (.sql files, embedded SQL, or ORM-generated SQL).
- SQL-only review: When the user wants only query correctness, performance, and safety checked.
- Migration or portability: Check dialect-specific constructs and portability across databases.
When to use: When the code under review includes SQL (raw .sql, embedded in code, or ORM-generated). Scope (diff vs paths) is determined by the caller or user.
Behavior
Scope of this skill
- Analyze: SQL and query logic in the given scope (files, snippets, or diff). Accept .sql files, embedded SQL in application code, or ORM-generated SQL when visible.
- Do not: Decide scope (diff vs codebase); do not perform full application security or architecture review. Focus on SQL/query dimension.
Review checklist (SQL dimension only)
- Injection and parameterization: No string concatenation or interpolation for user input in SQL; use parameterized queries or prepared statements; avoid dynamic SQL from untrusted input.
- Indexing and execution plan: Queries that filter or join on unindexed columns; SELECT * on large tables; missing indexes for WHERE/JOIN/ORDER BY.
- Transactions and isolation: Appropriate transaction boundaries; isolation level and locking; avoid long-running transactions; deadlock risk.
- NULL and unique constraints: Handling of NULL in comparisons and aggregates; unique constraints and duplicate handling; NOT NULL where appropriate.
- Dialect and portability: Database-specific syntax (e.g. LIMIT vs OFFSET/FETCH, date functions) and portability if multi-DB support is required.
- Large tables and paging: Full scans on large tables; paging (keyset vs OFFSET) and scalability.
- Sensitive columns and permissions: Sensitive data in SELECT; least-privilege and role usage in SQL (where visible).
Tone and references
- Professional and technical: Reference specific locations (file:line or query identifier). Emit findings carrying every element findings-list §5.1 requires.
Input & Output
Input
- Code scope: Files or snippets containing SQL (e.g. .sql files, code with embedded SQL, or ORM-generated SQL when available). Provided by the user or scope skill.
Output
- Emit zero or more findings in the format defined in specs/findings-list.md, with Category
language-sql. - Category for this skill is language-sql.
Restrictions
Hard Boundaries
- Do not perform scope selection or full security/architecture review. Stay within SQL and query conventions.
- Do not emit a finding without a precise location. When a suggestion is included, it must be actionable; follow the canonical Findings Spec for required elements.
- Do not assume a specific database vendor unless stated; note dialect when relevant.
Skill Boundaries
Do NOT do these (other skills handle them):
- Do NOT select or define the code scope — scope is determined by the caller or
orchestrate-code-review - Do NOT perform broad security analysis beyond SQL injection — use
review-security - Do NOT perform architecture analysis — use
review-architecture - Do NOT review non-SQL code for SQL conventions (SQL injection in application code should be flagged by
review-security)
When to stop and hand off:
- When all SQL findings are emitted, hand off to
orchestrate-code-reviewfor aggregation - When the user needs broader security analysis (auth, crypto, config), redirect to
review-security - When the user needs a full review (scope + language + cognitive), redirect to
orchestrate-code-review
Self-Check
Core Success Criteria
- SQL-only scope: Only SQL and query conventions are reviewed; no scope selection, full security, or architecture analysis performed
- All seven SQL dimensions covered: Injection/parameterization, indexing/execution plan, transactions/isolation, NULL/unique constraints, dialect/portability, large table/paging patterns, and sensitive columns/permissions are assessed where relevant
- Findings format compliant: Every finding carries every element findings-list §5.1 requires, with category
language-sql - Critical injection issues flagged: SQL injection patterns (string concatenation, interpolation with user input) are marked as
criticalseverity - Location-precise references: All findings reference specific file:line or query identifier locations
Process Quality Checks
- Was only the SQL/query dimension reviewed (no scope/architecture beyond query design)?
- Are parameterization, indexing, transactions, NULL/constraints, and portability covered where relevant?
- Does every finding carry every element findings-list §5.1 requires, with category=language-sql?
- Are issues referenced with file:line or query identifier?
Acceptance Test
Does the output contain a SQL findings list covering all relevant query dimensions, with injection risks marked critical and specific location references for every finding?
Examples
Example 1: String concatenation in query
- Input: Query built with string concatenation including user input.
- Expected: Emit a critical finding for SQL injection; suggest parameterized query or prepared statement. Category = language-sql.
Example 2: Large table without paging
- Input: SELECT * FROM large_table ORDER BY id without LIMIT or paging.
- Expected: Emit finding for performance and scalability; suggest paging (e.g. keyset or OFFSET/FETCH) and avoid SELECT * if not needed. Category = language-sql.
Edge case: ORM-generated SQL
- Input: Only application code using an ORM; generated SQL not visible.
- Expected: Review any raw SQL or query builders in the code; if no SQL is visible, state that and skip or report "No SQL to review in scope." Do not invent SQL.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

