본문으로 건너뛰기
TakoAPI
스킬로 돌아가기

posthog-query

quinlanjager 제작

Marketing & Sales
—아직 평가 없음
내 평가

요약

Run SQL queries against PostHog product analytics data using the PostHog CLI.

설명

이 스킬이 하는 일

Runs HogQL (ClickHouse-compatible SQL) queries against PostHog product analytics data via the CLI. Returns results as JSON lines to stdout. Supports filtering by event type, URL, timestamp, and any stored event properties.

Queries analytics data from the terminal without opening the PostHog dashboard, making it straightforward to pipe results into scripts or agents.

사용 시점

  • Count pageviews for a specific URL over the past week
  • Check which browsers users are on for a given event
  • Pull the 10 most recent events from your PostHog project
  • Track daily signups or feature-click trends over a date range
  • Audit event volume around a product change or deploy

예시 워크플로

입력

User asks: How many pageviews did we get per day over the last 7 days?

에이전트
  1. 1

    Authenticate with PostHog using posthog-cli login

  2. 2

    Construct a HogQL query grouping pageview events by date over the last 7 days

  3. 3

    Run the query with posthog-cli exp query run

  4. 4

    Parse the JSON lines output and format the daily counts

출력

A list of dates with corresponding pageview counts, e.g. {"date": "2026-03-11", "pageviews": 4821}

요구 사항

  • PostHog account
  • PostHog API key with query:read scope
  • posthog-cli installed globally via npm install -g posthog-cli

설치

clawhub install quinlanjager/posthog-query

CLI 명령을 실행하거나, 프롬프트를 Claude Code, Cursor, Codex 등 사용하는 코딩 에이전트에 붙여넣으세요.

링크