malloy-html-data-app-runtime

malloy-html-data-app-runtime is a skill for Claude Code, Codex from malloydata/publisher. It costs 45 tokens per session (3,114 once invoked), scanned A, original, MIT.

JavaScript guidance for connecting an HTML data page to Malloy Publisher. It explains how to run a Malloy query from a model file and use the returned rows or full results in the page.

In plain words
What is it for?
Use it to load data for custom charts, tables, filters, and other browser interface elements in an in-package HTML app.
Why use it?
It removes the guesswork around passing model paths, queries, parameters, and results between the page and Publisher.

Skill for Claude CodeCodex

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

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-html-data-app-runtime
Any agent
npx skills add malloydata/publisher --skill malloy-html-data-app-runtime
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-html-data-app-runtime

README.md
[![agentmods](https://agentmods.dev/badge/skills/malloydata/publisher/malloy-html-data-app-runtime.svg)](https://agentmods.dev/skills/malloydata/publisher/malloy-html-data-app-runtime)
Your own site
<a href="https://agentmods.dev/skills/malloydata/publisher/malloy-html-data-app-runtime"><img src="https://agentmods.dev/badge/skills/malloydata/publisher/malloy-html-data-app-runtime.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,114 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.1 $0.00045 $0.03114
Opus 5 $0.00023 $0.01557
Sonnet 5 $0.00009 $0.00623
Haiku 4.5 $0.00005 $0.00311

Measured 6d ago against content hash 8c2d80930e38, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

malloy-html-data-app-runtime 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 6d 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-html-data-app-runtime/SKILL.md · 163 lines

How it starts

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

HTML Data App Runtime

Publisher.query(modelPath, malloy) returns an array of plain row objects. Build the Malloy string, let the model do the work, and render the rows with whatever front-end code you like.

The runtime loads from the root-relative <script src="/sdk/publisher.js"> and adds one global, window.Publisher.

The query contract

Call Returns Use for
Publisher.query(modelPath, malloy, opts?) Promise<Array> of rows driving your own charts and tables
Publisher.queryFull(modelPath, malloy, opts?) Promise<MalloyResult> handing to <malloy-render>
  • modelPath is the model FILE path within the package, with / separators ("subscriptions.malloy", "models/events.malloy"). It is not the source name.
  • malloy is any query string, written in standard Malloy. This skill covers only the JavaScript glue, not Malloy syntax.
  • opts (all optional): sourceName, queryName (queryName runs a saved query, with sourceName qualifying the source a view hangs off; sourceName on its own is a 400), givens (a { name: value } map bound to the model's Malloy given: runtime parameters for this query; safe parameterization, values are bound by Publisher server-side, not string-interpolated), filterParams (values for the model's legacy #(filter) source filters), bypassFilters, and environment / package (only if the page is served from outside /environments/<env>/packages/<pkg>/). givens and filterParams compose (both apply).

Structure the app as modules, not one inline script

Past a single tile, an inline <script> becomes unmaintainable and untestable. Split the work, and load it without a build step: put your shared libraries first as plain globals, then one ES-module entry point that imports your own files.

<!-- Globals first: the runtime, then any vendored chart library. -->
<script src="/sdk/publisher.js"></script>
<script src="./vendor/chart.umd.js"></script>
<!-- One module entry; it imports the rest. ES modules resolve with no bundler. -->
<script type="module" src="./app.js"></script>

Read the full file on GitHub · 163 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. 6d ago First seen · 163 lines · 45 tokens per session scan A 8c2d80930e38

Subscribe to this mod's changes

malloy-html-data-app-runtime is a skill published in the GitHub repository malloydata/publisher (99 stars, last pushed today), licensed MIT. It adds 45 tokens to every session and 3,114 once invoked, about $0.0002 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

improving-python-coverage

Runs Python unit tests with coverage, analyzes coverage reports, and implements meaningful tests to increase coverage by 0.2%. Use when you want to systematically improve Python test coverage with high-value test cases.

streamlit/streamlit · 47 tokens

marimo-pair

Work inside the user's live marimo notebook from the code editor: run Python in the same kernel the user does, inspect live notebook state, and commit durable notebook changes through code mode. Use whenever you create, analyze, or improve the user's marimo notebook.

marimo-team/marimo · 57 tokens

cnsplots

Create, revise, and troubleshoot publication-ready scientific plots in Python with cnsplots, including distribution, regression, heatmap, genomics, survival, set, flow, and multi-panel figures. Use when a user asks for cnsplots code, Cell/Nature/Science-style visualization, precise pixel-sized figures, statistical…

faridrashidi/cnsplots · 79 tokens

tach

This skill should be used when the user asks to "add a tach module", "configure tach layers", "define module boundaries", "set up interfaces", "run tach check", "check module boundaries", "tach sync", "tach show", "deprecate a dependency", "tach-ignore", "unchecked modules", "tach test", "skip tests with tach"…

anam-org/metaxy · 109 tokens

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.

lightdash/lightdash · 56 tokens

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…

lightdash/lightdash · 102 tokens