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.
npx skills add malloydata/publisher --skill malloy-gotchas-modelinggit clone --depth 1 https://github.com/malloydata/publisherWrote 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.
[](https://agentmods.dev/skills/malloydata/publisher/malloy-gotchas-modeling)<a href="https://agentmods.dev/skills/malloydata/publisher/malloy-gotchas-modeling"><img src="https://agentmods.dev/badge/skills/malloydata/publisher/malloy-gotchas-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.
<a href="https://agentmods.dev/skills/malloydata/publisher/malloy-gotchas-modeling"><img src="https://agentmods.dev/badge/skills/malloydata/publisher/malloy-gotchas-modeling.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00050 | $0.08659 |
| Opus 5.5 | $0.00020 | $0.03464 |
| Sonnet 5.5 | $0.00010 | $0.01732 |
| Haiku 4.5 | $0.00005 | $0.00866 |
Grade A, and why
malloy-gotchas-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 17d 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.
How it starts
The opening of the file, as written. The whole thing — 477 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Modeling Gotchas
Read this before writing Malloy code. These patterns cause most modeling errors.
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.
When a Model Will Not Compile
Get the error. Use an editor-diagnostics tool if your host has one. Otherwise run any query against the source with execute_query and read the error it returns; every host that can run Malloy can do this. Only ask the user to open the file in an editor when you know they have it open there.
Errors cascade. Fix the FIRST error only, recompile, repeat; later errors are often caused by it. If the message is unclear, call search_malloy_docs with the message text.
| Error | Fix |
|---|---|
| "Unknown field" | Check the typo, the source order, the wrong source, or a missing import |
| "Can't use type string" | Cast it: field::number (see String Columns Need Casts) |
Aggregate expressions are not allowed in where:; use having:`` |
Filter a measure with having: |
| 20+ random errors | Backtick a reserved word (`date`, `hour`, `number`); see Reserved Words |
Can't find field 'X' to set access modifier |
An include {} sits before the extend { rename: }. Rename first, then include {} naming the field by its new name (see Field Management) |
IO Error: No files found that match the pattern "data/x.csv" |
A data-file path problem, not the model. See Relative Data-File Paths. The "not defined" errors under it are cascade |
| "Can't find source X", or an import path error | The path is relative to the importing file: import "orders.malloy" from the same folder, import "../orders.malloy" from a subfolder. Subfolders are fine; do not move files to fix an import |
| Circular imports | Source A imports B which imports A. Restructure to break the cycle |
unexpected 'from' |
from() was removed. Write the query directly: source: x is q extend {...}, or source: x is (q -> {...}) extend {...} |
| Query-based source: "Can't find field" | The source query's group_by and aggregate fields must match what extend {} references; check imported sources exist |
| "Cannot redefine 'X'" | See Cannot Redefine Query-Based Source Columns |
sum(items.cost) fails with Join path is required for this calculation |
Over a join_many path write items.cost.sum(). Over a join_one path both compile: sum(o.total) counts each order once per base row, o.total.sum() once per order. Use the second for the joined source's own total |
order_by on a joined path fails |
Alias the field in group_by (yr is races.year) and order by the alias |
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.
- 17d ago Changed f875f08f7515
- 19d ago Changed · +26 lines · -8 tokens per session 7e51a4cf9f64
- 1mo ago Changed · -9 tokens per session 38fefae81e46
- 1mo ago First seen · 451 lines · 67 tokens per session scan A fd61491138ea
malloy-gotchas-modeling is a skill published in the GitHub repository malloydata/publisher (118 stars, last pushed today), licensed MIT. It adds 50 tokens to every session and 8,659 once invoked, about $0.0002 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.
Other skills, from other repositories
reimagine-it-extract
Emit the content signals reimagine-it reads from an HTML file — title, anchors, proper nouns, dates, numbers, emails, links, source hex colors, and the derived palette — as JSON without generating a redesign. Use when the user says /reimagine-it extract, "what does the engine see in this page", "extract the palette"…
TronScan Data Lookup
Query TRON blockchain data via the TronScan API — accounts, transactions, tokens, blocks, contracts, transfers, and chain statistics.
dune-analytics
Blockchain analytics via Dune REST API — execute DuneSQL queries against live on-chain data, discover decoded contract tables, and monitor credit usage. Use when the user asks about on-chain data, wallet activity, DEX trades, token transfers, smart contract events, or says "query Dune", "run a Dune query", or "search…
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…
developing-in-lightdash
Use when reading, creating, and editing Lightdash dashboards and charts as JSON, including dashboard layout and chart-type-specific configuration.
sdk-features
Map Lightdash SDK capabilities to their host-UI names and the app-code wiring each needs. Use when the user asks about a feature by name (Inspect data, drill-down, exports, shareable URLs), when offering newly available features after a template upgrade, or when wiring a host-facing capability into the app.