
Integration Nextjs App Router
This walks you through integrating PostHog analytics into a Next.js App Router project with a four-step workflow that handles setup, editing, revision, and conclusion. It comes with reference docs and an example project showing the target implementation pattern. The guidance is opinionated in good ways: it pushes you toward instrumentation-client.ts for Next.js 15.3+, reminds you to use environment variables, and includes surprisingly detailed React advice about avoiding useEffect for things that aren't actually external system synchronization. If you're adding PostHog to a Next.js app and want to follow their recommended patterns without hunting through docs, this gives you a structured path.
- skills.sh installs
- 316
- GitHub stars
- 79
- last updated
- Aug 21, 2026
Install
$ npx -y skills add posthog/skills --skill integration-nextjs-app-router --agent claude-codeInstalls into .claude/skills of the current project.
Files
PostHog integration for Next.js App Router
This skill helps you add PostHog analytics to Next.js App Router applications.
Workflow
Follow these steps in order to complete the integration:
basic-integration-1.0-begin.md- PostHog Setup - Begin ← Start herebasic-integration-1.1-edit.md- PostHog Setup - Editbasic-integration-1.2-revise.md- PostHog Setup - Revisebasic-integration-1.3-conclude.md- PostHog Setup - Conclusion
Reference files
references/EXAMPLE.md- Next.js App Router example project codereferences/next-js.md- Next.js - docsreferences/identify-users.md- Identify users - docsreferences/basic-integration-1.0-begin.md- PostHog setup - beginreferences/basic-integration-1.1-edit.md- PostHog setup - editreferences/basic-integration-1.2-revise.md- PostHog setup - revisereferences/basic-integration-1.3-conclude.md- PostHog setup - conclusion
The example project shows the target implementation pattern. Consult the documentation for API details.
Key principles
Sponsors
Details
- Repository
- github.com/posthog/skills
- Category
- Frontend Development
- First seen
- Jun 3, 2026