DES CAS D’USAGE D’IA À REPRENDRE.Édition française · Particuliers, indépendants, TPE
PostHog

Installation de PostHog depuis le chat

installing-posthog-from-chat

En bref

Configurez PostHog dans le dépôt GitHub d'un utilisateur depuis un chat, sans terminal. Wizard, l'agent de configuration de PostHog, fonctionne dans le cloud, ajoute le SDK et les premiers événements, et ouvre une demande de tirage. Utilisez seulement lorsque vous ne pouvez pas lire ou modifier le code de l'utilisateur, qui est commun dans les applications de chat web telles que ChatGPT sur le web ou Claude sur le Wish. Requêtes typiques : installer, ajouter ou configurer PostHog dans leur application ou dépôt, ou ouvrir une requête de tirage qui ajoute PostHog. Lorsque vous travaillez dans le dépôt de l'utilisateur, utilisez installer-posthog-in-a-codebase à la place. Couvre la connexion GitHub, la sélection du dépôt, le démarrage, le sondage et le partage de la requête de tirage.

Ce que ça fait

  • 1. Connectez GitHub
  • 2. Choisir le dépôt
  • 3. Démarrer la course

Pour qui, et un exemple

Personnes dont la tâche correspond : Configurez PostHog dans le dépôt GitHub d'un utilisateur depuis un chat, sans terminal.

Exemple de demande : « Installation de PostHog depuis le chat : Configurez PostHog dans le dépôt GitHub d'un utilisateur depuis un chat, sans terminal. »

Configurez PostHog dans le dépôt GitHub d'un utilisateur depuis un chat, sans terminal. Exemple rédigé par iadujour.fr à partir du SKILL.md, non testé.

Installer

Claude Code : /plugin marketplace add PostHog/skills, puis /plugin install posthog-all@posthog-skills (README).

/plugin marketplace add PostHog/skills
/plugin install posthog-all@posthog-skills

Fonctionne avec

  • Claude Code

Source : README : marketplace Claude Code `/plugin marketplace add PostHog/skills`. D’autres agents ne sont pas nommés.

Niveau : Avancé

S’adresse à un usage avancé (sécurité, production, architecture ou réglages fins) décrit dans le SKILL.md.

À savoir

Dépôt officiel PostHog (github.com/PostHog/skills). Skills pour l’analytique produit, les indicateurs de fonctionnalité, le suivi d’erreurs et les workflows d’équipe.

Extrait du SKILL.md

La description d’origine, celle que l’agent lit pour décider de charger la skill (en anglais) :

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, w […]

Citée depuis le SKILL.md au commit 445764b .

Le SKILL.md compte 72 lignes et 5 sections principales :

  • 1. Connect GitHub
  • 2. Pick the repository
  • 3. Start the run
  • 4. Poll the run
  • 5. Share the result

Licence : MIT

Consultée le 13 novembre 2026 : fichier de licence du dépôt.

La licence autorise la reprise : le texte intégral du SKILL.md est reproduit ci-dessous, sans modification, avec sa mention de licence.

Texte intégral du SKILL.md

Reproduit sans modification depuis PostHog/skills (commit 445764b) , © PostHog, sous licence MIT (fichier de licence d’origine ).

Afficher le SKILL.md original (72 lignes, en anglais)
---
name: installing-posthog-from-chat
description: >-
  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, polling it, and sharing the pull request.
---

# 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.

1. Call `integrations-list` and look for an integration with kind `github`.
2. 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 call `integrations-list` again.

## 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`: the `owner/name` from 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_step` to the user when it changes. It is written to be passed on as is.
- Mention progress from `tasks` when it helps, but don't send an update on every poll.
- Stop polling when `status` is `completed`, `failed`, or `cancelled`.

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

- `completed` with `pull_request_url`: share the link. Say the user should review the changes and merge the pull request to finish setting up PostHog.
- `completed` without `pull_request_url`: the setup agent changed nothing, often because PostHog is already set up. Relay `next_step`.
- `failed`: relay `next_step` and `error_message`. Offer to start a new run when `next_step` suggests one.
Source. Fiche rédigée par iadujour.fr à partir de : Frontmatter, sections et corps du SKILL.md, README du dépôt. Consultée le 13 novembre 2026. PostHog/skills .
ÉCHANGES

Commentaires.

Un retour d’expérience, une question, une précision sur cette skill ? Les commentaires sont relus avant publication.

Commentaires publiés

Chargement des commentaires…

    Laisser un commentaire

    Charte de modération. Chaque commentaire est relu avant publication. Sont refusés : l’incitation à la haine, les propos injurieux ou discriminatoires, la publicité, le spam et les liens promotionnels, le hors-sujet et les données personnelles d’autrui.