Install and configure PostHog SDK/CLI authentication. Use when setting up a new PostHog integration, configuring API keys, or initializing PostHog in your project. Trigger with phrases like "install posthog", "setup posthog", "posthog auth", "configure posthog API key".
From posthog-packnpx claudepluginhub nickloveinvesting/nick-love-plugins --plugin posthog-packThis skill is limited to using the following tools:
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Analyzes BMad project state from catalog CSV, configs, artifacts, and query to recommend next skills or answer questions. Useful for help requests, 'what next', or starting BMad.
Set up PostHog SDK/CLI and configure authentication credentials.
set -euo pipefail
# Node.js
npm install @posthog/sdk
# Python
pip install posthog
# Set environment variable
export POSTHOG_API_KEY="your-api-key"
# Or create .env file
echo 'POSTHOG_API_KEY=your-api-key' >> .env
// Test connection code here
| Error | Cause | Solution |
|---|---|---|
| Invalid API Key | Incorrect or expired key | Verify key in PostHog dashboard |
| Rate Limited | Exceeded quota | Check quota at https://docs.posthog.com |
| Network Error | Firewall blocking | Ensure outbound HTTPS allowed |
| Module Not Found | Installation failed | Run npm install or pip install again |
import { PostHogClient } from '@posthog/sdk';
const client = new PostHogClient({
apiKey: process.env.POSTHOG_API_KEY,
});
from posthog import PostHogClient
client = PostHogClient(
api_key=os.environ.get('POSTHOG_API_KEY')
)
After successful auth, proceed to posthog-hello-world for your first API call.