一键导入
integration-nextjs-app-router
PostHog integration for Next.js App Router applications
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
PostHog integration for Next.js App Router applications
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Morning triage of production app errors. Pulls the last ~24h of errors from PostHog error tracking and the prod Supabase database (api_request_log + failed *_runs rows), groups them, root-causes each against the codebase, and produces a prioritized report with proposed fixes. Use when asked to analyze app errors, run the morning error review, or find out what broke overnight.
Commit all working-tree changes in logical units, push the branch, open a PR, wait for checks, and merge to main when green and conflict-free. Use when the user wants to ship the current branch end-to-end (e.g. "ship it", "commit and merge", "get this into main").
Stdlib-only Python CLI for managing Calyflow's Stripe catalog (products, prices, webhooks) with a mandatory account guard. Use when provisioning or verifying Stripe products/prices/webhook endpoints for Calyflow, or when setting the STRIPE_PRICE_* env vars for a new Stripe account.
Apply Supabase database migrations to the local dev database. Use when asked to apply, run, or push a migration locally, after adding a file under supabase/migrations/, or when the local DB schema is behind the migration files. Local-only — never touches prod.
Launch the Calyflow Next.js app locally and drive it. Use when asked to run, start, serve, or screenshot the app, or to confirm a change works in the running app. Handles copying .env.local into a git worktree before starting the dev server.
Create a new git worktree branched from main and switch the session into it. Use when the user asks to start a worktree, work in a worktree, or spin up an isolated checkout for a task.
| name | integration-nextjs-app-router |
| description | PostHog integration for Next.js App Router applications |
| metadata | {"author":"PostHog","version":"1.22.0"} |
This skill helps you add PostHog analytics to Next.js App Router applications.
Follow these steps in order to complete the integration:
references/1-begin.md - PostHog Setup - Begin ← Start herereferences/2-edit.md - PostHog Setup - Editreferences/3-revise.md - PostHog Setup - Revisereferences/4-conclude.md - PostHog Setup - Conclusionreferences/EXAMPLE.md - Next.js App Router example project codereferences/1-begin.md - Start the event tracking setup process by analyzing the project and creating an event tracking planreferences/2-edit.md - Implement PostHog event tracking in the identified files, following best practices and the example projectreferences/3-revise.md - Review and fix any errors in the PostHog integration implementationreferences/4-conclude.md - Review and fix any errors in the PostHog integration implementationreferences/next-js.md - Next.js - docsreferences/identify-users.md - Identify users - docsThe example project shows the target implementation pattern. Consult the documentation for API details.
Identify users during login and signup events. Refer to the example code and documentation for the correct identify pattern for this framework. If both frontend and backend code exist, pass the client-side session and distinct ID using X-POSTHOG-DISTINCT-ID and X-POSTHOG-SESSION-ID headers to maintain correlation.
Add PostHog error tracking to relevant files, particularly around critical user flows and API boundaries.