adding-warehouse-perso…
Sync columns from a synced data warehouse table onto PostHog person or group properties, so warehouse data becomes usable anywhere person and group properties…
Author a PostHog canvas with semantic HTML, CSS, and direct browser APIs — documents, articles, generative graphics, 2D canvas and WebGL experiences, and focused experiments where React components add no useful structure. Use after building-canvases has routed a canvas request
$ npx -y skills add PostHog/ai-plugin --skill building-html-canvases --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/building-html-canvasesContext preview
The summary Claude sees to decide when to auto-load this skill.
Author a PostHog canvas with semantic HTML, CSS, and direct browser APIs — documents, articles, generative graphics, 2D canvas and WebGL experiences, and focused experiments where React components add no useful structure. Use after building-canvases has routed a canvas request
name: building-html-canvases description: > Author a PostHog canvas with semantic HTML, CSS, and direct browser APIs — documents, articles, generative graphics, 2D canvas and WebGL experiences, and focused experiments where React components add no useful structure. Use after building-canvases has routed a canvas request to a plain-HTML/browser-API implementation. Covers the thin component wrapper the current runtime requires, styling and theming without Quill, drawing surfaces, and animation/cleanup patterns.
Some canvases are documents or graphics programs, not applications: a written report, a diagram, a generative-art piece, a WebGL scene. For these, semantic HTML, CSS, and direct browser APIs are the right tools — don't force Quill components or React state onto a static page.
Every canvas keeps `src/canvas.tsx` as its mounted React entry component (default export, no props). Keep the React layer as a thin shell and write the experience in HTML/CSS/browser APIs inside it:
figures — with a `<style>` block for typography and layout. Write real, specific copy.
`useEffect` via a ref: get the 2D/WebGL context, run the setup and render loop there.
release contexts, so theme switches and remounts don't leak or double-run.
can hand a chart's `<canvas>` to imperative code while React owns the chrome.
The import allowlist still applies (react, react-dom, @posthog/quill, recharts, lucide-react, dayjs) — browser globals (`document`, `CanvasRenderingContext2D`, `WebGLRenderingContext`, `requestAnimationFrame`, `IntersectionObserver`, Web Audio, etc.) need no import. Three.js and other npm graphics libraries are not yet loadable; write against raw WebGL or 2D canvas until the build pipeline's dependency admission ships.
Do not use `h-full` or `height: 100%` on that root: a published canvas's artifact shell gives its `html`, `body`, and `#root` elements no explicit height, so percentage height collapses to the content height. Descendants may use percentage height after the outermost element establishes the viewport height.
Define your colors as CSS variables under `:root { … }` with overrides under `html.dark { … }`, or use theme token utilities (`bg-background`, `text-foreground`, `border-border`) — never a light-only hardcoded color.
name: the bundled Quill stylesheet sets `--background`, `--border`, `--card`, `--chrome`, `--input`, `--muted`, `--primary`, and `--fill-*` on every element, so a `:root` or `html.dark` value with one of those names never reaches any element. A page that colors its text with its own `--muted` then renders unreadable (pale text on a pale page). Validation rejects such a declaration with `platform_token_redeclared`.
(`getComputedStyle(document.documentElement).getPropertyValue("--primary")`) or your own CSS variables, and re-read on theme change if the scene is long-lived.
`ph.capture` for interaction analytics. Other requests and external styles, images, fonts, media, or frames require their exact public HTTPS origins in `capabilities.network.origins` and work only after publishing. Remote scripts and dynamic imports remain blocked.
links its saved insight through `ph.openExternal` (URL from the `generate-app-url` MCP tool, from a click); an ad-hoc `ph.query` number discloses the exact query that ran in a `<details>` element beside the claim — see "Verifiability" in `querying-canvas-data`.
interaction.
Official PostHog plugin for AI clients. Access PostHog products directly from your AI coding tool.
Repo: PostHog/ai-plugin
Sync columns from a synced data warehouse table onto PostHog person or group properties, so warehouse data becomes usable anywhere person and group properties…
Analyze the most expensive users in AI observability and explain why they cost so much. Use when the user asks about top spenders, expensive users, per-user…
Analyze session replay patterns across experiment variants to understand user behavior differences. Use when the user wants to see how users interact with…
Split a completed PostHog task run into activity records — what the agent tried, whether it worked, what blocked it — and record each one through the…
Assesses what a page's heatmap is telling you and recommends concrete changes. Pulls click / rageclick / scroll-depth data for a URL, names the hot elements by…
Audit every endpoint in a PostHog project for staleness, failed materialisations, and unused materialised versions. Use when the user asks "what endpoints can…