…le sections, skip-modal create
- Skip "New Skill" modal: clicking the button immediately creates a skill
with an auto-incremented name (new-skill, new-skill-2, …) and opens
the editor directly in edit mode via a new `initialEditing` prop on
SkillDetailPanel.
- AI-assisted generation: a "Generate with AI" button in the editor
calls the new SkillGeneratorService (injectable, lives in @posthog/core)
via LlmGatewayService. The service returns a structured response parsed
into both `description` and `body`, filling the form in one click.
CodeMirror is remounted via an editorKey to pick up the generated body.
- Grid / list view toggle: Finder-style grid cards vs list rows, persisted
to localStorage via a new skillsViewStore (zustand persist). SkillGridCard
is a new semantic <button> component replacing the old <div role="button">.
- Collapsible sections: every source section (PostHog Code, Your skills,
Repository…) and every sub-category within bundled/codex sources has a
chevron toggle. A "Collapse all / Expand all" one-click control appears
in a secondary toolbar strip below search.
- Humanise skill names: kebab-case slugs like `auditing-endpoints` are
displayed as "Auditing Endpoints" in cards and the grid.
- Bug fix: "No description" warning callout was shown while the user was
already typing in the editor. Hidden when isEditing is true.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TpGjPYBD4pgZpsAHjozzsN
Problem
Managing skills in PostHog Code was friction-heavy for users with a growing skill library:
auditing-endpoints) rather than readable textChanges
Screen recording of how it looks here: https://drive.google.com/file/d/1DBUyEwWGVp3ZzqcTPmpcbUOvmCwHWHuk/view?usp=drive_link
Skip-modal skill creation
Clicking "New Skill" immediately creates a skill with an auto-incremented name (
new-skill,new-skill-2, …) and opens it directly in edit mode via a newinitialEditingprop onSkillDetailPanel. The confirmation dialog is removed — one click and you're editing.AI-assisted content generation
A "Generate with AI" button in the editor calls a new
SkillGeneratorService— an injectable@posthog/coreservice backed byLlmGatewayService. It fills both thedescriptionfield and the markdown body in one click. The model returns a structured response (DESCRIPTION:line +<body>block) that is parsed and applied without overwriting content the user has already typed. CodeMirror is remounted via aneditorKeyto pick up generated body content.Grid / list view toggle
A Finder-style grid card view sits alongside the existing list rows, toggled from a secondary toolbar strip. The preference persists to localStorage via a new
skillsViewStore(zustand persist).SkillGridCarduses a semantic<button>element (fixes an a11y lint violation on the previous<div role="button">).Collapsible sections with expand/collapse all
Every source section (PostHog Code, Your skills, Repository, …) and every sub-category within bundled/codex sources has a chevron toggle. A secondary toolbar strip below search shows "Collapse all / Expand all" alongside the view toggle (with tooltip).
Humanised skill names
Kebab-case slugs are rendered as Title Case across all card and grid views (
auditing-endpoints→ "Auditing Endpoints").Bug fix: stale "No description" warning
The warning callout remained visible while the user was already typing a description in the editor. It is now hidden when
isEditingis true.How did you test this?
pnpm typecheck— 22/22 tasks cleanpnpm lint(Biome) — 0 errors (fixedSkillGridCardsemantic element violation in the same pass)pnpm --filter @posthog/core test— 29/29 passingnode scripts/check-host-boundaries.mjs— no new violationsAutomatic notifications