malloy-patterns
Skill116 starsChanged 2 months agoMITView on GitHub
An index of what search_malloy_docs covers - language reference, common patterns (YoY, cohorts, percent of total), rendering - for picking a topic worth searching before querying the docs.
In this repository45 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- fix-scan-findingSkill
- publisher-releaseSkill
- eval-answerSkill
- eval-diagnoseSkill
- eval-importSkill
- eval-improveSkill
- eval-judgeSkill
- eval-loopSkill
- eval-reportSkill
- malloy-analysis-pitfallsSkill
- malloy-analysis-reportSkill
- malloy-analysisSkill
- malloy-analyzeSkill
- malloy-chartsSkill
- malloy-dashboardsSkill
- malloy-data-app-designSkill
- malloy-debugSkill
- malloy-defineSkill
- malloy-discoverSkill
- malloy-documentSkill
- malloy-getting-startedSkill
- malloy-gotchas-modelingSkill
- malloy-gotchas-queriesSkill
- malloy-gotchas-renderingSkill
- malloy-html-data-app-embeddingSkill
- malloy-html-data-app-runtimeSkill
- malloy-html-data-appsSkill
- malloy-lookml-reviewSkill
- malloy-materializationSkill
- malloy-materialization-tuningSkill
- malloy-model-as-you-goSkill
- malloy-modelingSkill
- malloy-modelSkill
- malloy-notebook-chatSkill
- malloy-notebooksSkill
- malloy-phrase-detectionSkill
- malloy-powerbi-reviewSkill
- malloy-publishSkill
- malloy-queriesSkill
- malloy-reviewSkill
- malloy-scopeSkill
- malloySkill
- malloy-source-unreachableSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Call search_malloy_docs with these topics.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!--
Copyright (c) Credible Data Inc.
SPDX-License-Identifier: MIT
-->Malloy Documentation Topics
Call search_malloy_docs with these topics.
Tool names are written bare here -
get_context,execute_query,search_malloy_docs. The exact prefixed name depends on the host surface; match each against the tools you actually have.
Language Reference
| Topic | Search for... |
| Models | "models" or "statement" |
| Sources | "sources" or "source definition" |
| Queries | "queries" |
| Views | "views" |
| Data Types | "data types" |
| Fields | "fields" |
| Aggregates | "aggregates" |
| Expressions | "expressions" |
| Functions | "functions" |
| Filters | "filters" or "where" |
| Calculations (window functions) | "calculations" or "window functions" |
| Ordering and Limiting | "order_by" or "limit" |
| Joins | "joins" or "join_one" or "join_many" |
| Nested Views | "nesting" or "nest" |
| SQL Sources | "sql sources" |
| Imports | "imports" |
| Connections | "connections" |
| Tags | "tags" or "#(doc)" |
Common Patterns
| Pattern | Search for... |
| Comparing Timeframes (YoY) | "comparing timeframes" or "year over year" |
| Foreign Sums and Averages | "foreign sums" |
| Reading Nested Data | "reading nested" |
| Percent of Total | "percent of total" |
| Cohort Analysis | "cohort analysis" |
| Nested Subtotals | "nested subtotals" |
| Bucketing with 'Other' | "bucketing other" |
Histograms (bin by arithmetic; there is no autobin) | "histogram" |
| Moving Average | "moving average" |
| Transform Data | "transform" |
| Sessionize - Map/Reduce | "sessionize" |
| Dimensional Indexes | "dimensional indexes" |
Rendering & Visualization
| Topic | Search for... |
| Overview | "rendering" |
| Number/Currency Scaling | "number formatting" or "currency formatting" |
| Big Value / KPI Cards | "big_value" or "big value" |
| Bar Charts | "bar charts" or "# bar_chart" |
| Line Charts | "line charts" or "# line_chart" |
| Scatter Charts | "scatter charts" |
| Dashboards | "dashboards" |
| Transposed Tables | "transpose" |
| Pivoted Tables | "pivots" |
| Shape Maps | "shape maps" |
Database Dialects
These search terms find docs on dialect-specific SQL functions available inside expressions. Malloy models themselves are dialect-portable - the connection supplies the dialect, so you don't write "BigQuery-specific" (or any vendor-specific) Malloy.
| Dialect | Search for... |
| BigQuery | "bigquery" |
| DuckDB | "duckdb" |
| PostgreSQL | "postgres" |
| Snowflake | "snowflake" |
| Presto/Trino | "presto" or "trino" |
| MySQL | "mysql" |
Experimental Features
| Feature | Search for... |
| Join INNER/RIGHT/FULL | "inner join" or "full join" |
| SQL Expressions | "sql expressions" or "sql_number" |
| Window Partitions | "window partitions" |
| Parameters | "parameters" |
| Composite "Cube" Sources | "composite sources" |
| Access Modifiers | "access modifiers" or "public" or "private" |
Multi-File & Computed Sources
| Topic | Search for... |
| Imports | "imports" |
| Computed sources (from queries) | "from" or "sql sources" |
| Access Modifiers (include/public/private) | "access modifiers" or "public" or "private" |
Other Topics
| Topic | Search for... |
| Notebooks | "notebooks" |
| MalloySQL | "malloysql" |
| Python Package | "python" |
| Jupyter | "jupyter" |
| Publishing | "publishing" |
| REST API | "rest api" |
| MCP for AI Agents | "mcp agents" |
| Troubleshooting | "troubleshooting" |
Example
Call: search_malloy_docs
Parameters: { question: "How do I use window functions in Malloy?" }Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

