Metrics & MeasurementSQL From Spec

Write the query so the next engineer doesn't have to reverse it

Built for when requirements and a data-tables overview need turning into an optimized, readable SQL query with inline explanation of every major part.

Runs inside AI PM OS (Claude Code, Cowork, Cursor, Codex)
Category
Metrics & Measurement
Skill file
39 lines
Included in
AI PM OS ($99)

When to use SQL From Spec

  1. 01When a Metrics & Measurement task needs repeatable structure instead of an ad-hoc chat prompt.
  2. 02When you want guided output covering Step 1: Take the requirements and table overview and Step 2: Write the query.

Example prompt

/pm-os:sql-from-spec Apply this to the active product brief in this workspace.

Inside the skill file (preview)

A plain-English preview of how SQL From Spec opens. The full 39 lines instruction sequence, rubrics, and guardrails ship inside AI PM OS.

skills/sql-from-spec/SKILL.mdOpening preview

Step 1: Take the requirements and table overview

Get the query requirements and the overview of the data tables involved.

Done when both the requirements and the table overview are in hand.

Step 2: Write the query

Write the SQL: correct joins and conditions across tables, the specified filters, and any needed aggregations or subqueries.

Done when the query fulfills every stated requirement, with no unaddressed filter or aggregation.

Step 3: Optimize it

Select only needed columns (no wildcard), use the correct JOIN type for each relationship, and consider indexes on frequently filtered columns.

Done when the query avoids unnecessary column selection and every JOIN type matches the actual data relationship.

Full 39 lines skill file ships inside AI PM OS

Not ready for $99 yet?

Test 3 free Claude Code PM plugins first

I'll email the free plugin library link so you can try my PM craft skills on your computer before deciding.

Sent straight to your inbox. No newsletter signup.

When to reach for a sibling skill instead

View category →

$99 one-time · 30-day refund

One of 231 skills in AI PM OS

Get AI PM OS