installing-posthog-from-chat
What it does
This skill lets an agent set up PostHog in a GitHub repository without a terminal, using PostHog's setup agent in the cloud. It is for people who use chat tools and cannot edit their own code directly.
When to use it
- ✓When you cannot edit your code directly, such as in ChatGPT or Claude on the web, and want PostHog installed.
- ✓When you want PostHog set up in your GitHub repository from a chat.
- ✓When you want the setup changes delivered as a pull request you can review.
Skill link
https://github.com/PostHog/posthog/blob/master/products/wizard/skills/installing-posthog-from-chat/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Please install PostHog in my GitHub app and open a pull request with the changes so I can review them.”
5 new skills a week. 1 minute to read.
How it works
The agent connects your GitHub account, lets you pick the repository, and starts PostHog's setup agent. That agent makes the code changes and opens a pull request, which you review before anything reaches your main branch.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Installing PostHog from chat
Wizard is PostHog's setup agent. With wizard-install-start it runs in a cloud workspace on a GitHub repository, makes the code changes, and opens a pull request. The user reviews and merges that pull request. Nothing changes on their default branch until they do.
Work through the steps in order. Skip a step when its outcome is already known from the conversation.
1. Connect GitHub
The run uses the project's GitHub connection, so the project needs one.
- Call
integrations-listand look for an integration with kindgithub. - When there is none, give the user this link, built from the base URL and project ID in your context:
<base URL>/integrations/connect/github/?project_id=<project id>&connect_from=mcp. They install the PostHog GitHub App and choose which repositories it can access. Wait until they say they are done, then callintegrations-listagain.
2. Pick the repository
Call integrations-github-repos-retrieve with the GitHub integration's ID. Use search when the user named the repository, and page with offset when has_more is true.
- One clear match: confirm it with the user in one line.
- Several matches: list them and ask which one.
- No match: the GitHub App cannot access it. Ask the user to add the repository to the app's repository access in GitHub, then search again.
Pass the repository as full_name (owner/name).
The setup agent works at the repository root. If the user describes a monorepo where the app lives in a subdirectory, tell them the run may not find it, and offer to try anyway.
3. Start the run
Call wizard-install-start with:
repository: theowner/namefrom step 2.branch: only when the user wants a branch other than the default one. The pull request targets that branch.idempotency_key: a fresh unique value for this request. Reuse the same value if you retry after a network error, so the retry returns the same run.
Errors the user can act on:
| Error code | What to do |
|---|---|
github_not_connected |
Go back to step 1. |
repository_not_accessible |
Ask the user to add the repository to the PostHog GitHub App, then retry with a new idempotency_key. |
run_already_active |
The user already has a run in progress in this project. Ask them to wait for it, or check it in PostHog. |
| HTTP 429 | The user reached the hourly or daily limit for setup runs. Relay the message. Don't retry right away. |
Tell the user the run started and share the url from the response, where they can follow it in PostHog.
4. Poll the run
Call wizard-install-status with the run_id about every 30 seconds while status is created or running. A run usually takes several minutes.
- Relay
next_stepto the user when it changes. It is written to be passed on as is. - Mention progress from
taskswhen it helps, but don't send an update on every poll. - Stop polling when
statusiscompleted,failed, orcancelled.
When the client cannot wait that long in one turn, tell the user the run is in progress and check again when they come back.
5. Share the result
completedwithpull_request_url: share the link. Say the user should review the changes and merge the pull request to finish setting up PostHog.completedwithoutpull_request_url: the setup agent changed nothing, often because PostHog is already set up. Relaynext_step.failed: relaynext_stepanderror_message. Offer to start a new run whennext_stepsuggests one.
FAQ
Will my main branch change right away?
No. Changes stay in the pull request until you review and merge them.
What do I need to do first?
Install the PostHog GitHub App and choose which repositories it can access.
What if my repository does not show up?
The GitHub App probably lacks access to it, so you add it to the app's repository access and then search again.
Details
Original description by the author
Set up PostHog in a user's GitHub repository from a chat, without a terminal. Wizard, PostHog's setup agent, runs in the cloud, adds the SDK and first events, and opens a pull request. Use only when you can't read or edit the user's code, which is common in web chat apps such as ChatGPT on the web or Claude on the web. Typical requests: install, add, or set up PostHog in their app or repository, or open a pull request that adds PostHog. When you're working in the user's repository, use installing-posthog-in-a-codebase instead. Covers connecting GitHub, picking the repository, starting the run,
repo: PostHog/posthog
Popularity
- GitHub stars
- 41k
- Ranking position
- #6978
- License
- —
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
depot-ci
41kHelps your agent set up and run Depot CI workflows, a GitHub Actions alternative, including migrating existing workflows and reading run logs.
depot-container-builds
41kHelps your agent build Docker images on Depot's remote builders, including multi-platform images, pushing to registries, and fixing build failures.
depot-github-runners
41kHelps your agent move GitHub Actions jobs to Depot-managed runners, choosing runner sizes and labels, and troubleshooting runner setup issues.
editing-agents-md
41kHelps your agent decide whether a rule belongs in an AGENTS.md or CLAUDE.md file, and write it so it sticks without bloating the file.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.