---
name: Inline Visualizations
slug: inline-visualizations
category: Frontend
description: Inline Visualizations emits a sandboxed inline HTML preview in an assistant message when a workspace .html file should render in-thread. Use after writing or updating a demo, chart, or report HTML file the user should see without opening a panel.
github: "https://github.com/get-bb/bb/tree/main/plugins/inline-vis/skills/inline-vis"
language: TypeScript
stars: 2274
forks: 253
install: "npx degit https://github.com/get-bb/bb/tree/main/plugins/inline-vis/skills/inline-vis ~/.claude/skills/inline-vis"
installs_to: ~/.claude/skills/inline-vis
source_path: plugins/inline-vis/skills/inline-vis/SKILL.md
collection_size: 14
category_size: 567
collection_url: "https://dirskills.com/collections/get-bb/bb"
added: 2026-08-18T06:58:21.206Z
last_synced: 2026-08-18T06:58:21.206Z
canonical_url: "https://dirskills.com/skills/inline-visualizations"
---

# Inline Visualizations

Inline Visualizations emits a sandboxed inline HTML preview in an assistant message when a workspace .html file should render in-thread. Use after writing or updating a demo, chart, or report HTML file the user should see without opening a panel.

**Install:**

```bash
npx degit https://github.com/get-bb/bb/tree/main/plugins/inline-vis/skills/inline-vis ~/.claude/skills/inline-vis
```

## README

# Inline HTML visualizations

When the user should see a small HTML demo, chart, or report **inline in the
assistant message**, write (or update) a workspace-relative `.html` file, then
emit this **message directive** as its own block (not inside a fenced code
block):

```text
::inline-vis{file="demo.html"}
```

## Rules

- `file` is **workspace-relative** (e.g. `demo.html`, `charts/out.html`). Never
  use absolute paths.
- `height` is optional and sets the iframe viewport height in pixels. It must be
  a whole number from 120 through 1200; omit it for the 224px default.
- Only `.html` / `.htm` files are accepted.
- Inline and external CSS/JavaScript are supported. Remote images, fonts,
  media, fetches, and WebSockets are also allowed subject to normal browser
  CORS, mixed-content, and remote-server policies. Scripts execute in an
  opaque-origin iframe and cannot access the bb page, cookies, or storage.
- Keep files small (under the sidebar preview's 5 MiB document limit).
- Emit the directive only after the file exists on disk in the current thread
  workspace.
- Do **not** put the directive inside backticks or a markdown code fence, or it
  stays literal text.
- Incomplete streaming syntax stays literal until the closing `}` arrives — emit
  a complete directive in one piece when possible.

## Example turn

1. Write `demo.html` with a simple visualization (inline styles, no remote JS).
2. Reply with a short caption and the directive:

```text
Here is the chart:

::inline-vis{file="demo.html"}
```

For a taller visualization, emit for example:

```text
::inline-vis{file="demo.html" height="640"}
```

The bb app replaces the directive with a sandboxed preview. If the plugin is
disabled or the path is invalid, users see the original directive source or an
inline error from the plugin.
