malloy-patterns

malloy-patterns is a skill for Claude Code, Codex from malloydata/publisher. It costs 64 tokens per session (1,081 once invoked), scanned A, original, MIT.

A topic index for Malloy, a language for defining data models and queries. It points to documentation about syntax, joins, filters, calculations, charts, and common analysis patterns such as comparing years or customer groups over time.

In plain words
What is it for?
Use it to look up how to write models, queries, fields, aggregates, joins, filters, functions, and recurring analysis patterns.
Why use it?
It makes it quicker to find the right Malloy documentation when you know the subject but not the exact page or search terms.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/malloydata/publisher/malloy-patterns
Any agent
npx skills add malloydata/publisher --skill malloy-patterns
Clone the repo
git clone --depth 1 https://github.com/malloydata/publisher

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for malloy-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/malloydata/publisher/malloy-patterns.svg)](https://agentmods.dev/skills/malloydata/publisher/malloy-patterns)
Your own site
<a href="https://agentmods.dev/skills/malloydata/publisher/malloy-patterns"><img src="https://agentmods.dev/badge/skills/malloydata/publisher/malloy-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,081 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00064 $0.01081
Opus 5 $0.00032 $0.00541
Sonnet 5 $0.00013 $0.00216
Haiku 4.5 $0.00006 $0.00108

Measured 6d ago against content hash 52c872cc8e7f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

malloy-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/malloy-patterns/SKILL.md · 122 lines

How it starts

The opening of the file, as written. The whole thing — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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"

Read the full file on GitHub · 122 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 122 lines · 64 tokens per session scan A 52c872cc8e7f

Subscribe to this mod's changes

malloy-patterns is a skill published in the GitHub repository malloydata/publisher (99 stars, last pushed today), licensed MIT. It adds 64 tokens to every session and 1,081 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

frontend-style-guide

Apply the Lightdash frontend style guide and design principles when working on React components or styling frontend code. Use when editing TSX files, building or reviewing UI, fixing styling issues, or when the user mentions Mantine, design, styling, or CSS modules.

lightdash/lightdash · 56 tokens

reusable-visualization

Build ONE reusable chart visualization component that receives its data and its settings from the host application instead of fetching them, and declares the fields and config options the host exposes to viewers. Use this whenever a single chart component is reused across many different queries rather than built for…

lightdash/lightdash · 102 tokens

debug-local

Debug the Lightdash app using PM2 logs, Maple traces, and browser automation. Use when investigating issues, tracking down bugs, understanding request flow, or correlating frontend actions with backend behavior.

lightdash/lightdash · 42 tokens

lightdash-agent-slack-messaging

Use this skill when writing, designing, or generating Slack messages for Lightdash's in-app analytics agent. Triggers when someone asks to create agent update messages, Slack digests, agent notifications, weekly summaries, daily summaries, or any Slack copy for the Lightdash project agent. Also use when asked to vary…

lightdash/lightdash · 114 tokens

upgrade-preflight

Checks whether a self-hosted Lightdash upgrade is safe to run, and reads the tooling's answer without over-reading it. Use when upgrading a self-hosted instance, planning a maintenance window, answering "is this upgrade safe", or recovering a failed, hung, parked or lock-stuck migration — covers lightdash…

lightdash/lightdash · 101 tokens

breakup-pr

Break up a large PR into vertical feature slices delivered incrementally via Graphite stacked PRs. All verticals share a single feature flag so the entire feature ships atomically. Use when: splitting a large PR, breaking up a diff, vertical slicing, incremental delivery, phased rollout, or when a PR is too large to…

lightdash/lightdash · 72 tokens