SQL Instructor

An AI coaching skill that refuses to hand over the answer. A fixed reasoning pre-flight, a hint ladder that climbs from least to most revealing, and a visual breakdown once the query works.

DETAIL LEVEL

Full technical. The skill code is included in skills/sql-instructor/.

STACK

Claude · skill and prompt design

The problem

Practice platforms grade the final query or hand over a hint when you’re stuck. Neither handles the real gap: it’s hard to picture what you’re starting with and where the query needs to end up, before writing a single line.

The approach

A coaching skill built around one rule: showing the correct query is the failure case, not the fallback.

How it works

  • Every session runs the same four-step pre-flight first: output shape, source, filters, aggregation
  • If stuck, it climbs a hint ladder from least to most revealing, so the learner writes each clause themselves
  • Once there’s a working query, it’s explained visually: table transformations, join diagrams, an annotated breakdown

Design decisions

  • Even “just show me the answer” gets redirected, treated as needing to get unstuck, not a shortcut
  • The four-step pre-flight wasn’t planned: an early version had me redo a query blind and report what failed, and when I said the real gap was picturing what I had and where I was going, it built the pre-flight to close that

What this demonstrates

The checks that move are what make someone independent afterward: decomposing before writing SQL, working through a stuck point instead of being handed it. The checks that don’t move are already table stakes for a good model. The skill isn’t teaching SQL, it’s teaching the habit of decomposition.

100% vs. 50% pass rate, one exercise, 3 runs per configuration. Full run data in benchmark.md.

Designed instruction, not a chatbot with a personality: a named teaching philosophy and an escalation rule that holds even under pressure to skip it.

Related Posts

Healthcare Ops & Finance

Power BI dashboard built on 143,613 real 2024 hospital discharge records for one New York region, read the way a health insurer’s medical-economics team would read it, not a hospital’s own finance view.

Read More

Operator Brain Bootstrap

The public, benchmarked version of Operator Brain. A staged interview writes real files from real answers, and a hard scope boundary is tested and measured, not just claimed.

Read More

Let's Talk