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 agentmods add skills/malloydata/publisher/malloy-debugnpx skills add malloydata/publisher --skill malloy-debuggit 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-debug)<a href="https://agentmods.dev/skills/malloydata/publisher/malloy-debug"><img src="https://agentmods.dev/badge/skills/malloydata/publisher/malloy-debug.svg" alt="Measured on agentmods" height="20"></a>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 | $0.00052 | $0.01507 |
| Opus 5 | $0.00026 | $0.00754 |
| Sonnet 5 | $0.00010 | $0.00301 |
| Haiku 4.5 | $0.00005 | $0.00151 |
Grade A, and why
malloy-debug 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.
How it starts
The opening of the file, as written. The whole thing — 129 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Debugging Malloy 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.
Get Diagnostics
Hosts expose errors differently, so take the best path you actually have:
- An editor-diagnostics tool, if your host offers one - call it on the file and read the errors straight out.
- Otherwise, compile by running. Run any query against the source with your query tool and read the error it returns. Every host that can run Malloy can do this, including chat surfaces with no editor.
Only ask the user to open the file in an editor when you know they have the model open in one. On a hosted chat surface there is no local checkout to open, and the query path above is the one that works.
Strategy
Errors cascade. Later errors may be caused by or hidden behind earlier ones. Fix the FIRST error only, re-check diagnostics, repeat. Do not attempt to fix multiple errors at once.
- Look at FIRST error, ignore all others
- Call
search_malloy_docswith the error message if unsure - Fix that one issue, re-check diagnostics
- Repeat until clean. New errors may appear as earlier ones are resolved
Quick Fixes
| Error | Fix |
|---|---|
| "Unknown field" | Check typo, source order, wrong source, or missing import |
| "Can't use type string" | Cast: field::number |
| "Aggregate not allowed in where" | Use having: instead |
| 20+ random errors | Backtick reserved word (`Date`, `Hour`, `number`) |
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 skill:malloy-gotchas-modeling § Field Management) |
IO Error: No files found that match the pattern "data/x.csv" |
Data-file path, not the model. Relative duckdb.table() paths resolve against the DuckDB workingDirectory; Publisher sets it to the package root, but a relative workingDirectory in malloy-config.json resolves against the process cwd. Make it absolute (see skill:malloy-gotchas-modeling § Relative Data-File Paths). The "not defined" errors under it are cascade, not real |
| Import path errors | Check paths: import "orders.malloy". All files should be in the same directory (flat layout) |
unexpected 'from' |
from() was removed from the language. Use the query directly: source: x is q extend {...}, or source: x is (q -> {...}) extend {...} |
| Query-based source errors | Verify the source query returns the expected columns, check that imported sources are defined |
| "Cannot redefine 'X'" | Field already exists from query-based source (-> { group_by, aggregate }). Remove the dimension, add only NEW derived fields in extend {}. Use include {} to add #(doc) tags to existing fields. |
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.
- today Changed · +1 lines 29c8f1c91488
- 4d ago First seen · 128 lines · 52 tokens per session scan A 7a721125d6f6
malloy-debug is a skill published in the GitHub repository malloydata/publisher (99 stars, last pushed today), licensed MIT. It adds 52 tokens to every session and 1,507 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.
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.
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…
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-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…
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…
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…