malloy-document

malloy-document is a skill for Claude Code, Codex from malloydata/publisher. It costs 94 tokens per session (2,447 once invoked), scanned A, original, MIT.

A guide for adding plain-language documentation to Malloy models using documentation tags.

In plain words
What is it for?
Use it to describe Malloy sources, dimensions, measures, views, and joins, including reusable filters where supported.
Why use it?
It makes sources and fields easier for people and search tools to understand and find.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/malloydata/publisher/malloy-document.svg)](https://agentmods.dev/skills/malloydata/publisher/malloy-document)
Your own site
<a href="https://agentmods.dev/skills/malloydata/publisher/malloy-document"><img src="https://agentmods.dev/badge/skills/malloydata/publisher/malloy-document.svg" alt="Measured on agentmods" height="20"></a>
Per session 94 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,447 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 $0.00094 $0.02447
Opus 5 $0.00047 $0.01223
Sonnet 5 $0.00019 $0.00489
Haiku 4.5 $0.00009 $0.00245

Measured 5d ago against content hash 2279369d365b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

malloy-document 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 5d 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-document/SKILL.md · 191 lines

How it starts

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

Documenting a Malloy Model

Add #(doc) tags to describe sources and fields in plain language so they are easy to find and understand:

Tag Purpose Goes on
#(doc) Plain-language description for natural-language search source, dimension, measure, view, join
#(filter) Deprecated, prefer given:. Parameterizable filter (runtime/modeling concern, see malloy-model) source

#(doc) is a standard Malloy annotation. It documents a field or source with a human-readable description that downstream tools can surface and search against.

#(doc) Tag

Add before any source, dimension, measure, view, or join. When multiple fields share a keyword, use it once as a block header. Tags and field names are indented under the keyword; tags go on the line(s) directly above the field they annotate.

Tag ordering (when a field has multiple tags): #(doc) → render tags (# currency, # label, etc.) → field name. Separate each field group with a blank line:

#(doc) Customer who placed the order
join_one: users with user_id

dimension:
  #(doc) Date the order was placed (UTC)
  order_date is created_at::date

measure:
  #(doc) Total revenue from all orders in USD
  # currency
  revenue is sum(total)

Writing Doc Strings for Retrieval

Doc strings power natural-language search: users type plain-English questions and the system matches against your #(doc) strings. Write descriptions that match how analysts would search:

  • Include business meaning, not code mechanics: what it represents, not how it's implemented
  • Include units (USD, count, percentage): a unit is part of what a number means. For counts, name the unit being counted and say whether it counts distinct entities or events: "total students enrolled" on a subject×term-grain measure counts enrolments, not students, and a student taking four subjects counts four times. If the model cannot answer the distinct-entity version, say so in the doc.
  • List a categorical field's values only while the list stays short (roughly ten or fewer). A handful of values makes a description concrete; past that, say what the field captures instead, because the dump crowds out the meaning and goes stale the moment someone adds a value. Treat ten as a rule of thumb, not a hard cap.
  • Avoid Malloy jargon: never use "filterable", "groupable", "dimension", "measure", "aggregation"

Read the full file on GitHub · 191 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. 5d ago First seen · 191 lines · 94 tokens per session scan A 2279369d365b

Subscribe to this mod's changes

malloy-document is a skill published in the GitHub repository malloydata/publisher (99 stars, last pushed today), licensed MIT. It adds 94 tokens to every session and 2,447 once invoked, about $0.0005 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

docetl

Build and run LLM-powered data processing pipelines with DocETL. Use when users say "docetl", want to analyze unstructured data, process documents, extract information, or run ETL tasks on text. Helps with data collection, pipeline creation, execution, and optimization.

ucbepic/docetl · 59 tokens

effective-dbt-sql

Use when writing or modifying dbt model SQL — deciding whether to add a subquery or reuse an existing dimension/metric, structuring a query, joining models, or refactoring a metric's SQL. Encodes SQL semantic-correctness rules: reuse existing fields, prefer CTEs over correlated subqueries, and make joins and column…

lightdash/lightdash · 0 tokens

agenthub

Browse, create, and complete tasks on Clawsy AgentHub — a distributed task platform for AI agents. Create tasks from GitHub repos, PDF/DOCX/PPTX/audio URLs, or plain text. Use custom LLM validation, earn karma. Categories: content, data, research, creative.

citedy/adclaw · 65 tokens

data-transformer

Use for deterministic inspection, reshaping, conversion, validation, or comparison of JSON, JSONL, CSV, TSV, YAML, and Parquet; for adapting one tool's structured output to another tool's input; or when a large payload should be summarized and transformed without model-generated data rewriting.

tetracoralla/BatchTicket · 63 tokens

alibabacloud-data-agent-mcp-skill

Alibaba Cloud Data Agent MCP skill (alibabacloud-data-agent-mcp-skill, data-agent MCP) for enterprise database/file analysis. Use when the user asks (in any language, including Chinese) to query/analyze DMS-managed databases, run SQL/data analysis, start quick-query (lite) or deep-analysis (pro/ultra) sessions…

aliyun/data-agent-skill · 199 tokens

csvglow

Generate beautiful interactive HTML dashboards from CSV/Excel files with smart insights, auto-detected charts, correlations, and statistics.

Ratnaditya-J/csvglow · 28 tokens