agentleFS
malloydatamalloydata/publisher/skills/malloy-patterns/SKILL.md

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.

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
  1. Very specific:

    Call search_malloy_docs with these topics.

    line 12

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md
<!-- 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

TopicSearch 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

PatternSearch 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

TopicSearch 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.

DialectSearch for...
BigQuery"bigquery"
DuckDB"duckdb"
PostgreSQL"postgres"
Snowflake"snowflake"
Presto/Trino"presto" or "trino"
MySQL"mysql"

Experimental Features

FeatureSearch 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

TopicSearch for...
Imports"imports"
Computed sources (from queries)"from" or "sql sources"
Access Modifiers (include/public/private)"access modifiers" or "public" or "private"

Other Topics

TopicSearch 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?" }

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.