# building-html-canvases

The building-html-canvases Claude Code skill builds PostHog canvases with semantic HTML, CSS, and browser APIs. It runs when a canvas request is routed to a plain HTML implementation.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 149 installs · ★ 101 repo stars
- Author: PostHog
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/PostHog/ai-plugin/tree/HEAD/skills/building-html-canvases/SKILL.md
- Updated: 2026-10-24
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/building-html-canvases

## What it does

The skill guides PostHog canvas work such as articles, reports, generative graphics, and 2D or WebGL scenes. React stays as a small mounted shell in `src/canvas.tsx`; the page structure and browser API work live inside it. Animated scenes need teardown code to stop frame loops and remove event listeners when the component unmounts.

The runtime accepts only its listed dependencies. Three.js and other npm graphics packages cannot load yet, so drawing uses raw WebGL or 2D canvas. External requests and assets need HTTPS origins in `capabilities.network.origins` and work after publishing. PostHog data goes through the `ph` bridge; canvas tools handle validation and publishing.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill building-html-canvases -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/building-html-canvases/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/building-html-canvases/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill building-html-canvases -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/building-html-canvases/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill building-html-canvases -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/building-html-canvases/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install PostHog/ai-plugin skills/building-html-canvases
```

2. **Manually: put the files in place**
- File: `.github/skills/building-html-canvases/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill building-html-canvases -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/PostHog/ai-plugin --path skills/building-html-canvases
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/building-html-canvases/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill building-html-canvases -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/PostHog/ai-plugin/tree/HEAD/skills/building-html-canvases/SKILL.md

## When to use it
- build a PostHog canvas as an article or report
- draw generative graphics with 2D canvas or WebGL
- stop animation loops and remove listeners on unmount
- style a canvas for PostHog theme changes

## Example prompts
- Create a PostHog canvas article using semantic HTML and CSS.
- Draw a generative canvas scene with WebGL, without Three.js.
- Add a 2D animation and stop its frame loop when the canvas unmounts.

## Similar
- [html-diagram](https://affpapa.org/en/nevibecode/skills/html-diagram.md) — skill · 4600 installs
- [pixijs-html-source](https://affpapa.org/en/nevibecode/skills/pixijs-html-source.md) — skill · 5700 installs
- [huashu-design-html-native](https://affpapa.org/en/nevibecode/skills/huashu-design-html-native.md) — skill · 433 installs
- [design-html](https://affpapa.org/en/nevibecode/skills/design-html.md) — skill · 215 installs
- [html-ppt-taste-brutalist](https://affpapa.org/en/nevibecode/skills/html-ppt-taste-brutalist.md) — skill · 159 installs
- [html-demo](https://affpapa.org/en/nevibecode/skills/html-demo.md) — skill · ★ 7995 repo stars

From the same set: [posthog/ai-plugin](https://affpapa.org/en/nevibecode/by/posthog/ai-plugin.md) — 82 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
