Logo van Composing Grid Canvases

Composing Grid Canvases

Organisatie
PostHog
composing-grid-canvases

Stel PostHog-rastercanvassen samen — widgetrasters (inclusief de startcanvas van de gebruiker) opgebouwd uit herbruikbare componentcanvassen. Gebruik dit wanneer iemand vraagt om een widget op een raster- of startcanvas toe te voegen, in te vullen, te verplaatsen, het formaat ervan te wijzigen of deze te verwijderen; een volledige canvas met widgets samen te stellen op basis van één opdracht; een herbruikbare widget/component te bouwen; of wanneer een plaatsings-ID of rastercanvas-ID het doel is. Behandelt de stappen voor het zoeken in de componentenopslag, configureren, forken en bouwen; het contract voor componentplaatsing (size, configSchema); de levenscyclus van plaatsingen (pending/generating/live/failed); de beveiligde loop voor layoutpatches; en het lezen van de commentaarthreads van de canvas.

Add to TypingMind

Overzicht

UitgeverPostHog
Repositoryskills
Skillnaamcomposing-grid-canvases
Sterren
77
Forks
8
Meegeleverde bestanden
1
LicentieMIT
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Meegeleverde bestanden: 1

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. De bestanden kunnen alleen worden gelezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door PostHog op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Composing Grid Canvases in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/PostHog/skills/tree/main/skills/omnibus/composing-grid-canvases
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/PostHog/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/omnibus/composing-grid-canvases .claude/skills/composing-grid-canvases
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Composing Grid Canvases in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Composing Grid Canvases automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Composing Grid Canvases niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

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 (the building-canvases skill 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:

  1. Search the store: canvas-list with kind=component and search=<what the widget shows>. A component is placeable when both component_meta and published_build_id are set. If its configSchema can express the request ("weather for Lisbon" → existing weather component with config: {"location": "Lisbon"}), place and configure it — write no code.
  2. Fork when a component is close but its config cannot express the ask: read its source (canvas-source-retrieve), create a new component (canvas-create with kind=component), adapt, publish. Name the difference in the new component's description.
  3. 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=component and a description written 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 component key:

    json
    {
      "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, no pattern — validation rejects them.

  • Design responsively. Give the component's root min-h-screen so 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 use h-screen on the root: a fixed viewport height caps a flex column, so tall children shrink and clip instead of scrolling. Do not use h-full on the root either: a published component's artifact shell gives its html, body, and #root elements no explicit height, so height: 100% collapses to the content height. Render usefully at minW×minH, and treat config as 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 summarizes my work in progress") usually means several widgets, not one. Plan the full set first — one placement per concern — then resolve each with the ladder above. Lay them out together: no overlaps, sizes matched to what each widget shows, the grid filled deliberately rather than tiles scattered in a corner. Batch the layout writes (one publish for an initial layout, surgical patches after) instead of one write per widget, and finish with every placement live or failed — never generating.

Canvas comments

Users leave feedback as comment threads on the canvas. Run exec search ^canvas-comments-(list|retrieve)$ first. If both tools are present, list the threads with them before and after changing the canvas, and address the open ones — a comment naming a broken widget is your brief for fixing it. These tools return every thread on the canvas, including threads without a task. If either tool is absent, use the task comment tools as working-with-task-comments describes.

Editing a grid

The loop is read → patch, guarded exactly as validating-and-publishing-canvases describes for source publishes — with canvas-layout-get in place of canvas-source-retrieve, and canvas-layout-patch (surgical ops, guard required) or canvas-layout-publish (complete document, for an initial layout or full restructure) as the write. On a 409, re-read the layout, re-apply your change, and patch again.

Operations:

  • add_placement — a new box: {id, status, x, y, w, h, ...}. Placements must not overlap or extend past grid.columns.
  • update_placement — merge changes into the placement with id. Filling a drawn box is {"op": "update_placement", "id": "p1", "changes": {"status": "live", "component": "<component canvas id>", "config": {...}}}.
  • remove_placement, set_grid.

The placement lifecycle

A placement's status tells the renderer what to show:

  • pending — the user drew a box but hasn't described it (or the prompt awaits dispatch).
  • generating — an agent task is filling it; generationTaskId links the task and prompt records the ask. Set this when you start working on a placement from a task.
  • live — renders its component at version ("latest" by default; a pinned version id is allowed). Requires the component to be published and visible to the acting user.
  • failed — generation failed; keep the prompt so the user can retry or re-describe.

When a task asks you to fill a placement, its prompt and the box's size are your brief: honor the drawn w×h and keep the placement's prompt intact for provenance.

Validation you will hit

Layout publishes validate atomically; every error names its placement. The common ones:

  • component_not_found — the id is wrong, deleted, not a component, or not visible to the acting user (a component in someone else's personal channel is not placeable).
  • component_not_published — the component has never published a placement contract.
  • placement_config_invalid — config does not match the component's configSchema.
  • placement_size_out_of_contract — a warning, not an error: the box's w/h is outside the component's suggested range. The publish still succeeds; the component must render responsively.
  • placements_overlap / invalid_placement — geometry; fix coordinates rather than removing the other widget.

End your reply by linking the grid canvas with the url field the canvas tools return — never construct a canvas URL yourself.

Meegeleverde bestanden

Zolang de skill geladen is, leest het model deze bestanden als dat nodig is. Het model kan ze alleen lezen; ze worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Composing Grid Canvases?

Stel PostHog-rastercanvassen samen — widgetrasters (inclusief de startcanvas van de gebruiker) opgebouwd uit herbruikbare componentcanvassen. Gebruik dit wanneer iemand vraagt om een widget op een raster- of startcanvas toe te voegen, in te vullen, te verplaatsen, het formaat ervan te wijzigen of deze te verwijderen; een volledige canvas met widgets samen te stellen op basis van één opdracht; een herbruikbare widget/component te bouwen; of wanneer een plaatsings-ID of rastercanvas-ID het doel is. Behandelt de stappen voor het zoeken in de componentenopslag, configureren, forken en bouwen; h...

Waarom Composing Grid Canvases gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Composing Grid Canvases bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Composing Grid Canvases in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/PostHog/skills/tree/main/skills/omnibus/composing-grid-canvases. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Composing Grid Canvases gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Composing Grid Canvases gebruiken?

Zoveel als je wilt. Je kunt Composing Grid Canvases gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Composing Grid Canvases gratis?

Ja. Deze skill is door PostHog op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇