← ClaudeAtlas

combined-readonly-sqllisted

Write, troubleshoot, and verify bounded read-only DuckDB SQL through Combined's MCP query_sql tool. Use for granted-dataset joins, aggregates, filters, pagination, truncation, or query-policy errors.
sqrr-ai/combined-agent-kit · ★ 0 · AI & Automation · score 72
Install: claude install-skill sqrr-ai/combined-agent-kit
# Read-only SQL through Combined Write the smallest query that answers the user's question over the current grant. This skill concerns Combined's MCP query surface, whose output limits are stricter than the general SQL API. ## Resolve the schema Use `list_sources`, `list_datasets`, and `describe_dataset` when the current logical schema is not already known. A relation has three parts: ```text "source_alias"."logical_schema"."logical_table" ``` Copy identifiers from trusted catalog metadata and quote them correctly. Provider object names, UI labels, storage paths, and synthetic tutorial table names are not interchangeable with these relations. Values can be bound parameters; identifiers cannot. ## Construct the query `query_sql` accepts one `SELECT` or common-table-expression sequence ending in `SELECT`. Joins, aggregates, ordering, window functions, and bounded subqueries work within resolved granted relations. - Bind user-provided filter values with `?` placeholders and a matching `parameters` array. Send timestamps with an explicit timezone offset. - Select only the required columns and use an explicit `LIMIT` for returned detail. - Aggregate over eligible data before applying a display limit. Do not calculate totals from a truncated sample. - Establish the join grain and key. Aggregate independent one-to-many tables before joining when a raw join would multiply measures. - Preserve `NULL` semantics. Use `IS NULL`; do not automatically turn an unknown amount into ze