> Scopes work to the desktop app at products/desktop — a nested standalone pnpm/turbo/Biome workspace imported from PostHog/code, not part of the root frontend or Django build. Use when the user says /posthog-desktop, or works on the Electron desktop app, apps/code, apps/web, apps/mobile, packages/core, packages/ui, packages/workspace-server, @posthog/api-client, @posthog/agent, or the agent framework. Pins the working directory to products/desktop, swaps in that tree's toolchain and conventions in place of the monorepo's, and defines the few paths outside the tree that may be touched (Django APIs the app calls, desktop-* CI, resync config).
npx skills add https://github.com/PostHog/posthog --skill posthog-desktop
products/desktop/ is the PostHog desktop app (Electron + agent framework), imported from
PostHog/code and kept as a nested standalone workspace: own pnpm-workspace.yaml, own
lockfile, own Biome config, Node 22. It is excluded from the root pnpm-workspace.yaml, from
ruff/mypy, from root Jest, from oxlint/oxfmt, from stylelint and from pytest.
**Read products/desktop/AGENTS.md before writing code
in this tree.** It is the source of truth for architecture, layer boundaries, DI, and style.
This skill only covers the scoping contract around it.
Default: everything you read, edit, run and test lives under products/desktop/. Run all
commands with that as cwd. Do not go fishing in frontend/, posthog/, or other products/*
for patterns — the desktop tree has its own, and copying monorepo idioms in is a defect.
Step outside only when one of these is true:
packages/api-client/; the endpoints it hits live in the Django monorepo (see below).
products/desktop/MIGRATION.md "Root-repo changes (outside products/desktop/)":
.github/workflows/desktop-*.yml, .github/actions/desktop-*/,
.github/scripts/products/desktop/, and the exclusion entries in pnpm-workspace.yaml,
pyproject.toml, pytest.ini, package.json (lint:css), frontend/jest.config.ts,
.dockerignore, .oxlintrc.json, .oxfmtrc.json, .config/.markdownlint-cli2.jsonc,
.github/workflows/ci-{frontend,storybook,backend}.yml (+ .depot/workflows/ci-backend.yml).
Touch these only to keep an exclusion correct; say so when you do.
Anything else outside the tree: stop and ask.
| Root monorepo says | In products/desktop use |
| ----------------------------------------------------- | ------------------------------------------------------------- |
| ruff / mypy / pytest | nothing — no Python app code here |
| oxlint + Oxfmt, pnpm --filter=@posthog/frontend fix | pnpm lint (Biome check --write), pnpm format |
| Jest, hogli test | Vitest (pnpm test), Playwright (pnpm test:e2e) |
| pnpm --filter=@posthog/frontend typescript:check | pnpm typecheck (turbo, all packages) |
| Kea logics, typegen:write | Zustand stores + InversifyJS services; no kea, no typegen |
| LemonUI in frontend/ and products/*/frontend/ | @posthog/quill + Tailwind + Radix Themes |
| hogli build:openapi → generated frontend types | packages/api-client/src/generated.ts (hand-maintained here) |
| 4-space / repo Prettier habits | Biome, 2-space, double quotes |
Commands (from products/desktop/): pnpm install, pnpm dev, pnpm build, pnpm typecheck,
pnpm lint, pnpm test, pnpm test:e2e, pnpm --filter <pkg> <task>,
node scripts/check-host-boundaries.mjs.
Never run root-level pnpm install expecting it to cover desktop, and never let a desktop
dependency change alter the root lockfile — the root install must stay byte-identical.
scope of desktop (e.g. fix(desktop/$feature): ...)..github/pull_request_template.md structure, including the Agent context section.gh pr merge <number> --squash into master. **AGENTS.md "Merging PRs" andproducts/desktop/.claude/skills/merging-prs/ are stale** — they describe the PostHog/code
Trunk queue against main, which does not exist here. products/desktop/POST-MIGRATION.md
has the correct flow.
hogli ci:preflight on push (pre-push hook) still runs repo-wide.packages/api-client/ calls monorepo endpoints — tasks (/api/projects/:id/tasks/...),
signals, agent applications, environments/MCP installations, /api/users/. When a change needs
the backend:
(/improving-drf-endpoints, /django-migrations, serializer help_text, hogli build:openapi).
products/desktop/docs/LOCAL-DEVELOPMENT.md.
The tree is a verbatim copy of PostHog/code at a pinned SHA. A resync replaces it wholesale, so
edits to imported files are lost unless they are upstreamed or listed as intentional drift.
Before changing a file, consider whether the fix belongs upstream in PostHog/code. The drift
list, the local security patches that must be reapplied, and the monorepo-only files
(MIGRATION.md, POST-MIGRATION.md, product.yaml, docs/plan.md) are in
products/desktop/MIGRATION.md. Do not delete or "clean up" monorepo-only files.
products/desktop/.claude/skills/ ships its own: test-electron-app (drive the running app
over CDP :9222), quill-code, storybook-stories, canvas-templates, merging-prs (stale,
see above). Prefer these over monorepo equivalents while in this tree.
pnpm typecheck and pnpm lint from products/desktop/, plus pnpm test for touched packages.packages/core: biome lint packages/core, zero noRestrictedImports.@posthog/platform: rebuild or typecheck its dist/.apps/code: node scripts/check-host-boundaries.mjs --prune.products/desktop/ — or name what it touches and why.Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
Take posthog/posthog-desktop from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference npm.
Without those the skill loads but fails at the first command.