malloy-document

malloy-document is a skill for Claude Code, Codex from malloydata/publisher. It costs 100 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

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

Good fit Use it to describe Malloy sources, dimensions, measures, views, and joins, including reusable filters where supported.

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/malloydata/publisher/malloy-document"><img src="https://agentmods.dev/badge/skills/malloydata/publisher/malloy-document.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 100 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. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Anti-Refusal · line 76
    Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.
    Fix: Remove instructions that suppress warnings, disclaimers, or ethical commentary. Let the agent surface safety-relevant caveats to the user.
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.00100 $0.02447
Opus 5.5 $0.00040 $0.00979
Sonnet 5.5 $0.00020 $0.00489
Haiku 4.5 $0.00010 $0.00245

Measured 15d ago against content hash 30f045415cd0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 15d 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. Never add one; declare a given: instead (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. 15d ago Changed 30f045415cd0
  2. 21d ago Changed · +6 tokens per session ec6bde243dae
  3. 1mo ago Changed 487400851234
  4. 1mo 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 (118 stars, last pushed today), licensed MIT. It adds 100 tokens to every session and 2,447 once invoked, about $0.0004 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

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

repository-writeback

Use when changing the dbt project through a pull request (editDbtProject) or managing those pull requests, offering to fix or extend the semantic layer, or following up a merged pull request.

lightdash/lightdash · 44 tokens

mcp-artifact-integration

Integrate Lightdash MCP query results into Claude-created HTML or React artifacts. Covers host bridges, response envelopes, polling, errors, CSV fallback and chart data. Not needed for ordinary chat or Lightdash's built-in chart app.

lightdash/lightdash · 53 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

aws-bedrock-data-automation-mcp

Analyze documents, images, videos, and audio.

Friz-zy/ai-capability-registry · 19 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