Skip to content
Back to skills

Sql From Question

ASecurity

Turns a plain-language question into a SQL query that fits your real schema, explains each part and runs only read-only statements.

  • 3 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 15, 2026
ai-agentssqldatabase

Security analysis

A100/100

Scanned November 15, 2026

npx -y skills add workspace-templates/ai-agent-templates --skill sql-from-question --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Sql From Question?

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

Security grade badge for Sql From Question
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/workspace-templates-sql-from-question/badge)](https://www.skillsdirectory.com/skills/workspace-templates-sql-from-question)

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-from-question
description: Turns a plain-language question into a SQL query that fits your real schema, explains each part and runs only read-only statements.
argument-hint: "[your question in plain words]"
user-invocable: true
disable-model-invocation: true
---

Write SQL that answers this question: $ARGUMENTS

1. Find the schema before writing anything: migrations, `schema.sql`, ORM models or Prisma/Drizzle files. If a database connection is documented, use `\d` or `information_schema` to confirm. Note the SQL dialect.
2. Restate the question in one sentence and list the tables and columns you will use, with the join keys. If the question is ambiguous (which date, which status counts as paid), list the choices and pick the likeliest, saying so.
3. Write the query with explicit joins, readable aliases, and filters that handle nulls and time zones. Use CTEs for steps.
4. Explain each clause in one line each.
5. Warn about cost: missing indexes on filtered columns, huge tables, no LIMIT.

Only SELECT or EXPLAIN may be run, never INSERT, UPDATE, DELETE or DDL. Show the query and ask: "Run it read-only?" If yes, run it with a row limit and interpret the result in plain words.

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.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.