installing-posthog-in-a-codebase
Installation
SKILL.md
Installing PostHog in a codebase
Use this skill when you can read and edit the user's code.
If you can't access their code, as is common in ChatGPT on the web or Claude on the web, use installing-posthog-from-chat.
PostHog's docs are the source of truth for each SDK's setup. Init options, file locations and recommended settings change between SDK releases, so read the docs page for the framework before you write code, and follow it rather than what you remember.
1. Find the framework and read its docs
Detect the framework from the manifest files (package.json, pyproject.toml, requirements.txt, Gemfile, composer.json, go.mod, and so on) and the app's entry points.
A web app with its own backend usually needs a client SDK and a server SDK, so read both pages.