posthog-desktop

Scopes development work to the PostHog desktop Electron app workspace with its own toolchain.

713|118|Updated Aug 11, 2020
One-click install
npx skills add https://github.com/PostHog/posthog-foss --skill posthog-desktop
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: posthog-desktop
Source: https://github.com/PostHog/posthog-foss/tree/main/.agents/skills/posthog-desktop
Command: npx skills add https://github.com/PostHog/posthog-foss --skill posthog-desktop

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The PostHog desktop app lives in products/desktop as a nested standalone pnpm/turbo/Biome workspace that is excluded from the monorepo's root tooling, so applying root conventions (ruff, Jest, Kea, oxlint) there produces broken code and polluted lockfiles.

Core Features & Use Cases

  • Workspace Scoping: Pins the working directory to products/desktop and swaps in its own toolchain (Biome, Vitest, Playwright, Zustand, InversifyJS) in place of monorepo defaults.
  • Boundary Contract: Defines the fixed list of root-level files that may be touched (desktop-* CI workflows, exclusion entries) and when the Django API may be edited.
  • Use Case: When asked to fix a bug in the Electron app or @posthog/agent, the skill ensures you run pnpm typecheck and pnpm lint from products/desktop instead of root commands, and keep the root lockfile byte-identical.

Quick Start

Use the posthog-desktop skill to work on the Electron desktop app in products/desktop with its own pnpm and Biome toolchain.

Frequently Asked Questions about posthog-desktop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run tests and linting for the PostHog desktop app?

Run pnpm test (Vitest), pnpm test:e2e (Playwright), pnpm lint (Biome check --write), and pnpm typecheck from the products/desktop directory. Root-level Jest, oxlint, and ruff commands do not apply to this tree.

What is the products/desktop directory in the PostHog monorepo?

It is the PostHog desktop app, an Electron plus agent framework codebase imported from the archived PostHog/code repo. It is a nested standalone workspace with its own pnpm-workspace.yaml, lockfile, Biome config, and Node 22, excluded from root tooling.

Can I edit files outside products/desktop when working on the desktop app?

Only in fixed cases: when the user explicitly asks, when a Django API the app calls must change, or for the listed desktop-* CI workflows and exclusion entries at the root. Anything else requires stopping and asking first.

Does the desktop app use the same frontend stack as the PostHog monorepo?

No. The desktop tree uses Zustand stores with InversifyJS services, @posthog/quill with Tailwind and Radix Themes, and Biome formatting. It does not use Kea logics, typegen, LemonUI, or the root Prettier setup.

Why must the root pnpm lockfile stay unchanged when editing desktop dependencies?

The desktop workspace maintains its own lockfile and is excluded from the root pnpm-workspace.yaml. Running root-level pnpm install or letting a desktop dependency change alter the root lockfile breaks the monorepo install, which must stay byte-identical.