What problem does it solve? Writing Malloy queries against semantic models is error-prone: reserved keywords break aliases, aggregates get mixed with dimensions, date comparisons fail, and chart annotations end up in the wrong place. This Skill gives Claude a complete reference of correct Malloy patterns and known error fixes so queries compile and return correct results on the first attempt. ## Core Features & Use Cases - Query Pattern Library: Ready-to-use templates for aggregations, group-bys, time trends, filtered queries, percent-of-total with all(), conditional dimensions with pick, and window functions with calculate:. - Syntax Rules: Authoritative guidance on join paths via dot notation, @ date literals, where: vs having:, regex string matching with ~, order_by: constraints, and reserved-word pitfalls. - Error Diagnosis Table: Maps common Malloy error messages (e.g., "Cannot compare a timestamp to a number", "field is a bar chart, but is not a repeated record") to their causes and fixes. - Use Case: When asked to "break down revenue by region for Q1", Claude grounds itself with get_context, composes a valid Malloy query using these patterns, runs it via execute_query, and fixes any compilation errors using the diagnosis table. ## Quick Start Ask Claude to write and run a Malloy query such as "show monthly revenue for the last year as a line chart" and it will apply these patterns automatically.