malloy-modeling

malloy-modeling is a skill for Claude Code, Codex from malloydata/publisher. It costs 33 tokens per session (4,704 once invoked), scanned A, original, MIT.

A guide for building Malloy semantic models, which describe the meaning and structure of data for the Malloy Publisher.

In plain words
What is it for?
Use it when modeling a database or package in Malloy, including finding schemas, tables, columns, sources, and documented query patterns.
Why use it?
It helps prevent incorrect table or field guesses and directs the agent to inspect available data and documentation before writing Malloy code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when modeling a database or package in Malloy, including finding schemas, tables, columns, sources, and documented query patterns.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/malloydata/publisher/malloy-modeling
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.

Any agent
npx skills add malloydata/publisher --skill malloy-modeling
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-modeling

README.md
[![agentmods](https://agentmods.dev/badge/skills/malloydata/publisher/malloy-modeling/github.svg)](https://agentmods.dev/skills/malloydata/publisher/malloy-modeling)
Your own site
<a href="https://agentmods.dev/skills/malloydata/publisher/malloy-modeling"><img src="https://agentmods.dev/badge/skills/malloydata/publisher/malloy-modeling/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for malloy-modeling

Your own site · 80×15
<a href="https://agentmods.dev/skills/malloydata/publisher/malloy-modeling"><img src="https://agentmods.dev/badge/skills/malloydata/publisher/malloy-modeling.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,704 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00033 $0.04704
Opus 5.5 $0.00013 $0.01882
Sonnet 5.5 $0.00007 $0.00941
Haiku 4.5 $0.00003 $0.00470

Measured today against content hash 05f1e426a066, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

malloy-modeling 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 today.

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-modeling/SKILL.md · 223 lines

How it starts

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

STOP - READ BEFORE WRITING ANY MALLOY CODE

AI AGENTS: You MUST review this file before writing Malloy code. Cross-skill references below use logical skill: names; load the referenced skill before acting. Before writing code, also read the gotcha skills: skill:malloy-gotchas-modeling, skill:malloy-queries, and skill:malloy-charts.

Pre-Flight Checklist

  1. Discover first: ground yourself before writing ANY code, with the tool that matches what you are modelling.
    • Modelling data already in a package: get_context returns that package's sources, views, and fields (with their docs).
    • Modelling a database with no package yet: get_context has nothing to return, so use search_database_schema instead. It walks the connection's schemas and tables, ranks them against a plain-English description, and gives you each table's columns plus the source: line to start from. Take those names verbatim into step 5. Never guess field names either way.
  2. Search docs proactively: call search_malloy_docs BEFORE writing unfamiliar patterns (window functions, query-based sources, pipelines). Don't guess. Malloy syntax is specific and SQL intuition is often wrong.
  3. Search by topic name. search_malloy_docs takes plain topics such as "window functions", "comparing timeframes", "cohort analysis", "percent of total", "histogram", "nesting", "rendering".
  4. Check diagnostics after writing: fix the FIRST error first, errors cascade.
  5. Read the gotcha skills: skill:malloy-gotchas-modeling, skill:malloy-queries, and skill:malloy-charts prevent the most common mistakes.

Quick syntax reminders:

  1. Backtick reserved words: `Date`, `Hour`, `Timestamp`, `Type`, `number`, `source`
  2. Use having: for aggregate filters: not where: on measures
  3. Alias joined fields in group_by if using them in order_by
  4. count() counts rows; count(x) counts distinct values of x: count(distinct x) is deprecated, write count(x)
  5. One tag per line: # label="Revenue" and # currency on separate lines
  6. No fixed scale on measures: use # currency not # currency=usd0m
  7. Cast strings for aggregates: avg(score::number) not avg(score)
  8. Boolean columns: use = true not = 'true' (no quotes!)
  9. Read data files in place: .csv, .parquet, .json, .ndjson, and .xlsx all work as-is through duckdb.table('data/file.ext'). Never convert a file to another format first, and never read one with python or jq to "have a look" first: query it. For .xlsx, check the row count before trusting it: a workbook with a title row or a blank spacer reads short and reports no error. (Per-format quirks: skill:malloy-gotchas-modeling)

Read the full file on GitHub · 223 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. today Changed · +3 lines 05f1e426a066
  2. 3d ago Changed aa7412d80746
  3. 15d ago Changed · +2 lines 6fa204eeb078
  4. 24d ago Changed e1dc65861b40
  5. 1mo ago Changed 0629b0490906
  6. 1mo ago Changed 01cebf943ae9
  7. 2mo ago Changed 86aefd662c6e
  8. 2mo ago Changed 36f51160ca2a
  9. 2mo ago Changed 2f426b89b127
  10. 2mo ago First seen · 218 lines · 33 tokens per session scan A e44a78a2707a

Subscribe to this mod's changes

malloy-modeling is a skill published in the GitHub repository malloydata/publisher (136 stars, last pushed today), licensed MIT. It adds 33 tokens to every session and 4,704 once invoked, about $0.0001 per session on Opus 5.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

malloy-modeling compared with skills from other repositories

malloy-modeling next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
malloy-modelingmalloydata/publisherSkill136todayMITA33Claude Code, Codex
reimagine-it-extractKayforkind/reimagine-itSkill2182d agoMITA133Claude Code
chart-builderNickCrew/Claude-CortexSkill759d agoMITA76Claude Code, Codex
dashboard-designerNickCrew/Claude-CortexSkill759d agoMITA95Claude Code, Codex
reusable-visualizationlightdash/lightdashSkill6.3ktodaynoneA102Claude Code
developing-in-lightdashlightdash/lightdashSkill6.3ktodaynoneA31Claude Code, Codex
sdk-featureslightdash/lightdashSkill6.3ktodaynoneA67Claude Code