Installing Posthog From Chat
PostHogOfficialPublished by PostHog
- Skill
- Workflow
- Data and AI
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured workflow for AI agents to install PostHog into a user's GitHub repository directly from a chat interface. It leverages the Wizard setup agent to perform cloud-based operations, including SDK integration and event configuration, culminating in the creation of a pull request. This approach is designed for environments where the agent lacks direct access to the user's local codebase, such as web-based chat platforms.
What it does
- Connects the user's GitHub account to the PostHog project.
- Searches for and selects the target repository for installation.
- Initiates the automated setup agent in the cloud.
- Monitors the installation progress through status polling.
- Provides the user with a pull request link for final review and merging.
When to use it
- When a user requests to add or set up PostHog in their repository.
- When you do not have direct read or edit access to the user's local code.
- When the user prefers an automated pull request over manual configuration.
Advantages
- Enables setup without requiring a local terminal or environment configuration.
- Maintains safety by using pull requests for all code changes.
- Provides clear status updates throughout the automated installation process.
- Handles common integration errors with actionable user guidance.
Usage examples
- “Can you add PostHog to my project?”
- The agent will guide the user through connecting their GitHub account, selecting the repository, and initiating the automated setup process.
- “I want to install PostHog in my web app repository.”
- The agent will search for the specified repository and trigger the Wizard to open a pull request containing the necessary SDK and event code.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/posthog/installing-posthog-from-chat/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip installing-posthog-from-chat.zip -d .agents/skills
Documentation by PostHog
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.
Files
- ATTRIBUTION.mdAdded by AutoGineer875 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md4.5 KiB
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- PostHog
- Publisher
- PostHog (Official)
- Source
- PostHog/skills · skills/omnibus/installing-posthog-from-chat · commit a5d30e7
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by PostHog or PostHog.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download installing-posthog-from-chat.zip