Writing UI Components
PostHog/posthog
Structure and abstraction rules for PostHog UI code — any React component or frontend file under frontend/src/ or products//frontend/.
Write Storybook stories for PostHog UI components. An agent skill from PostHog/code.
$ npx skills add PostHog/code --skill storybook-stories -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install PostHog/code storybook-stories --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/PostHog/code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/storybook-stories .claude/skills/storybook-stories && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "storybook-stories" agent skill from https://github.com/PostHog/code/tree/main/.claude/skills/storybook-stories into .claude/skills/storybook-stories/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "storybook-stories", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/PostHog/code/tree/main/.claude/skills/storybook-storiesType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add PostHog/code --skill storybook-stories -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install PostHog/code storybook-stories --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PostHog/code.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/storybook-stories .agents/skills/storybook-stories && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "storybook-stories" agent skill from https://github.com/PostHog/code/tree/main/.claude/skills/storybook-stories into .agents/skills/storybook-stories/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "storybook-stories", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add PostHog/code --skill storybook-stories -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install PostHog/code storybook-stories --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PostHog/code.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/storybook-stories .cursor/skills/storybook-stories && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "storybook-stories" agent skill from https://github.com/PostHog/code/tree/main/.claude/skills/storybook-stories into .cursor/skills/storybook-stories/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "storybook-stories", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/PostHog/code.git --path .claude/skills/storybook-stories--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add PostHog/code --skill storybook-stories -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install PostHog/code storybook-stories --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PostHog/code.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/storybook-stories .gemini/skills/storybook-stories && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "storybook-stories" agent skill from https://github.com/PostHog/code/tree/main/.claude/skills/storybook-stories into .gemini/skills/storybook-stories/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "storybook-stories", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install PostHog/code storybook-storiesInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add PostHog/code --skill storybook-stories -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/PostHog/code.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/storybook-stories .github/skills/storybook-stories && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "storybook-stories" agent skill from https://github.com/PostHog/code/tree/main/.claude/skills/storybook-stories into .github/skills/storybook-stories/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "storybook-stories", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add PostHog/code --skill storybook-stories -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install PostHog/code storybook-stories --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PostHog/code.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/storybook-stories .opencode/skills/storybook-stories && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "storybook-stories" agent skill from https://github.com/PostHog/code/tree/main/.claude/skills/storybook-stories into .opencode/skills/storybook-stories/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "storybook-stories", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
storybook-storiesWrite Storybook stories for PostHog UI components. An agent skill from PostHog/code.
Storybook Stories is an agent skill from PostHog/code, published by the product's own GitHub organization. Write Storybook stories for PostHog UI components. Covers the provider stack stories run inside, the key gotcha that tRPC/useHostTRPC queries never resolve in Storybook (so data-fetching components render empty), and the pure-presentational split that makes a component storyable. Use when adding or fixing a .stories.tsx file under packages/ui.
Its SKILL.md is about 930 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Frontend & Design, covering gRPC and Protobuf and React components. It works with Storybook, PostHog and tRPC. The repository describes itself as: The era of self-driving development is here. The licence is MIT.
Read from SKILL.md and the folder at commit a4c32df. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
pnpmFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Storybook Stories loads about 929 tokens when it runs. Until then it costs about 91 tokens; SKILL.md has 346 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from PostHog/code at commit a4c32df, republished under its MIT licence (© PostHog). 346 words, ~929 tokens.
.claude/skills/storybook-stories/SKILL.md (or your agent's skills folder).Stories live next to components as *.stories.tsx and are collected by
apps/code/.storybook/main.ts (its glob includes
packages/ui/src/**/*.stories.tsx). Run/build:
pnpm --filter code storybook # dev server on :6006
pnpm --filter code build-storybook # static build (also a good CI/typecheck gate)apps/code/.storybook/preview.tsx applies two global decorators, so a story
should not add its own providers or <Theme>:
withAppProviders — a QueryClient, the host tRPC context, a DI
ServiceProvider, and a minimal TanStack Router. So useHostTRPC(),
useService(), useRouterState(), etc. render instead of throwing
"must be used within a Provider".<Theme> (Radix) bound to the dark/light toolbar global.Add a per-story decorator only to constrain layout (e.g. wrap in a
maxWidth div so a full-width component sizes realistically).
This is the thing that wastes time. In withAppProviders the tRPC ipcLink is
a no-op (apps/code/.storybook/mocks/electron-trpc.ts), so:
useHostTRPC() (and hooks built on it, like
useClaudeCliSessions) stays pending forever — query.data is
undefined, permanently.useService(TOKEN) returns an inert proxy stub for anything not
explicitly bound (service.foo().bar never throws, but calls are no-ops).
Only a few tokens resolve for real: HOST_TRPC_CLIENT (a no-op client with a
handful of stubbed methods), IMPERATIVE_QUERY_CLIENT, DIFF_WORKER_FACTORY.So a component that fetches its own data renders its empty/loading branch in
Storybook — frequently null. Storying it directly shows nothing.
Separate the data/wiring from the rendering, and story the pure part — which
also satisfies the repo rule "components render; hooks wrap exactly one query"
(AGENTS.md). Keep both in the same file:
// Pure — takes data + handlers as props. This is what the story targets.
export function WidgetList({ items, onPick }: WidgetListProps) { … }
// Container — does the tRPC/useService wiring, renders <WidgetList/>.
export function Widget({ repoPath }: WidgetProps) {
const { data } = useSomeQuery(repoPath);
return <WidgetList items={data?.items ?? []} onPick={…} />;
}Then each story is just args for WidgetList — one per visual state (empty,
single, over-limit, in-flight/disabled, fallback text, …). Real example:
packages/ui/src/features/task-detail/components/ContinueCliSessions.tsx +
.stories.tsx.
Filtering/branching that lives in the container (not the pure view) isn't exercised by these visual stories — cover it with a small unit test if it's worth pinning.
title groups in the sidebar, e.g. "Task Detail/ContinueCliSessions".session(overrides)) rather than
repeating object literals across stories.Date.now()/new Date() are fine in stories, but fixed ISO strings keep
relative-time output stable enough for visual review..tsx under the package); a
build-storybook additionally catches Storybook-specific breakage.© PostHog, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .claude/skills/storybook-stories of PostHog/code.
Open the folder on GitHubat commit a4c32df
We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders. This page covers the copy in PostHog/code, which our catalogue first saw on October 7, 2026.
Storybook Stories next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Storybook Stories this skillPostHog/code | 179 | — | ~929 | Automated safety check: Pass | MIT | |
| Writing UI ComponentsPostHog/posthog | 40k | — | ~4.1k | Automated safety check: Pass | Custom licence | |
| Phoenix FrontendArize-ai/phoenix | 12k | — | ~709 | Automated safety check: Pass | Custom licence | |
| Fumadocsbetter-notify/better-notify | 313 | — | ~2.3k | Automated safety check: Pass | MIT | |
| Wonder BlocksKhan/wonder-blocks | 163 | — | ~3.2k | Automated safety check: Pass | MIT | |
| DaleuiDaleStudy/daleui | 119 | — | ~675 | Automated safety check: Pass | MIT |
PostHog/posthog
Structure and abstraction rules for PostHog UI code — any React component or frontend file under frontend/src/ or products//frontend/.
Arize-ai/phoenix
Frontend development guidelines for the Phoenix AI observability platform.
better-notify/better-notify
A skill your agent uses when writing MDX documentation pages for a Fumadocs project — frontmatter, meta.json, page ordering, and fumadocs-ui React components available inside MDX content.
Khan/wonder-blocks
Implements user interfaces using the Wonder Blocks (WB) design system — Khan Academy's React component library.
DaleStudy/daleui
Use the daleui React design system with semantic Panda CSS tokens and accessible components.
pagezero-dev/pagezero
Creates a new UI component with implementation, index, tests, and Storybook stories following PageZERO conventions.
PostHog/code
How PostHog "canvas" dashboards work end-to-end — the two rendering tiers (json-render vs freeform React-in-iframe), the agent system prompts that steer each, and the RIGHT way to fetch PostHog data…
PostHog/code
How to write JavaScript workflow scripts for the workflow tool - fanning work out across many isolated subagents with agent(), parallel(), and pipeline(), then synthesizing one result.
PostHog/code
Install, configure, authenticate, and troubleshoot MCP (Model Context Protocol) servers for this agent.
PostHog/code
Merge a PR into main through the Trunk merge queue and babysit it until it lands.
PostHog/code
Add, replace, and optimize the looping demo videos in the onboarding "welcome" bento grid (packages/ui/src/features/onboarding).
PostHog/code
Edit the @posthog/quill design system locally and consume the change in this repo (posthog-code) before it is published to npm.
Categories
Write Storybook stories for PostHog UI components. An agent skill from PostHog/code. Storybook Stories is an agent skill from PostHog/code, published by the product's own GitHub organization. Write Storybook stories for PostHog UI components.
Storybook Stories fits situations like: fixing a .stories.tsx file under packages/ui; tasks that involve gRPC and Protobuf; tasks that involve React components.
Run `npx skills add PostHog/code --skill storybook-stories -a claude-code`. Or copy the skill folder (.claude/skills/storybook-stories in PostHog/code) into .claude/skills/storybook-stories in your project. Claude Code loads it when a task matches its description.
Run `npx skills add PostHog/code --skill storybook-stories -a codex`. Or copy the skill folder (.claude/skills/storybook-stories in PostHog/code) into .agents/skills/storybook-stories in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add PostHog/code --skill storybook-stories -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/storybook-stories, .gemini/skills/storybook-stories, .github/skills/storybook-stories and .opencode/skills/storybook-stories in your project.
Going by SKILL.md and its folder, Storybook Stories needs the command-line tools its instructions call (pnpm).
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Storybook Stories is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 929 tokens (SKILL.md is roughly 3.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Storybook Stories: Writing UI Components (PostHog/posthog, 40k stars), Phoenix Frontend (Arize-ai/phoenix, 12k stars), Fumadocs (better-notify/better-notify, 313 stars) and Wonder Blocks (Khan/wonder-blocks, 163 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
PostHog (a GitHub organization, an official publisher) maintains it in PostHog/code, which has 179 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on August 5, 2026.
Source: PostHog/code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.