building-html-canvases — Claude Code skill for 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.
no license 149 installs ★ 101 updated 2026-10-24
npx skills add PostHog/ai-plugin --skill building-html-canvases -a claude-codeWhat building-html-canvases 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.
What it helps with
- 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 for the agent
- 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.
How to install building-html-canvases
1Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill building-html-canvases -a claude-code2Manually: put the files in place
~/.claude/skills/building-html-canvases/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/building-html-canvases/
1Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill building-html-canvases -a codex2Manually: put the files in place
.agents/skills/building-html-canvases/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill building-html-canvases -a cursor2Manually: put the files in place
.cursor/skills/building-html-canvases/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install PostHog/ai-plugin skills/building-html-canvases2Manually: put the files in place
.github/skills/building-html-canvases/SKILL.md1Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill building-html-canvases -a gemini-cli2Platform CLI
gemini skills install https://github.com/PostHog/ai-plugin --path skills/building-html-canvasesManually: put the files in place
.devin/skills/building-html-canvases/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add PostHog/ai-plugin --skill building-html-canvases -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about building-html-canvases
How do I install building-html-canvases in Claude Code?
Run npx skills add PostHog/ai-plugin --skill building-html-canvases -a claude-code. The skill file is at ~/.claude/skills/building-html-canvases/SKILL.md.
What does building-html-canvases do?
It guides the creation of PostHog canvas documents and graphics with HTML, CSS, and browser APIs. It also covers the required React shell and cleanup for animation and event listeners.
Can building-html-canvases use Three.js?
No. Three.js and other npm graphics packages cannot currently be loaded, so drawing uses raw WebGL or 2D canvas.