posthog-analytics
Automate PostHog dashboard creation, sync, update, and export via API
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Automate PostHog dashboard creation, sync, update, and export via API
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
Clone any website's landing page with pixel-perfect fidelity. Visual-first workflow: screenshot → sniper CSS extraction → deep DOM interrogation → animation detection → rebuild in React + Tailwind + Framer Motion. Uses AdaL browser-use agent tools. Includes ready-to-use extraction scripts, gotcha catalog, quality checklist, and speedrun prompt.
Senior engineer CLI expertise for AI agents — workflows, safety guardrails, gotchas, and anti-patterns across cloud, IaC, containers, databases, dev tools, and platforms
Guide users through creating AdaL skills by clarifying the skill type (personal, project, or public plugin) and scaffolding the appropriate structure.
SOC 직업 분류 기준
| name | posthog-analytics |
| description | Automate PostHog dashboard creation, sync, update, and export via API |
| author | SylphAI-Inc |
| version | 1.1.0 |
Automate PostHog dashboard creation, sync, update, and export via API.
curl - HTTP client (pre-installed on macOS/Linux)jq - JSON processor: brew install jq or apt install jqbash - Shell (the script is bash)export POSTHOG_PERSONAL_API_KEY=phx_xxx
Note: The API key determines your organization and project. The script uses @current project context (your default project).
# Test your API key - should return your project info
curl -s -H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
"https://us.i.posthog.com/api/projects/@current/" | jq '{id, name}'
Expected output:
{
"id": 209268,
"name": "Default project"
}
If you get an error, check your API key is correct and has proper permissions.
Create blog_dashboard.json:
{
"name": "Blog Analytics",
"description": "Track blog performance and reader engagement",
"filter": {"key": "source", "value": "blog"},
"dashboard_id": null,
"insights": [
{"name": "Blog Pageviews (Total)", "type": "pageviews_total"},
{"name": "Unique Blog Readers", "type": "unique_users"},
{"name": "Blog Traffic Trend", "type": "traffic_trend"},
{"name": "Top Blog Posts", "type": "top_pages"}
]
}
Note: Set dashboard_id: null for new dashboards.
./scripts/posthog_sync.sh create blog_dashboard.json
Output:
Creating dashboard: Blog Analytics
Dashboard created: ID 1166599
Creating insight: Blog Pageviews (Total)
{id: 6520531, name: "Blog Pageviews (Total)"}
...
Dashboard URL: https://us.posthog.com/project/209268/dashboard/1166599
The script:
1166599) and project_id (e.g., 209268) in the URLdashboard_idEdit config to add new insights, then:
./scripts/posthog_sync.sh sync blog_dashboard.json
Only creates NEW insights. Existing ones (matched by name) are skipped.
Changed your filter? Edit config, then:
./scripts/posthog_sync.sh update blog_dashboard.json
Updates ALL insights with current config settings. Use when changing filters.
./scripts/posthog_sync.sh export 1166599 > exported_dashboard.json
| Field | Required | Description |
|---|---|---|
name | Yes | Dashboard name |
description | No | Dashboard description |
filter | No* | Event property filter: {"key": "source", "value": "blog"} |
domain_filter | No* | URL filter fallback: "blog.sylph.ai" |
dashboard_id | No | Set to null for create, or existing ID for sync/update |
insights | Yes | Array of insight objects |
*At least one filter recommended. filter takes precedence over domain_filter.
| Type | Display | Description |
|---|---|---|
pageviews_total | BoldNumber | Total pageview count |
unique_users | BoldNumber | Unique visitors (DAU) |
traffic_trend | LineGraph | Traffic over time |
top_pages | Table | Top pages breakdown |
| Field | Default | Options |
|---|---|---|
math | total | total, dau, weekly_active, monthly_active |
display | Auto | BoldNumber, ActionsLineGraph, ActionsTable |
date_range | -30d | -7d, -30d, -90d, etc. |
| Variable | Required | Default | Description |
|---|---|---|---|
POSTHOG_PERSONAL_API_KEY | Yes | - | Your API key (determines org/project) |
POSTHOG_HOST | No | us.i.posthog.com | API host (EU: eu.i.posthog.com) |
POSTHOG_UI_HOST | No | us.posthog.com | UI host for dashboard URLs |
scripts/posthog_sync.sh - CLI script (create/sync/update/export)examples/blog_dashboard.json - Example config