---
name: html-authoring
description: "**[REQUIRED]** for ALL creation, updating, or editing of `.html` files, regardless of complexity. Snowflake renders report HTML in a strict, sandboxed environment: no inline event handlers, no `eval`, no runtime network calls, no remote images or CDN scripts — only a fixed set of vendored libraries served from `/libs/`. Author every report to these rules so it renders correctly and is safe to share. Must use whenever generating, creating, updating, or modifying an `.html` file (e.g. 'update the HTML report at …')."
---
# HTML Authoring
When report sharing is enabled, Snowflake renders your report HTML in a **locked-down sandbox**: a strict Content-Security-Policy applies and the page has **no network access**. Author to the rules below so the report renders correctly and is safe to share — plain, self-contained HTML with inline JavaScript and all data embedded is ideal.
---
## Where to save the file
**Never leave the file in transient storage** — a temporary or scratch location (e.g. `/tmp`) is wiped when the session ends, leaving nothing to publish or refresh later. The file must land somewhere durable.
**Creating a new report:** save it to the **current workspace** by default. This skill can also run outside a workspace (e.g. from the Cowork page), and the user may name a destination of their own — use it when it's durable, otherwise ask. If no durable destination is clear, ask before writing.
**Updating an existing report:** write it back to the same location.
---
## Marker meta tag
Include this in `
` so downstream tooling knows the file is agent-authored:
```html
```
---
## Report metadata — for later refresh
Embed one provenance block in `` so a future run (yours or another agent's) can **refresh or iterate** on the report — its equivalent of a header doc-comment in code. Record where the data came from and how each part was produced. It's a `
```
- **Key each `sections[]` entry to the section's anchor id** (`
` or ``). The id — not the block's position — is the link, so "refresh section X" is a lookup on `sections[].id`, and the pipeline can extract the whole block without losing which entry maps to which section.
- Scope each source: put it in a section's `dataSources` if it feeds only that section, or in the top-level `dataSources` if it's shared across sections — use either or both. (The template below is section-level only because each source is section-specific.)
- Keep it machine-readable: list every query / table / file each part draws on, plus any parameters or assumptions a future update needs.
- Update it whenever you change what the report shows.
- Tokens in `{…}` (e.g. `{WAREHOUSE}`, `{DATABASE}.{SCHEMA}.{TABLE}`) are placeholders — replace them with the report's real warehouse and fully-qualified sources.
---
## What you can and can't use
**Use freely:**
- ✅ Inline `
```
| Library | Reference path | Use / limits |
|---|---|---|
| chart.js | `/libs/chart.js@4.4.4/chart.umd.js` | Charts (renders to `