cloudthinker-ai/cloudskills/managing-posthog

Claude Code and agent skill by cloudthinker-ai/cloudskills

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when working with Posthog — postHog analytics management — monitor events, feature flags, experiments, session recordings, and ingestion health. Use when reviewing event volumes, managing feature flags, debugging tracking, or inspecting experiment results.

Install

npx vskill@latest install cloudthinker-ai/cloudskills/managing-posthog

SKILL.md

The same SKILL.md was published earlier as cloudthinker-ai/cloudskills/managing-posthog.

Managing PostHog

Manage and monitor PostHog product analytics — events, feature flags, experiments, and session recordings.

Discovery Phase

bash
#!/bin/bash
POSTHOG_API="${POSTHOG_HOST:-https://app.posthog.com}/api"
AUTH="Authorization: Bearer $POSTHOG_API_KEY"
echo "=== Project Info ==="
curl -s -H "$AUTH" "$POSTHOG_API/projects/@current" \
| jq '{id: .id, name: .name, timezone: .timezone, completed_snippet_onboarding: .completed_snippet_onboarding}'
echo ""
echo "=== Event Definitions ==="
curl -s -H "$AUTH" "$POSTHOG_API/projects/@current/event_definitions?limit=20" \
| jq -r '.results[] | [.name, .volume_30_day // 0, .query_usage_30_day // 0] | @tsv' | column -t
echo ""
echo "=== Feature Flags ==="
curl -s -H "$AUTH" "$POSTHOG_API/projects/@current/feature_flags?limit=15" \
| jq -r '.results[] | [.id, .key, .active, .rollout_percentage // "filters"] | @tsv' | column -t
echo ""
echo "=== Experiments ==="
curl -s -H "$AUTH" "$POSTHOG_API/projects/@current/experiments?limit=10" \
| jq -r '.results[] | [.id, .name, .start_date, .end_date // "running"] | @tsv' | column -t

Analysis Phase

bash
#!/bin/bash
POSTHOG_API="${POSTHOG_HOST:-https://app.posthog.com}/api"
AUTH="Authorization: Bearer $POSTHOG_API_KEY"
echo "=== Event Volume (Last 7 Days) ==="
curl -s -H "$AUTH" -X POST "$POSTHOG_API/projects/@current/insights/trend/" \
-H "Content-Type: application/json" \
-d '{"events":[{"id":"$pageview","type":"events"}],"date_from":"-7d","interval":"day"}' \
| jq -r '.result[0].data | to_entries[] | [.key, .value] | @tsv' | column -t
echo ""
echo "=== Top Events by Volume ==="
curl -s -H "$AUTH" "$POSTHOG_API/projects/@current/event_definitions?limit=10&ordering=-volume_30_day" \
| jq -r '.results[] | [.name, .volume_30_day] | @tsv' | column -t
echo ""
echo "=== Feature Flag Usage ==="
curl -s -H "$AUTH" "$POSTHOG_API/projects/@current/feature_flags?active=true&limit=10" \
| jq -r '.results[] | [.key, .active, .rollout_percentage // "complex", .ensure_experience_continuity] | @tsv' | column -t
echo ""
echo "=== Session Recordings Stats ==="
curl -s -H "$AUTH" "$POSTHOG_API/projects/@current/session_recordings?limit=5&date_from=-1d" \
| jq '{total_count: .count, recordings: [.results[:5][] | {id: .id, duration: .recording_duration, activity: .activity_score}]}'
echo ""
echo "=== Ingestion Warnings ==="
curl -s -H "$AUTH" "$POSTHOG_API/projects/@current/ingestion_warnings?limit=10" \
| jq -r '.results[:10][] | [.type, .count, .last_seen] | @tsv' | column -t

Output Format

PROJECT
Name: <project-name>
Timezone: <timezone>
TOP EVENTS (30d)
Event Name Volume
<event-name> <count>
FEATURE FLAGS
Key Active Rollout
<flag-key> true <percentage>
EXPERIMENTS
Name Start End
<exp-name> <date> <date|running>
INGESTION WARNINGS
Type Count Last Seen
<warning-type> <n> <timestamp>

Anti-Hallucination Rules

  1. NEVER assume resource names — always discover via CLI/API in Phase 1 before referencing in Phase 2.
  2. NEVER fabricate metric names or dimensions — verify against the service documentation or --help output.
  3. NEVER mix CLI commands between service versions — confirm which version/API you are targeting.
  4. ALWAYS use the discovery → verify → analyze chain — every resource referenced must have been discovered first.
  5. ALWAYS handle empty results gracefully — an empty response is valid data, not an error to retry.

Counter-Rationalizations

ShortcutCounterWhy
"I'll skip discovery and check known resources"Always run Phase 1 discovery firstResource names change, new resources appear — assumed names cause errors
"The user only asked for a quick check"Follow the full discovery → analysis flowQuick checks miss critical issues; structured analysis catches silent failures
"Default configuration is probably fine"Audit configuration explicitlyDefaults often leave logging, security, and optimization features disabled
"Metrics aren't needed for this"Always check relevant metrics when availableAPI/CLI responses show current state; metrics reveal trends and intermittent issues
"I don't have access to that"Try the command and report the actual errorAssumed permission failures prevent useful investigation; actual errors are informative

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
6
Repository forks
3
7-day trend score
10

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/cloudthinker-ai/cloudskills/managing-posthog/badge)](https://verified-skill.com/skills/cloudthinker-ai/cloudskills/managing-posthog)

Something wrong with this skill or its page? Tell us.