building-canvases
Fungsinya
Skill ini membuat dan memperbarui canvas, yaitu aplikasi interaktif kecil yang berada di dalam PostHog dan berjalan di dalam bingkai yang aman. Ditujukan untuk siapa saja yang ingin papan, dokumen, formulir, atau alat mini kustom di PostHog tanpa proyek kode terpisah.
Kapan dipakai
- βSaat Anda ingin papan, formulir, atau dokumen kustom yang berada di dalam PostHog.
- βSaat Anda perlu mengubah atau memperbaiki aplikasi canvas yang sudah ada.
- βSaat Anda ingin alat visual kecil yang dibangun dari data PostHog Anda.
Link skill
https://github.com/PostHog/posthog/blob/master/products/canvas/skills/building-canvases/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βBuatkan canvas yang menampilkan angka pendaftaran kami dan memungkinkan saya memilih rentang tanggal.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
AI menulis sumber canvas di dalam PostHog, memeriksa bahwa hanya pustaka yang diizinkan dan sumber data yang dideklarasikan yang digunakan, lalu mempublikasikannya. PostHog membangun canvas, dan menampilkan build sukses terakhir hingga build baru siap.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Building canvases
A canvas is a client-side browser application that runs in a sandboxed iframe inside PostHog.
Its source lives in PostHog β not in a repository β and you read and write it through the
canvas-* tools. Never write a canvas to a local file; publishing through the tool is what
saves it.
Canvas work can start from any ordinary task. A dedicated canvas mode or pre-created canvas is not required. When the user asks for a board, document, form, visualization, or small app that should live in PostHog, treat that as a canvas request and follow this skill.
This skill owns freeform canvases (standalone apps). Two other canvas kinds exist: grid
canvases (widget grids, including the user's home canvas) and component canvases (reusable
widgets grids place). When the target is a grid or home canvas, a placement, or a reusable
widget/component, load composing-grid-canvases instead β it owns the store search β configure β
fork β build ladder and the layout patch loop. Authoring a component's source still uses the
implementation companions below.
Resolve the target canvas
- If the task names a canvas id (canvas-initiated tasks do), that is the target. Do not create another.
- Otherwise the target channel is the one the task was created in β named in the task's context
(the
channel_contextblock or the generation instructions). List that channel's canvases withcanvas-list(scope withchannel). If one is clearly what the request refers to β an earlier iteration of the same board or tool β build on it instead of creating a near-duplicate, and say so in your reply so the user knows where the result landed. - Only when nothing existing fits, create one with
canvas-createin that same channel, named with a short descriptive title drawn from the request β never "Untitled canvas". - Never survey channels to choose a target yourself: use
channel-listonly to resolve a channel the USER named to its id. Its listing puts the personal #me channel first, and #me is never a default β a canvas filed there is invisible to everyone else. If the task names neither a canvas nor a channel, ask which channel to use instead of guessing.
Load the companion skills for the implementation
This skill owns canvas selection and the authoring lifecycle. The companion skills hold the implementation contracts. Load every companion that applies before writing source:
building-react-quill-canvasesfor dashboards, data boards, forms, tools, application-like state, or anything that should look native to PostHog. It owns allowed imports, Quill composition, theming, charts, loading and error states, and the date picker.building-html-canvasesfor documents, articles, focused experiments, generative graphics,<canvas>, or WebGL work where application components add no useful structure. It owns semantic markup, direct browser APIs, animation cleanup, and non-Quill theming.querying-canvas-datawhenever the canvas reads PostHog data, captures events, or navigates. It owns thephSDK, saved-insight preference, result shapes, variables, date ranges, progressive per-query loading, and declared data capabilities. Load it alongside either implementation skill when data is involved.validating-and-publishing-canvasesfor every canvas. It owns project shape, capability declarations, validation diagnostics, guarded publishes, drafts, builds, and conflict recovery.
Mix implementation approaches when appropriate: React can own application chrome while browser graphics code owns a canvas element, or a mostly static page can mount one interactive island.
This is a judgment call, not a persisted mode β ask the user only when the choice changes a user-visible requirement you cannot infer.
Blocks
A canvas can contain premade blocks: numbers, goals, trends, top lists, funnels, retention, saved insights, live event feeds, SQL tables, filters, compare and refresh controls, and callouts.
They are React components in src/blocks/ that people drag into the canvas in the desktop app, so they are part of your source.
Read references/blocks.md before you change a canvas that has src/blocks/runtime.tsx.
Params
Expose the values a person may want to change as params. They can then change them in the desktop editor without a new task. Params are optional, but add them to each panel, card, or tool that has values worth changing: titles, copy, ev
Pertanyaan umum
Apakah saya perlu menjalankan aplikasinya sendiri?
Tidak. Sumber canvas disimpan di PostHog dan dirender di sana.
Bisakah canvas memuat data PostHog saya?
Bisa. Canvas membaca data PostHog melalui jembatan bawaan dan harus mendeklarasikan insight serta event yang digunakan.
Bisakah AI menimpa perubahan orang lain?
PostHog menolak publikasi yang akan menimpa pekerjaan yang lebih baru, sehingga AI harus membaca versi terbaru sebelum mempublikasikan lagi.
Detail
Deskripsi asli dari pembuat
Create or edit a PostHog freeform canvas β a sandboxed browser application (data board, document, form, small tool, graphics experiment) stored in PostHog and rendered by the desktop/web app. Use when a task asks to build, generate, update, or fix a standalone canvas app, or when a freeform canvas id is given as the publish target. For grid/home canvases, widget placements, or reusable components, use composing-grid-canvases instead. Covers resolving or creating the target canvas, choosing an implementation approach (React + Quill vs plain HTML/browser APIs), the read β edit β validate β publi
repo: PostHog/posthog
Popularitas
- Bintang GitHub
- 41k
- Peringkat
- #6838
- Lisensi
- β
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
depot-ci
41kMembantu agent Anda menyiapkan dan menjalankan alur kerja Depot CI, alternatif GitHub Actions, termasuk memigrasikan alur kerja yang ada dan membaca log eksekusi.
depot-container-builds
41kMembantu agent Anda membangun image Docker di builder jarak jauh Depot, termasuk image multi-platform, pengiriman ke registry, dan perbaikan kegagalan build.
depot-github-runners
41kMembantu agent Anda memindahkan job GitHub Actions ke runner yang dikelola Depot, memilih ukuran dan label runner, serta memecahkan masalah pengaturan runner.
editing-agents-md
41kMembantu agent Anda memutuskan apakah sebuah aturan layak masuk ke berkas AGENTS.md atau CLAUDE.md, dan menulisnya agar tetap dipatuhi tanpa membuat berkas membengkak.
Skill serupa
angular-developer
280kMembantu agent Anda membuat kode Angular dan memberi saran struktur proyek. Berguna saat memulai proyek baru, membuat komponen, atau meningkatkan performa.
frontend-a11y
280kMembantu agent Anda membuat antarmuka web dapat diakses semua orang. Memastikan website dan aplikasi berfungsi baik dengan screen reader dan navigasi keyboard.
frontend-patterns
280kMembuat agent Anda menerapkan pola modern dalam frontend. Mengoptimalkan performa, mengelola state, dan mengikuti praktik terbaik React dan Next.js.