PostHog/skills▌
91 approved skills in this repository
integration-tanstack-start
PostHog
### PostHog Integration for TanStack Start - Initialize PostHog in the root route using PostHogProvider and use posthog-node for server-side event capture in API routes. - Follow the four-step integration workflow and match the implementation patterns provided in the example project. - Use event handlers for analytics capture and user identification, avoiding useEffect for state-driven logic or event tracking.
integration-react-native
PostHog
### PostHog React Native Integration - Install posthog-react-native and react-native-svg, then wrap your app with PostHogProvider inside the NavigationContainer. - Use react-native-config to securely load POSTHOG_PROJECT_TOKEN and POSTHOG_HOST from environment variables at build time. - Identify users during login and signup, using custom headers to maintain session correlation between frontend and backend.
signals
PostHog
### Querying PostHog Signals - Use the `document_embeddings` table with mandatory filters for `model_name`, `product`, `document_type`, and a `timestamp` range. - Always deduplicate results using `argMax(column, inserted_at)` grouped by `document_id` to handle soft-deleted or updated records. - Perform semantic searches using `cosineDistance` combined with the `embedText` function for natural language queries.
instrument-feature-flags
PostHog
### Instrument PostHog Feature Flags - Detect the project platform and verify PostHog SDK installation, initializing it if necessary using environment variables. - Search for or create feature flags via PostHog MCP tools or the dashboard to define rollout strategies and targeting conditions. - Implement feature flag checks using platform-specific patterns, prioritizing server-side evaluation to prevent UI flickering.
logs-nodejs
PostHog
### PostHog Node.js Log Integration - Configure OpenTelemetry OTLP exporters to send log data directly to the PostHog ingestion endpoint. - Use environment variables for all sensitive configuration, including PostHog keys and OTLP endpoints. - Implement structured logging with key-value properties to enhance searchability and analysis within the PostHog platform.
integration-ruby
PostHog
### PostHog Ruby Integration - Install the posthog-ruby gem and initialize the client using environment variables for API keys and host configuration. - Use client.capture and client.identify with hash arguments, but use positional arguments for client.capture_exception. - Ensure client.shutdown is called before script exit to prevent event loss, ideally within an ensure block for proper cleanup.
logs-python
PostHog
### logs-python Overview - PostHog logs for Python - This skill helps you add PostHog log ingestion to Python applications. - `references/python.md` - Python logs installation - docs
integration-fastapi
PostHog
### PostHog FastAPI Integration - Initialize the Posthog client within the FastAPI lifespan context manager and ensure proper shutdown to flush all pending events. - Use dependency injection for settings and user identification, ensuring PII is only sent via identify calls, never in capture events. - Follow the provided example project patterns and use environment variables for API keys to maintain secure and consistent tracking.
omnibus-instrument-logs
PostHog
### omnibus-instrument-logs Overview - >- - Use this skill to add PostHog log capture for new or changed code. Use it after implementing features or reviewing PRs to ensure meaningful - Supported platforms: Next.js, Node.js, Python, Go, Java, Datadog, and any language via OpenTelemetry.
integration-react-react-router-7-framework
PostHog
### PostHog Integration for React Router v7 - Follow the four-step setup workflow to integrate PostHog analytics into React Router v7 Framework mode applications. - Use environment variables for API keys and implement analytics capture directly within event handlers rather than useEffect hooks. - Identify users during authentication and maintain session correlation by passing distinct IDs via headers for cross-boundary tracking.
integration-django
PostHog
### PostHog Django Integration - Install the posthog package and initialize the client in AppConfig.ready() using environment variables for API keys and host settings. - Add PosthogContextMiddleware to your Django middleware and use the instance-based Posthog() constructor with exception autocapture. - Use set() or identify_context() for user identification, ensuring PII is excluded from capture() event properties to maintain privacy.
integration-sveltekit
PostHog
### PostHog SvelteKit Integration - Follow the four-step setup workflow to integrate PostHog analytics into your SvelteKit application. - Use environment variables for API keys and ensure paths.relative is set to false in svelte.config.js for session replay support. - Identify users during authentication and use custom headers to maintain session correlation between frontend and backend.
instrument-product-analytics
PostHog
### Instrument Product Analytics - Detect project framework and install the appropriate PostHog SDK using the project's native package manager. - Initialize the SDK and implement event tracking for key user actions, ensuring server-side events are captured where applicable. - Use environment variables for API keys and add identify calls during authentication to maintain consistent user tracking.
omnibus-instrument-integration
PostHog
### omnibus-instrument-integration Overview - >- - Use this skill to add the PostHog SDK to an application. Use it when setting up PostHog for the first time, or reviewing PRs that need PostH - Supported frameworks: Next.js, React, React Router, Vue, Nuxt, TanStack Start, SvelteKit, Astro, Angular, Django, Flask, FastAPI, Laravel, R
feature-flags-nodejs
PostHog
### PostHog Feature Flags for Node.js - Integrate PostHog flags into Node.js apps using environment variables for keys and server-side evaluation to prevent UI flickering. - Implement flags alongside existing logic with minimal code changes, defaulting to boolean checks unless multivariate flags are required. - Utilize connected PostHog MCP tools to programmatically create, list, update, or delete flags directly from your development environment.
feature-flags-python
PostHog
### PostHog Python Feature Flags - Use the Posthog() class constructor with enable_exception_autocapture=True and avoid hardcoding keys by using environment variables. - Implement server-side flag evaluation to prevent UI flicker and always call posthog.shutdown() or use atexit to flush events on exit. - Never include PII in capture() event properties; use set() or identify_context() to manage person properties instead.
omnibus-instrument-feature-flags
PostHog
### omnibus-instrument-feature-flags Overview - >- - Use this skill to add PostHog feature flags that gate new or changed functionality. Use it after implementing features or reviewing PRs to e - Supported platforms: React, Next.js, React Native, Web (JavaScript), Node.js, Python, PHP, Ruby, Go, Java, Rust, .NET, Elixir, Android, iOS,
instrument-llm-analytics
PostHog
### PostHog LLM Analytics Instrumentation - Detect the LLM stack and install the PostHog SDK if not already present, using environment variables for all configuration keys. - Instrument LLM calls to capture essential metrics including token counts, model names, latency, and costs for every generation. - Utilize provider-specific reference files for framework-accurate callbacks or fallback to manual capture for unsupported integrations.
omnibus-instrument-llm-analytics
PostHog
### PostHog LLM Analytics Instrumentation - Detect the LLM stack and existing PostHog setup to determine if SDK installation or specific provider-based tracing is required. - Instrument LLM calls to capture essential metrics including token counts, latency, model names, and costs for every generation. - Use environment variables for API keys and associate generations with user IDs while keeping code modifications minimal and targeted.
integration-react-tanstack-router-file-based
PostHog
### PostHog Integration for TanStack Router - 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.
integration-swift
PostHog
### PostHog Swift Integration - Configure PostHog using environment variables for project tokens and hosts, ensuring they are set within the Xcode scheme settings. - Add SPM dependencies by creating unique PBXBuildFile, XCSwiftPackageProductDependency, and XCRemoteSwiftPackageReference objects. - Enable outgoing network connections in macOS App Sandbox settings and use headers to maintain user correlation across client sessions.
cleaning-up-stale-feature-flags
PostHog
### Cleaning up stale feature flags - Identify stale flags using the PostHog API, filtering for unused or fully rolled-out configurations that are at least 30 days old. - Assess candidates by checking for experiment associations and dependencies, then present a summary to the user for explicit approval. - Disable flags before deletion to ensure safety, then provide tailored code cleanup instructions based on the flag's rollout state.
integration-vue-3
PostHog
### PostHog Vue 3 Integration - Follow the four-step setup workflow to initialize PostHog analytics within your Vue 3 application. - Use environment variables for API keys and maintain consistency by following the provided example project patterns. - Identify users during authentication events and use specific headers to correlate client-side sessions with backend data.
omnibus-instrument-product-analytics
PostHog
### PostHog Product Analytics Integration - Detects the project framework and installs the appropriate PostHog SDK while maintaining existing code structures. - Implements targeted event tracking for key user actions, conversion funnels, and server-side operations using environment variables. - Configures user identification during authentication flows and adds exception tracking to monitor critical application errors.
feature-flags-go
PostHog
### PostHog Feature Flags for Go - Integrate PostHog flags using environment variables for API keys to ensure security and avoid hardcoding credentials. - Implement server-side flag evaluation to maintain performance and prevent UI flickering in your Go applications. - Utilize available PostHog MCP tools to programmatically manage, list, and update flags directly from your development environment.
tools-and-features-hogql
PostHog
### HogQL Query Development - Use properties.$name for event data and person.properties.$name for person attributes, utilizing bracket notation for special characters. - Include the {filters} placeholder in WHERE clauses to enable dynamic UI-based filtering and dashboard date range integration. - Optimize performance by using uniq() instead of count(distinct) and always include a timestamp-based filter to limit data scans.
auditing-experiments-flags
PostHog
### Auditing PostHog Experiments and Flags - Perform configuration audits using read_data and list_data to identify staleness, misconfigurations, and best-practice violations. - Categorize findings by severity (CRITICAL, WARNING, INFO) and provide actionable remediation steps for each identified issue. - Use inline markdown for single-entity checks and create notebook artifacts for comprehensive audits exceeding five entities.
logs-go
PostHog
### PostHog Go Logging Integration - Integrate PostHog log ingestion into Go applications using the OpenTelemetry protocol and OTLP exporters. - Use environment variables for PostHog keys and endpoints; never hardcode sensitive configuration data. - Implement structured logging with key-value properties and export logs alongside existing systems without restructuring code.
instrument-integration
PostHog
### PostHog SDK Integration - Detect the project framework and language via dependency files to select the appropriate reference guide for SDK installation. - Initialize the SDK using environment variables for API keys and implement user identification during login and signup events. - Follow framework-specific patterns for provider setup and ensure code consistency by matching existing project naming conventions.
logs-nextjs
PostHog
### PostHog Logging for Next.js - Integrate PostHog log ingestion into Next.js applications using the OpenTelemetry protocol and OTLP exporters. - Utilize environment variables for all PostHog keys and endpoints to ensure security and avoid hardcoding sensitive data. - Implement structured logging with key-value properties and initialize via instrumentation.ts for optimal framework compatibility.
exploring-llm-clusters
PostHog
### Exploring LLM Clusters - Identify usage patterns by analyzing AI/LLM traffic clusters generated via embedding similarity and Temporal workflows. - Use SQL queries to retrieve cluster metadata, compute cost and latency metrics, and identify high-error or high-cost traffic segments. - Drill into specific traces using trace IDs to inspect representative samples and verify AI-generated cluster descriptions.
instrument-error-tracking
PostHog
### PostHog Error Tracking Integration - Detect the project platform and framework to install the appropriate PostHog SDK and configure environment variables securely. - Enable exception autocapture for global monitoring and add manual capture calls to specific error boundaries and catch blocks. - Configure source map uploads for frontend and mobile projects to ensure stack traces resolve to readable, original source code.
instrument-logs
PostHog
### PostHog Log Instrumentation - Detect the platform and existing logging setup to determine if OTLP exporter configuration is required. - Install OpenTelemetry SDKs and configure the OTLP exporter to send logs to PostHog using environment variables. - Integrate PostHog alongside existing logging handlers and ensure all logs include structured key-value properties for search.
integration-astro-static
PostHog
### PostHog Integration for Static Astro - Initialize PostHog by creating a reusable posthog.astro component and importing it into your site's main layout. - Use the is:inline directive on script tags and prefix client-side environment variables with PUBLIC_ to ensure proper functionality. - Identify users during authentication events and maintain session correlation by passing distinct IDs via custom request headers.
feature-flags-dotnet
PostHog
### feature-flags-dotnet Overview - PostHog feature flags for .NET applications - This skill helps you add PostHog feature flags to .NET applications. - `references/dotnet.md` - .net feature flags installation - docs
integration-flask
PostHog
### PostHog Flask Integration - Initialize the Posthog client globally in create_app() using the instance-based constructor with enable_exception_autocapture=True. - Use posthog_client.set() to manage person properties and ensure atexit.register() is used to flush events before application shutdown. - Protect user privacy by never including PII in capture() event properties; use identify() patterns for user-specific data instead.
logs-datadog
PostHog
### PostHog Log Integration for Datadog - Configure OTLP exporters to send logs to PostHog's ingest endpoint using the OpenTelemetry protocol. - Use environment variables for all PostHog keys and endpoints to ensure security and avoid hardcoding sensitive credentials. - Implement structured logging with key-value properties instead of plain text to improve searchability and data analysis.
integration-expo
PostHog
### PostHog Expo Integration - Use expo-constants to securely manage PostHog project tokens and host URLs via app.config.js instead of hardcoding values. - Install posthog-react-native and the required react-native-svg peer dependency to enable analytics and survey features. - Wrap the application with PostHogProvider and implement manual screen tracking within your router or navigation layout files.
integration-angular
PostHog
### PostHog Integration for Angular - Create a singleton PosthogService using inject() to wrap the SDK and manage analytics across standalone components. - Store PostHog credentials in environment.ts files and avoid hardcoding keys directly into the application source code. - Identify users during authentication and pass session headers to maintain data correlation between frontend and backend services.
llm-analytics-setup
PostHog
### PostHog LLM Analytics Integration - Integrate PostHog analytics into any LLM application using provider-specific guides or the manual capture fallback for custom setups. - Capture essential metrics including input/output tokens, model names, latency, and costs while ensuring PII is never sent in events. - Use the instance-based Posthog() constructor, enable exception autocapture, and call shutdown() to ensure all events are flushed.
integration-python
PostHog
### PostHog Python Integration - Install the posthog package and initialize the Posthog() class with enable_exception_autocapture=True for automatic error tracking. - Use environment variables for API keys and register posthog_client.shutdown with atexit to ensure all events are flushed on exit. - Identify users via set() for person properties and never include PII like emails or names within capture() event properties.
analyzing-experiment-session-replays
PostHog
### Analyzing Experiment Session Replays - Retrieve experiment metadata and variant keys from the feature flag to ensure accurate filtering for each test group. - Construct session recording filters using the $feature_flag_called event and the specific $feature/<flag_key> property for each variant. - Compare session duration, activity metrics, and navigation paths across variants to provide qualitative insights on user behavior.
query-examples
PostHog
### PostHog HogQL Query Reference - Access comprehensive schema documentation for core system models including cohorts, feature flags, error tracking, and data warehouse. - Utilize a library of optimized analytical query templates for trends, funnels, retention, user paths, and LLM trace analysis. - Reference HogQL-specific syntax, available functions, and extensions for advanced data manipulation and session replay analysis.
integration-android
PostHog
### PostHog Android Integration - Initialize PostHog in the Application class onCreate method using environment variables for keys to ensure secure, early configuration. - Follow the provided example project patterns and ensure every activity includes an android:label for accurate screen view tracking. - Identify users during login and signup, passing session and distinct ID headers to maintain correlation across frontend and backend.
integration-react-vite
PostHog
### PostHog Integration for React and Vite - Follow the four-step workflow to initialize, configure, and finalize PostHog analytics within your React application. - Use environment variables for API keys and implement analytics capture directly within event handlers rather than useEffect hooks. - Identify users during authentication and maintain session correlation by passing distinct IDs via headers in API requests.
feature-flags-php
PostHog
### PostHog PHP Feature Flags - Install the posthog/posthog-php SDK and initialize it once using PostHog::init() with environment variables for API keys. - Implement server-side flag checks to prevent UI flickering, defaulting to boolean flags unless multivariate logic is required. - Use PostHog MCP tools to manage flags directly and ensure all SDK methods utilize associative arrays for distinct IDs and properties.
integration-nextjs-app-router
PostHog
### PostHog Integration for Next.js App Router - Initialize PostHog using instrumentation-client.ts and secure all API keys using environment variables. - Trigger analytics events directly within user action handlers rather than using useEffect hooks. - Identify users during authentication and maintain session correlation by passing distinct IDs via custom request headers.
logs-java
PostHog
### PostHog Java Log Ingestion - Integrate PostHog log ingestion into Java applications using the OpenTelemetry protocol and OTLP exporters. - Use environment variables for PostHog keys and endpoints instead of hardcoding sensitive configuration data. - Implement structured logging with key-value properties and add log export alongside existing logging infrastructure.
integration-react-react-router-7-data
PostHog
### PostHog Integration for React Router v7 - Follow the four-step setup workflow to integrate PostHog analytics into Data mode applications. - Use environment variables for keys and mirror the implementation patterns found in the provided example project. - Trigger analytics in event handlers, avoid useEffect for state logic, and use specific headers to maintain user identification.
integration-ruby-on-rails
PostHog
### PostHog Ruby on Rails Integration - Install the posthog-rails gem and use PostHog.init in an initializer to manage the client lifecycle automatically. - Securely store API keys using environment variables or Rails credentials instead of hardcoding them in your application. - Use class-level PostHog.capture and PostHog.identify methods to track events and associate users across backend and background jobs.
feature-flags-ruby
PostHog
### PostHog Feature Flags for Ruby - Install the posthog-ruby gem and initialize the client using environment variables for API keys to ensure secure configuration. - Implement server-side flag evaluation to prevent UI flickering and use boolean flags as the default for simple feature toggling. - Always call client.shutdown in an ensure block for scripts and CLIs to prevent data loss and ensure proper event flushing.
error-tracking-node
PostHog
### PostHog Node.js Error Tracking - Initialize the SDK with enableExceptionAutocapture set to true and use environment variables for all sensitive configuration keys. - Implement captureException in global error handlers and specific catch blocks to ensure comprehensive visibility into application failures. - Upload source maps to resolve stack traces and configure flush settings to match the lifecycle of your server or serverless process.
logs-other
PostHog
### PostHog Log Ingestion for Other Languages - Configure OTLP exporters to send logs directly to PostHog's ingestion endpoint using the OpenTelemetry protocol. - Use environment variables for all sensitive configuration, including PostHog project keys and OTLP endpoints. - Implement structured logging with key-value pairs to enhance searchability without replacing existing application logging logic.
integration-react-tanstack-router-code-based
PostHog
### PostHog Integration for TanStack Router - Initialize PostHogProvider in the root route to ensure global access to the analytics client across all child routes. - Track pageviews using TanStack Router navigation events and capture user actions directly within event handlers, avoiding useEffect. - Identify users during authentication and maintain session correlation by passing distinct IDs via headers in API requests.
integration-nuxt-3.6
PostHog
### PostHog Integration for Nuxt 3.6 - Follow the four-step setup workflow to initialize PostHog analytics within your Nuxt 3.0 to 3.6 application. - Use environment variables for all PostHog keys and maintain consistency by following the provided example project patterns. - Identify users during authentication events and use specific headers to correlate client-side sessions with backend requests.
integration-react-react-router-7-declarative
PostHog
### PostHog Integration for React Router v7 - Implement PostHog analytics using the declarative pattern by following the four-step setup workflow and referencing the example project. - Use environment variables for API keys and trigger analytics capture directly within event handlers rather than inside useEffect hooks. - Identify users during authentication and maintain session correlation by passing distinct IDs via headers for backend-integrated flows.
integration-nuxt-4
PostHog
### PostHog Integration for Nuxt 4 - Follow the four-step setup workflow to integrate PostHog analytics into your Nuxt 4 application. - Use environment variables for all PostHog keys and follow the provided example project patterns for implementation. - Identify users during authentication and use specific headers to maintain session correlation between frontend and backend.
omnibus-instrument-error-tracking
PostHog
### omnibus-instrument-error-tracking Overview - >- - Use this skill to add PostHog error tracking that captures and monitors exceptions in your application. Use it after implementing features o - Supported platforms: React, Next.js, Web (JavaScript), Node.js, Python, Ruby, Ruby on Rails, Go, Angular, Svelte, Nuxt, React Native, Flutte
error-tracking-web
PostHog
### PostHog Web Error Tracking - Initialize posthog-js before other methods and enable exception autocapture to monitor browser errors automatically. - Upload source maps to ensure stack traces are readable and use captureException() within catch blocks for manual error reporting. - Protect user privacy by excluding PII from capture() event properties, using identify() for user-specific data instead.
integration-nextjs-pages-router
PostHog
### PostHog Integration for Next.js Pages Router - Initialize PostHog using environment variables and follow the provided example project patterns for consistent implementation. - Capture analytics events directly within user-triggered event handlers rather than using useEffect hooks for state-driven logic. - Identify users during login and signup, using specific headers to maintain correlation between frontend and backend sessions.
integration-astro-view-transitions
PostHog
### PostHog Astro View Transitions Integration - Use the is:inline directive and a reusable PostHog component to initialize analytics within Astro layouts. - Configure capture_pageview to history_change and use the astro:page-load event to ensure tracking persists during soft navigation. - Securely manage project tokens via PUBLIC_ environment variables and maintain user correlation using custom request headers.
integration-laravel
PostHog
### PostHog Laravel Integration - Centralize analytics logic by creating a dedicated PostHogService class instead of scattering capture calls across controllers. - Configure settings in config/posthog.php using environment variables and initialize the SDK once using PostHog::init(). - Identify users during authentication and maintain session correlation by passing distinct IDs via custom request headers.
integration-javascript_web
PostHog
### PostHog JavaScript Web Integration - Initialize posthog-js in client-side browser environments only, ensuring posthog.init() is called before any other SDK methods. - Use posthog.identify() for PII like emails and names, while keeping posthog.capture() event properties free of sensitive user data. - Follow the four-step integration workflow and use environment variables for keys to maintain security and implementation consistency.
feature-flags-api
PostHog
### feature-flags-api Overview - PostHog feature flags for API applications - This skill helps you add PostHog feature flags to API applications. - `references/api.md` - API feature flags installation - docs
feature-flags-java
PostHog
### PostHog Java Feature Flags - Install the PostHog Java library and integrate flag checks directly into existing application logic using the provided documentation. - Securely manage PostHog API keys using environment variables and prioritize server-side evaluation to prevent UI flickering. - Utilize available PostHog MCP tools to programmatically create, list, and update feature flags directly from your development environment.
integration-javascript_node
PostHog
### PostHog Node.js Integration - Install the posthog-node SDK and initialize it with environment variables, ensuring exception autocapture is enabled. - Instrument route handlers with posthog.capture() for user actions and integrate posthog.captureException() into error middleware. - Identify users during authentication and pass session headers from the frontend to maintain event correlation across the stack.
integration-astro-hybrid
PostHog
### PostHog Integration for Astro Hybrid - Initialize PostHog using a reusable component in src/components/ and include it in your main layout for consistent tracking. - Use the posthog-node library with a singleton pattern in src/lib/ for server-side event tracking in API routes. - Securely manage keys via environment variables and use the is:inline directive to prevent Astro from processing script tags.
integration-react-react-router-6
PostHog
### PostHog Integration for React Router v6 - Follow the four-step setup workflow to integrate PostHog analytics into your React Router v6 application. - Use environment variables for API keys and implement analytics capture directly within event handlers rather than useEffect. - Identify users during login and signup, using specific headers to maintain session correlation between frontend and backend.
integration-astro-ssr
PostHog
### PostHog Astro SSR Integration - Initialize PostHog using a reusable component in your Astro layout and store the server-side client in a singleton pattern. - Use environment variables with the PUBLIC_ prefix for client-side keys and keep all PostHog script tags marked as is:inline. - Maintain session correlation by passing distinct IDs and session IDs via headers when tracking events across frontend and API routes.
error-tracking-svelte
PostHog
### PostHog Error Tracking for Svelte - Initialize PostHog with exception autocapture enabled and use environment variables for all sensitive configuration keys. - Upload source maps to ensure stack traces resolve to original source code rather than minified production bundles. - Set paths.relative to false in svelte.config.js to ensure session replay compatibility with SvelteKit server-side rendering.
feature-flags-rust
PostHog
### PostHog Feature Flags in Rust - Integrate PostHog flags into Rust applications using environment variables for secure API key management. - Implement server-side flag evaluation to ensure consistent user experiences and prevent UI flickering. - Utilize available PostHog MCP tools to programmatically manage, list, and update feature flags directly from your development environment.
feature-flags-web
PostHog
### PostHog Web Feature Flags - Integrate PostHog flags into JavaScript apps using environment variables for keys and avoiding hardcoded credentials. - Implement boolean flag checks alongside existing logic to minimize code restructuring and maintain clean application flow. - Prioritize server-side flag evaluation to prevent UI flickering and utilize MCP tools for direct flag management within PostHog.
feature-flags-react-native
PostHog
### PostHog Feature Flags for React Native - Use useFeatureFlagEnabled or useFeatureFlagPayload hooks to manage flags while handling loading states and external synchronization. - Securely load POSTHOG_PROJECT_TOKEN and POSTHOG_HOST via environment variables using react-native-config to avoid hardcoding credentials. - Install react-native-svg as a peer dependency and wrap your application with PostHogProvider inside the NavigationContainer.
error-tracking-angular
PostHog
### PostHog Angular Error Tracking - Implement a singleton PosthogService using inject() to wrap the SDK and manage initialization within standalone components. - Enable exception autocapture during SDK initialization and use captureException() for errors caught at specific boundaries. - Secure credentials via environment files and upload source maps to ensure stack traces resolve to original source code.
feature-flags-flutter
PostHog
### PostHog Feature Flags for Flutter - Integrate PostHog flags into Flutter apps using environment variables for keys and avoiding hardcoded credentials. - Implement boolean flag checks alongside existing logic to maintain code structure and minimize unnecessary refactoring. - Prioritize server-side flag evaluation to prevent UI flickering and utilize MCP tools for direct flag management.
error-tracking-nextjs
PostHog
### PostHog Error Tracking for Next.js - Initialize PostHog in instrumentation-client.ts and enable exception autocapture before implementing manual error tracking. - Upload source maps to ensure stack traces resolve to original source code rather than minified bundles. - Use captureException() within error boundaries and catch blocks to record errors that do not reach the global handler.
feature-flags-ios
PostHog
### PostHog iOS Feature Flags - Securely manage PostHog keys using environment variables and a dedicated enum to prevent hardcoding sensitive configuration data. - Implement SPM dependencies by creating distinct PBXBuildFile, XCSwiftPackageProductDependency, and XCRemoteSwiftPackageReference objects. - Prioritize server-side flag evaluation to prevent UI flickering and enable outgoing network connections for sandboxed applications.
feature-flags-android
PostHog
### feature-flags-android Overview - PostHog feature flags for Android applications - This skill helps you add PostHog feature flags to Android applications. - `references/android.md` - Android feature flags installation - docs
feature-flags-react
PostHog
### PostHog React Feature Flags - Use useFeatureFlagEnabled or useFeatureFlagPayload hooks to manage flags while handling loading states and external synchronization. - Secure PostHog keys using environment variables and prefer server-side flag evaluation to prevent UI flickering during rendering. - Avoid using useEffect for state management or event handling; reserve it strictly for synchronizing with external systems.
error-tracking-react
PostHog
### PostHog Error Tracking for React - Initialize PostHog with exception autocapture enabled and use environment variables for all sensitive configuration keys. - Upload source maps to ensure stack traces are readable and use captureException in error boundaries for non-propagating errors. - Integrate error tracking alongside existing logic without restructuring or replacing current error handling patterns.
error-tracking-flutter
PostHog
### PostHog Flutter Error Tracking - Integrate PostHog by enabling exception autocapture during SDK initialization before implementing manual error reporting. - Use environment variables for API keys and host URLs to maintain security and avoid hardcoding sensitive configuration data. - Upload source maps to ensure minified stack traces are resolved into readable code for effective debugging and issue monitoring.
error-tracking-go
PostHog
### PostHog Go Error Tracking - Integrate PostHog by initializing exception autocapture before implementing manual error reporting. - Use environment variables for all sensitive configuration keys and host URLs to maintain security. - Upload source maps to ensure stack traces map correctly to original source code rather than minified bundles.
feature-flags-nextjs
PostHog
### PostHog Feature Flags for Next.js - Initialize PostHog globally via instrumentation-client.ts to enable hooks without wrapping components in a provider. - Evaluate flags server-side using posthog-node and pass values as props to client components to prevent hydration mismatches and flicker. - Use useFeatureFlagEnabled or useFeatureFlagPayload hooks in client components and handle loading states for asynchronous flag data.
error-tracking-hono
PostHog
### PostHog Error Tracking for Hono - Integrate PostHog error tracking into Hono apps using environment variables for keys and host URLs to ensure security. - Enable exception autocapture in the SDK initialization and use captureException() for errors at specific boundary catch blocks. - Upload source maps to resolve stack traces to original source code and maintain existing error handling structures without replacement.
error-tracking-ruby
PostHog
### PostHog Ruby Error Tracking - Install the posthog-ruby gem and initialize the client using environment variables for API keys and host URLs to ensure security. - Enable exception autocapture for global coverage and use capture_exception in rescue blocks for errors that do not propagate. - Always call client.shutdown in an ensure block for CLI or script applications to prevent event loss before the process exits.
feature-flags-elixir
PostHog
### PostHog Feature Flags for Elixir - Integrate PostHog flags into Elixir apps using environment variables for keys and server-side evaluation to prevent UI flickering. - Implement feature flags alongside existing logic without restructuring code, defaulting to boolean checks for simplicity. - Utilize available PostHog MCP tools to manage flag lifecycles directly from the development environment instead of the dashboard.
error-tracking-react-native
PostHog
### PostHog React Native Error Tracking - Install posthog-react-native and react-native-svg, using environment variables for project tokens and host URLs. - Enable exception autocapture in the SDK initialization and use captureException() within error boundaries for manual reporting. - Upload source maps to ensure stack traces resolve to original source code and wrap the app with PostHogProvider for full integration.
error-tracking-android
PostHog
### PostHog Android Error Tracking - Initialize PostHog in the Application class onCreate method using environment variables for keys and host URLs. - Enable exception autocapture for global coverage and use captureException for specific error boundaries and catch blocks. - Upload source maps to resolve minified stack traces and ensure activities have labels for accurate screen view tracking.
error-tracking-nuxt
PostHog
### PostHog Error Tracking for Nuxt - Integrate PostHog error tracking into Nuxt applications using environment variables for secure configuration of keys and host URLs. - Enable exception autocapture in the SDK initialization and use captureException for manual error handling at specific boundaries. - Upload source maps to ensure stack traces resolve to original source code rather than minified production bundles.
error-tracking-ruby-on-rails
PostHog
### PostHog Error Tracking for Ruby on Rails - Install the posthog-rails gem and use the initializer to enable automatic exception capture and ActiveJob instrumentation. - Use environment variables for API keys and host URLs, ensuring sensitive configuration is never hardcoded in the codebase. - Utilize class-level PostHog methods for event capture and identify calls, avoiding manual client instantiation within Rails.
error-tracking-python
PostHog
### PostHog Python Error Tracking - Initialize the Posthog client with enable_exception_autocapture=True and use instance-based constructors instead of module-level config. - Protect user privacy by excluding PII from capture() event properties, using set() or identify_context() for person-related data instead. - Ensure reliable event delivery by registering posthog_client.shutdown with atexit and using environment variables for sensitive keys.