composing-grid-canvases
Was er macht
Dieser Skill platziert, verschiebt, skaliert und konfiguriert Widgets auf einer Raster-Canvas, auch auf deiner Startseiten-Canvas. Er richtet sich an Menschen, die ihre PostHog-Übersicht aus fertigen Widgets zusammenstellen wollen.
Wann du ihn nutzt
- ✓Wenn du ein Widget, etwa ein Wetter- oder Aufgaben-Widget, auf deiner Startseiten-Canvas hinzufügen willst.
- ✓Wenn du Widgets auf einem Raster neu anordnen oder in der Größe ändern willst.
- ✓Wenn du eine ganze Reihe von Widgets aus einer einzigen Anfrage einrichten willst.
Link zum Skill
https://github.com/PostHog/posthog/blob/master/products/canvas/skills/composing-grid-canvases/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Füge ein Aufgabenlisten-Widget zu meiner Startseiten-Canvas hinzu und platziere es neben meinem Anmeldediagramm.”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Die KI sucht zuerst nach einem passenden vorhandenen Widget und konfiguriert es, wenn möglich. Passt keines, passt sie ein nahes an oder baut ein neues Widget und aktualisiert dann das Raster-Layout.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von 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
Häufige Fragen
Warum vorhandene Widgets wiederverwenden?
Ein fertiges Widget zu platzieren ist schneller und vermeidet Doppelungen, deshalb prüft der Skill zuerst den Store.
Erfordert eine Layoutänderung einen Neubau?
Nein. Das Layout ist gespeicherte Daten, Änderungen sind also sofort sichtbar.
Wer kann ein Widget sehen, das ich hinzufüge?
Die Sichtbarkeit folgt dem Kanal. Widgets in einem persönlichen Kanal bleiben privat, Widgets in einem Team-Kanal sind geteilt.
Details
Originalbeschreibung des Autors
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
Beliebtheit
- GitHub-Sterne
- 41k
- Platz im Ranking
- #6841
- Lizenz
- —
- Aktualisiert
- 2.11.2026
Kommentare
- …
Weitere Skills aus diesem Repository
depot-ci
41kBringt deinem Agenten bei, Depot-CI-Workflows einzurichten, bestehende Workflows zu migrieren und Laufprotokolle auszuwerten.
depot-container-builds
41kHilft deinem Agenten, Docker-Images auf Depot-Remote-Buildern zu bauen, mit Multi-Plattform-Images, Registry-Push und Fehlerbehebung.
depot-github-runners
41kLässt deinen Agenten GitHub-Actions-Jobs auf Depot-Runnern laufen, mit passender Runner-Größe und Labels, und hilft bei Einrichtungsfehlern.
editing-agents-md
41kHilft deinem Agenten zu entscheiden, ob eine Regel in AGENTS.md oder CLAUDE.md gehört, und sie so zu formulieren, dass sie hält.
Ähnliche Skills
angular-developer
280kHilft deinem Agenten bei Angular-Code und gibt Tipps zur Projektstruktur. Nützlich für neue Projekte, einzelne Code-Teile sowie Performance und Barrierefreiheit.
frontend-a11y
280kHilft deinem Agenten, Weboberflächen für alle zugänglich zu machen. Sorgt dafür, dass Websites und Apps gut mit Screenreadern und Tastaturnavigation funktionieren.
frontend-patterns
280kLässt deinen Agenten moderne Muster in der Frontend-Entwicklung anwenden. Optimiert Performance, verwaltet State und folgt Best Practices für React und Next.js.