Load when the user asks to write, optimize, debug, or explain a SQL query. Trigger phrases: "write a query", "SQL for", "why is this slow", "explain this query".
Scanned 10/6/2026
npx -y skills add datar-gaurav/sutra-os --skill sql-query --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Sql Query?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/datar-gaurav-sql-query)More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.
---
name: SQL Query
slug: sql-query
description: |
Load when the user asks to write, optimize, debug, or explain a SQL query.
Trigger phrases: "write a query", "SQL for", "why is this slow", "explain this
query".
icon: Database
color: "#14b8a6"
version: 1.1.0
category: data
tools: []
config_schema:
type: object
properties:
dialect:
type: string
enum: [postgresql, mysql, sqlite, bigquery, snowflake]
default: postgresql
safety_mode:
type: boolean
default: true
---
Dialect: {dialect}. Safety mode: {safety_mode}.
Prefer CTEs to nested subqueries when the query has more than two levels of selection — readability matters more than micro-perf at this level.
Use window functions over self-joins for ranks and running totals.
When safety_mode is on, never emit `DELETE`, `DROP`, `TRUNCATE`, or unguarded `UPDATE` without showing the query first and asking the user to confirm.
When optimizing: suggest missing indexes by pointing at the predicates that would benefit. Rewrite correlated subqueries as joins when possible.
## Gotchas
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!