query-budget-enforcer
Installation
SKILL.md
Query Budget Enforcer Protocol
This skill acts as the financial and operational conscience of the database. It reviews queries not just for speed, but for computational cost, lock duration, and hardware limits.
Core assumption: In cloud data warehouses (Snowflake, BigQuery), bad queries cost actual money. In OLTP (PostgreSQL), bad queries crash the server.
0. Context Intake
Before designing, make sure you have the inputs below. Read the previous workflow step's artifact first if it exists. Ask only for what is missing, in a single message, and state any assumption you make instead of blocking.
- Engine (PostgreSQL, MySQL, BigQuery, Snowflake) and where queries originate (ORM, BI tool, jobs).
- Current pain: cost spikes, timeouts, lock contention, N+1 patterns.
- Budgets already agreed, if any (max rows, timeouts, cost per query).