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.
- Category
- Metrics & Measurement
- Skill file
- 39 lines
- Included in
- AI PM OS ($99)
When to use SQL From Spec
- 01When a Metrics & Measurement task needs repeatable structure instead of an ad-hoc chat prompt.
- 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.
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.
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.