| name | ebuilder-sql-query-foundation |
| description | Foundation playbook for query-* definitions in configs/sql.*.yml. USE FOR: query naming, root structure, generation order, responseType selection, and minimal read-only query scaffolding. DO NOT USE FOR: deep input validation, pre/post pipeline internals, or advanced output shaping. |
eBuilder Query Foundation
Purpose
Use this skill to scaffold and review the core shape of query-* definitions in configs/sql.*.yml.
Scope
- Root key must be
query.
- Query names must match
query-[a-zA-Z0-9-]+.
- Queries are read-only and side-effect free.
- A query has one primary
command (or returns last pre result when command is omitted).
Core Build Order
- Define query key (
query-...).
- Add
datasource and authorize (if needed).
- Add
inputParams schema.
- Set
responseType.
- Add
command.
- Add optional
pre / post / shaping / error properties.
Required Decisions
- Response cardinality:
list, single, singleOrNull, first, firstOrNull.
- Data visibility: whether
hideProps is needed.
- Security level: policy, role-based, or path-based authorization.
Minimal Blueprint
query:
query-item-by-id:
datasource: main
inputParams:
itemId:
type: int
rules:
- required: true
responseType: singleOrNull
command: |
SELECT id_item AS "itemId", title AS "title"
FROM ec_item
WHERE id_item = ${itemId}
Deterministic Checks
- Query name matches
^query-[a-zA-Z0-9-]+$.
responseType is one of the five allowed values.
- SQL input values use parameter binding (
${...}).
- Query behavior is read-only.
- No mutation-only constructs are used.