PostHog Integration for TanStack Router
Automate repetitive workflows and reduce manual effort
Example: Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example: Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example: Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
Time estimate: 15-45 minutes depending on use case complexity
Prerequisites
Submit your Claude Code skill and start earning
epx add PostHog/skills --skill integration-react-tanstack-router-file-basedCompatible with
Supported agents
Initialize PostHogProvider in the root route file to ensure global access to the analytics client across all child routes.
Use TanStack Router navigation events for pageview tracking and event handlers for user actions instead of useEffect hooks.
Identify users during authentication flows and pass session headers to maintain correlation between frontend and backend events.
| name | integration-react-tanstack-router-file-based |
| description | >- PostHog integration for React applications using TanStack Router with file-based routing |
| metadata | author: PostHog version: 1.9.4 |
This skill helps you add PostHog analytics to React with TanStack Router (file-based) applications.
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 - Conclusionreferences/EXAMPLE.md - React with TanStack Router (file-based) example project codereferences/tanstack-start.md - Tanstack start - 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 - conclusionThe 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.
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionintegration-react-tanstack-router-file-basedExecute the skills CLI command in your project's root directory to begin installation:
epx add PostHog/skills --skill integration-react-tanstack-router-file-basedFetches integration-react-tanstack-router-file-based from PostHog/skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
.cursor/skills/integration-react-tanstack-router-file-based
Restart Cursor to activate integration-react-tanstack-router-file-based. Access via /integration-react-tanstack-router-file-basedin your agent's command palette.
Learn more:View source on GitHubSkills CLI docsAbout CursorWhat are agent skills?
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
logs-datadog
PostHog/skills · PostHog · same repo
feature-flags-react-native
PostHog/skills · PostHog · same repo
omnibus-instrument-error-tracking
PostHog/skills · PostHog · same repo
error-tracking-react
PostHog/skills · PostHog · same repo
feature-flags-flutter
PostHog/skills · PostHog · same repo
feature-flags-php
PostHog/skills · PostHog · same repo
Useful defaults in integration-react-tanstack-router-file-based — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
Useful defaults in integration-react-tanstack-router-file-based — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
integration-react-tanstack-router-file-based has been reliable in day-to-day use. Documentation quality is above average for community skills.
integration-react-tanstack-router-file-based is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
Solid pick for teams standardizing on skills: integration-react-tanstack-router-file-based is focused, and the summary matches what you get after install.
We added integration-react-tanstack-router-file-based from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
integration-react-tanstack-router-file-based reduced setup friction for our internal harness; good balance of opinion and flexibility.
integration-react-tanstack-router-file-based has been reliable in day-to-day use. Documentation quality is above average for community skills.
integration-react-tanstack-router-file-based reduced setup friction for our internal harness; good balance of opinion and flexibility.
Keeps context tight: integration-react-tanstack-router-file-based is the kind of skill you can hand to a new teammate without a long onboarding doc.
showing 1-10 of 66