composing-grid-canvases
What it does
This skill places, moves, resizes and configures widgets on a grid canvas, including your home canvas. It is for people who want to arrange their PostHog overview from ready-made widgets.
When to use it
- βWhen you want to add a widget, such as a weather or task widget, to your home canvas.
- βWhen you want to rearrange or resize widgets on a grid.
- βWhen you want a whole set of widgets set up from one request.
Skill link
https://github.com/PostHog/posthog/blob/master/products/canvas/skills/composing-grid-canvases/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βAdd a task list widget to my home canvas and put it next to my signup chart.β
5 new skills a week. 1 minute to read.
How it works
The AI first searches for an existing widget that fits and configures it if possible. If none fits, it adapts a close one or builds a new widget, then updates the grid layout.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Composing grid canvases
A grid canvas is a composition, not an app: a grid of placements, each rendering a component canvas (a reusable widget with its own source, build, and placement contract). The user's home canvas is an ordinary grid canvas in their personal channel. Layout is data β publishing or patching one is live immediately, with no build.
Three canvas kinds share one lifecycle:
freeformβ a standalone app (thebuilding-canvasesskill owns these).componentβ a reusable widget. Same source/build pipeline as freeform, plus a placement contract. Visibility rides its channel: personal channel = private, team channel = shared.gridβ a layout of placements referencing components. No file source; layout only.
The resolution ladder: configure, fork, build
When a grid placement needs content ("a weather widget here", "a kanban of my tasks"), resolve in this order β placing an existing component beats authoring a duplicate:
- Search the store:
canvas-listwithkind=componentandsearch=<what the widget shows>. A component is placeable when bothcomponent_metaandpublished_build_idare set. If itsconfigSchemacan express the request ("weather for Lisbon" β existing weather component withconfig: {"location": "Lisbon"}), place and configure it β write no code. - Fork when a component is close but its config cannot express the ask: read its source
(
canvas-source-retrieve), create a new component (canvas-createwithkind=component), adapt, publish. Name the difference in the new component's description. - Build new when nothing fits β see "Building a component" below.
New components land in the channel you create them in. Create them in the same channel as the grid they serve unless the user asks to share them more widely.
Building a component
A component is authored exactly like a freeform canvas β load building-react-quill-canvases (or
building-html-canvases) plus querying-canvas-data and validating-and-publishing-canvases β
with three additions. A component that shows PostHog data follows the same verifiability rule as
any canvas: an insight-backed figure links its saved insight, an ad-hoc query exposes the exact
query that ran (see "Verifiability" in querying-canvas-data).
Start from the complete, buildable project in references/component-example.md; its envelope, placement contract, capability declarations, and defensive ph.state access are the parts that break when improvised.
Create with
kind=componentand adescriptionwritten for store search: say what the widget shows and what its config controls. Future placements are found by this text.Declare the placement contract in the project's top-level
componentkey:{ "component": { "size": { "defaultW": 2, "defaultH": 1, "minW": 1, "minH": 1, "maxW": 4 }, "configSchema": { "type": "object", "properties": { "location": { "type": "string", "description": "City to show weather for" } } } } }Size is in grid units (widths 1β12, heights 1β40);
minW <= defaultW <= maxW. The range is advisory: users may resize a placement to any size, so it informs defaults and warnings, never rejections. The config schema vocabulary is an allowlist βtype,title,description,default,properties,required,additionalProperties,items,enum,const,minimum,maximum,minLength,maxLength,minItems,maxItems,format. No$ref, nopatternβ validation rejects them.Design responsively. Give the component's root
min-h-screenso it fills the placement iframe's viewport and grows past it as content demands. Adapt the layout to any size the user drags: a 2Γ1 placement is a glanceable tile; a 6Γ4 is a full app surface. Do not useh-screenon the root: a fixed viewport height caps a flex column, so tall children shrink and clip instead of scrolling. Do not useh-fullon the root either: a published component's artifact shell gives itshtml,body, and#rootelements no explicit height, soheight: 100%collapses to the content height. Render usefully atminWΓminH, and treatconfigas the only per-placement input.
Publish and wait for the build like any canvas β a component with no ready build cannot go live on a grid.
Composing a whole canvas
A whole-canvas ask ("a home canvas that summariz
FAQ
Why reuse existing widgets?
Placing a ready widget is quicker and avoids duplicates, so the skill checks the store first.
Does changing the layout need a rebuild?
No. Layout is saved data, so changes show right away.
Who can see a widget I add?
Visibility follows the channel. Widgets on a personal channel stay private, and widgets on a team channel are shared.
Details
Original description by the author
Compose PostHog grid canvases β widget grids (including the user's home canvas) built from reusable component canvases. Use when a task asks to add, fill, move, resize, or remove a widget on a grid or home canvas, to compose a whole canvas of widgets from one ask, to build a reusable widget/component, or when a placement id or grid canvas id is the target. Covers the component store search β configure β fork β build ladder, the component placement contract (size, configSchema), the placement lifecycle (pending/generating/live/failed), the guarded layout patch loop, and reading the canvas's com
repo: PostHog/posthog
Popularity
- GitHub stars
- 41k
- Ranking position
- #6841
- License
- β
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
depot-ci
41kHelps your agent set up and run Depot CI workflows, a GitHub Actions alternative, including migrating existing workflows and reading run logs.
depot-container-builds
41kHelps your agent build Docker images on Depot's remote builders, including multi-platform images, pushing to registries, and fixing build failures.
depot-github-runners
41kHelps your agent move GitHub Actions jobs to Depot-managed runners, choosing runner sizes and labels, and troubleshooting runner setup issues.
editing-agents-md
41kHelps your agent decide whether a rule belongs in an AGENTS.md or CLAUDE.md file, and write it so it sticks without bloating the file.
Similar skills
angular-developer
280kHelps your agent create Angular code and give project structure advice. Useful for starting new projects, creating code parts, or improving performance and accessibility.
frontend-a11y
280kHelps your agent make web interfaces accessible to everyone. It ensures websites and apps work well with screen readers and keyboard navigation.
frontend-patterns
280kHas your agent apply modern patterns in frontend development. It optimizes performance, manages state, and follows best practices in React and Next.js.