installing-posthog-from-chat
ما الذي تفعله
تتيح هذه المهارة للوكيل إعداد PostHog في مستودع GitHub دون طرفية، باستخدام وكيل الإعداد الخاص بـ PostHog في السحابة. وهي موجهة إلى من يستخدمون أدوات المحادثة ولا يستطيعون تعديل كودهم مباشرة.
متى تستخدمها
- ✓عندما لا تستطيع تعديل كودك مباشرة، مثل في ChatGPT أو Claude على الويب، وتريد تثبيت PostHog.
- ✓عندما تريد إعداد PostHog في مستودع GitHub الخاص بك من داخل محادثة.
- ✓عندما تريد أن تصلك تغييرات الإعداد كطلب سحب تستطيع مراجعته.
رابط المهارة
https://github.com/PostHog/posthog/blob/master/products/wizard/skills/installing-posthog-from-chat/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“من فضلك ثبّت PostHog في تطبيق GitHub الخاص بي وافتح طلب سحب فيه التغييرات حتى أراجعها.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يربط الوكيل حساب GitHub الخاص بك، ويتيح لك اختيار المستودع، ثم يبدأ وكيل إعداد PostHog. ذلك الوكيل يجري تغييرات الكود ويفتح طلب سحب، وتراجعه قبل أن يصل أي شيء إلى الفرع الرئيسي.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من 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.
الأسئلة الشائعة
هل سيتغير الفرع الرئيسي فوراً؟
لا. تبقى التغييرات في طلب السحب حتى تراجعها وتدمجها.
ماذا أحتاج أن أفعل أولاً؟
تثبيت تطبيق PostHog على GitHub واختيار المستودعات التي يستطيع الوصول إليها.
ماذا لو لم يظهر مستودعي؟
على الأرجح لا يملك تطبيق GitHub صلاحية الوصول إليه، فتضيفه إلى صلاحيات المستودعات في التطبيق ثم تبحث من جديد.
التفاصيل
الوصف الأصلي من المؤلف
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
الشعبية
- نجوم GitHub
- 41k
- الترتيب
- #6978
- الترخيص
- —
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
depot-ci
41kيساعد وكيلك على إعداد سير عمل Depot CI وتشغيله، وهو بديل لـ GitHub Actions، بما في ذلك نقل سير العمل الحالي وقراءة سجلات التشغيل.
depot-container-builds
41kيساعد وكيلك على بناء صور Docker على بُنّاة Depot البعيدين، بما في ذلك الصور متعددة المنصات والدفع إلى السجلات وإصلاح أخطاء البناء.
depot-github-runners
41kيساعد وكيلك على نقل مهام GitHub Actions إلى مشغّلات Depot المُدارة، واختيار أحجامها وتسمياتها، وإصلاح مشاكل إعدادها.
editing-agents-md
41kيساعد وكيلك على تحديد ما إذا كانت القاعدة تنتمي إلى ملف AGENTS.md أو CLAUDE.md، وكتابتها بطريقة تُتَّبع دون تضخيم الملف.
مهارات مشابهة
diffs
394kيتيح لوكيلك إنتاج فرق تعديلات حقيقي يمكن مشاركته، كرابط عرض أو ملف صورة، بدلاً من ملخص مكتوب يدوياً.
coding-agent
394kيساعد وكيلك على تسليم مهمة برمجة كبيرة إلى Codex أو Claude Code أو OpenCode كعامل في الخلفية، ثم متابعة تقدمها.
gh-issues
394kيساعد وكيلك على إيجاد مشكلات GitHub واختيار ما ستعمل عليه، وفتح طلبات سحب بالإصلاحات، ومتابعة تعليقات المراجعة.