malloy-analysis

Guides structured data analysis against Malloy semantic models over MCP tools.

Updated Jun 3, 2026
One-click install
npx skills add https://github.com/credibledata/credible-plugin --skill malloy-analysis-credibledata
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: malloy-analysis
Source: https://github.com/credibledata/credible-plugin/tree/main/codex/skills/malloy-analysis
Command: npx skills add https://github.com/credibledata/credible-plugin --skill malloy-analysis-credibledata

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Answering data questions against Malloy semantic models without direct database access is error-prone: guessed field names, fan-out double-counting, broken filters, and unverified results produce plausible but wrong answers. This Skill enforces a disciplined analyst workflow so every answer is grounded in the actual model and verified before it is presented. ## Core Features & Use Cases - Structured discovery: Uses get_context to confirm entities, read source-level and field-level docstrings for grain, units, and null handling, and never guesses names. - Query construction and execution: Builds Malloy queries with execute_query, avoiding common compile errors like count(distinct), semicolon separators, and invalid join paths. - Verification before delivery: Cross-checks results with independent recounts, denominator checks, fan-out probes, and date-range grounding before presenting. - Use Case: Ask "how many active subscribers did we have last month?" and the Skill discovers the right measure and dimensions, runs a validated Malloy query, verifies the count independently, and presents the answer with stated assumptions. ## Quick Start Ask a natural-language data question about a published Credible workspace, such as "break down revenue by region for Q1", and let the Skill discover the model, run, and verify the query.

Frequently Asked Questions about malloy-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I answer data questions with Malloy semantic models?

Follow a six-step workflow: restate the question, discover entities with get_context, construct a Malloy query, run it with execute_query, verify the result with independent cross-checks, then present the answer with stated assumptions.

How do I find the right fields in a Malloy model?

Call get_context with entity targets describing the measure, dimensions, and filters the question needs, then read the source-level and field-level docstrings for grain, units, and null handling. Never use a field name that has not been confirmed by a get_context result or a query that runs.

Why does my Malloy query fail to compile?

The most common causes are using count(distinct field), which is a parse error since count(field) is already distinct, separating fields with semicolons instead of commas or newlines, and referencing join paths the source does not declare.

How do I verify a Malloy query result is correct?

Ground the result by querying the date range and row counts, then run independent cross-checks: compare count() to count(key) for fan-out, recount the top result in isolation, verify percentage denominators, and confirm category parts sum to the whole.

Can I define calculated fields not in the Malloy model?

Yes, but announce the ad-hoc field to the user, validate the underlying field types and sample values, test it in isolation before folding it into the main query, and explain which definition approach you chose when alternatives exist.