Skip to content
Back to skills

Sql Query

ASecurity

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".

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 6, 2026
ai-agentsgosqldatabase

Security analysis

A100/100

Scanned October 6, 2026

npx -y skills add datar-gaurav/sutra-os --skill sql-query --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Sql Query?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Sql Query
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/datar-gaurav-sql-query/badge)](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.

Download with Pro
SKILL.md
---
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

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…