
PostHog Desktop
FreeStreamline your workflow for PostHog's Electron app.
Free · Opens the source repo
What PostHog Desktop does
The PostHog Desktop skill is designed specifically for developers working on the PostHog desktop application, which is built using Electron and the agent framework. This skill provides a scoped environment that pins the working directory to products/desktop, ensuring that all commands are executed within the context of the desktop application. This is crucial for maintaining the integrity of the workspace as it operates independently from the root monorepo, which includes various other components of PostHog.
When using this skill, developers will benefit from a tailored toolchain that replaces the standard monorepo tools with those specific to the desktop application. This includes commands for installation, development, building, type-checking, linting, and testing, all of which are designed to work seamlessly within the products/desktop directory. The skill also emphasizes the importance of adhering to the unique architecture and style guidelines outlined in the AGENTS.md document, which serves as the primary reference for development practices in this workspace.
One of the key features of this skill is its strict scope contract, which prevents developers from inadvertently accessing or modifying files outside of the designated directory unless explicitly instructed. This minimizes the risk of introducing errors or inconsistencies that could arise from mixing conventions or dependencies from other parts of the PostHog codebase. Additionally, the skill includes guidance on how to handle interactions with the Django API, ensuring that any necessary changes are managed correctly and efficiently.
Overall, the PostHog Desktop skill is an essential tool for developers focused on enhancing the PostHog desktop application. It provides a structured environment that fosters best practices and maintains the integrity of the codebase, making it easier to contribute effectively to the project.
When to use it
Use this skill when developing or testing features for the PostHog desktop application, ensuring that you are working within the correct environment.
When not to use it
This skill is not suitable for general PostHog development outside of the desktop application, as it is specifically tailored for that context.
What you can build with it
Developing New Features
When adding new features to the PostHog desktop app, use this skill to ensure you are working within the correct environment.
Testing Desktop Functionality
Utilize this skill to run tests specific to the PostHog desktop application without interference from other components.
Integrating Backend Changes
When backend API changes are required, this skill helps manage the necessary adjustments while keeping the desktop app's integrity intact.
How to install PostHog Desktop
View source1. Install with the skills CLI
npx skills add posthog/posthog/posthog-desktop --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by posthogWorking in products/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.
Scope contract
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:
- The user explicitly tells you to.
- A backend API the app calls needs to change. The client is
packages/api-client/; the endpoints it hits live in the Django monorepo (see below). - Desktop CI / config that lives at the root by design. The list is fixed — see
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 inpnpm-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.
Toolchain — root CLAUDE.md does not apply here
| 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.
What still applies from the root
- Conventional commits and PR titles;
scopeofdesktop(e.g.fix(desktop/$feature): ...). .github/pull_request_template.mdstructure, including the Agent context section.- Public-repo copy safety: no customer names, internal incidents, or Slack quotes.
- Merging:
gh pr merge <number> --squashintomaster.AGENTS.md"Merging PRs" andproducts/desktop/.claude/skills/merging-prs/are stale — they describe the PostHog/code Trunk queue againstmain, which does not exist here.products/desktop/POST-MIGRATION.mdhas the correct flow. hogli ci:preflighton push (pre-push hook) still runs repo-wide.
Cross-boundary: the Django API
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:
- Read the Django side to get the contract right; that is in scope without asking.
- Editing it is a separate, monorepo-side change: root CLAUDE.md rules apply again
(
/improving-drf-endpoints,/django-migrations, serializerhelp_text,hogli build:openapi). - Keep the two sides in one PR only if they must ship together; otherwise land the backend first.
- Wiring the app at a local Django instance (OAuth app, RSA keys, flags) is
products/desktop/docs/LOCAL-DEVELOPMENT.md.
Resync hazard
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.
Desktop-local skills
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.
Before reporting done
pnpm typecheckandpnpm lintfromproducts/desktop/, pluspnpm testfor touched packages.- After touching
packages/core:biome lint packages/core, zeronoRestrictedImports. - After touching
@posthog/platform: rebuild or typecheck itsdist/. - After moving logic out of
apps/code:node scripts/check-host-boundaries.mjs --prune. - Confirm the diff touches nothing outside
products/desktop/— or name what it touches and why.
Frequently asked questions about PostHog Desktop
Similar skills
Playwright Component Testing
Test React and Vue components in isolation with Playwright.
Fluent UI Blazor
Integrate Fluent UI components in Blazor applications effortlessly.
Build MCP App
Create interactive UI widgets for MCP servers.
Web Design Reviewer
Identify and fix design issues in websites efficiently.
Markstream Install
Seamlessly integrate Markstream for Markdown rendering.
GSAP & Framer Scroll Animation
Create advanced scroll animations effortlessly.
