Skip to content
Back to templates

text-to-sql-query-builder

@randalolson/text-to-sql-query-builder
Checks
Safety
Automated checks did not flag this template at publish. This describes how the skill is written, not the outputs it produces, and is not a guarantee of fitness.
Runnable
Has clear, ordered instructions and a defined input and output contract an agent can follow. This describes how the skill is written, not the outputs it produces, and is not a guarantee of fitness.
Well-formed
Says what a correct output looks like, checks the output against it with a specific verifier, and is discoverable and coherent. This describes how the skill is written, not the outputs it produces, and is not a guarantee of fitness.

Use when the user asks a natural-language data question against a database in the current directory and wants a reviewable SQL query back. The agent discovers the schema and SQL dialect from the surrounding context (env vars, migration files, ORM models) before asking the user, drafts the query alongside a written rationale, and checks that the SQL parses in the right dialect, hits real columns, and stays read-only unless the user explicitly asked for a write.

Outcome

Cut the time to answer a data question by letting people self-serve read-only SQL verified against the real schema instead of waiting on an analyst, with accidental writes to the database held at zero.

Use this template

Your agent fetches this runbook and runs it, revising the output until the verifiers pass.

First time with Goodeye?

Connect your agent over MCP, then ask it to fetch this template by its identifier. Or install the CLI and run the command below.

Connect your agent (Claude Code)
claude mcp add --transport http goodeye https://mcp.goodeye.dev/mcp
Or install the CLI
uv tool install goodeye

Connecting over MCP prompts a quick sign-in. The CLI can fetch and run a public template with no account.

Set up another clientFull quickstart

Fetch or fork

Fetch with CLI
goodeye templates get @randalolson/text-to-sql-query-builder
Fork with CLI
goodeye templates fork @randalolson/text-to-sql-query-builder

Also available from

MCP
get_template(identifier="@randalolson/text-to-sql-query-builder")
REST
curl https://api.goodeye.dev/v1/templates/@randalolson/text-to-sql-query-builder