{
  "schemaVersion": "1.0",
  "item": {
    "slug": "posthog",
    "name": "PostHog",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/simonfunk/posthog",
    "canonicalUrl": "https://clawhub.ai/simonfunk/posthog",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/posthog",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=posthog",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "references/api-endpoints.md",
      "scripts/posthog.sh"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "slug": "posthog",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T08:39:31.797Z",
      "expiresAt": "2026-05-14T08:39:31.797Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=posthog",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=posthog",
        "contentDisposition": "attachment; filename=\"posthog-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "posthog"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/posthog"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/posthog",
    "agentPageUrl": "https://openagent3.xyz/skills/posthog/agent",
    "manifestUrl": "https://openagent3.xyz/skills/posthog/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/posthog/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "PostHog API Skill",
        "body": "Interact with PostHog via its REST API. Two types of endpoints:\n\nPublic (POST-only, project API key): capture events, evaluate flags — no rate limits\nPrivate (personal API key): query, CRUD for all resources — rate limited"
      },
      {
        "title": "Setup",
        "body": "Get personal API key: https://us.posthog.com/settings/user-api-keys\nGet project ID: https://us.posthog.com/settings/project#variables\nSet env vars:\nexport POSTHOG_API_KEY=\"phx_...\"\nexport POSTHOG_PROJECT_ID=\"12345\"\nexport POSTHOG_PROJECT_API_KEY=\"phc_...\"  # optional, for capture/flags\n# For EU Cloud:\n# export POSTHOG_HOST=\"https://eu.posthog.com\"\n# export POSTHOG_INGEST_HOST=\"https://eu.i.posthog.com\"\n\n\nVerify: bash scripts/posthog.sh whoami"
      },
      {
        "title": "Helper Script",
        "body": "scripts/posthog.sh wraps common operations. Run bash scripts/posthog.sh help for full usage."
      },
      {
        "title": "Examples",
        "body": "# Capture an event\nbash scripts/posthog.sh capture \"signup\" \"user_123\" '{\"plan\":\"pro\"}'\n\n# Evaluate feature flags\nbash scripts/posthog.sh evaluate-flags \"user_123\"\n\n# HogQL query — top events last 7 days\nbash scripts/posthog.sh query \"SELECT event, count() FROM events WHERE timestamp >= now() - INTERVAL 7 DAY GROUP BY event ORDER BY count() DESC LIMIT 20\"\n\n# List persons\nbash scripts/posthog.sh list-persons 10 | jq '.results[] | {name, distinct_ids}'\n\n# List feature flags\nbash scripts/posthog.sh list-flags | jq '.results[] | {id, key, active}'\n\n# Create a feature flag\necho '{\"key\":\"new-dashboard\",\"name\":\"New Dashboard\",\"active\":true,\"filters\":{\"groups\":[{\"rollout_percentage\":50}]}}' | \\\n  bash scripts/posthog.sh create-flag\n\n# List dashboards\nbash scripts/posthog.sh list-dashboards | jq '.results[] | {id, name}'"
      },
      {
        "title": "Two API types",
        "body": "Public endpoints (/i/v0/e/, /batch/, /flags): Use project API key in body. No auth header. No rate limits.\nPrivate endpoints (/api/projects/:project_id/...): Use personal API key via Authorization: Bearer. Rate limited."
      },
      {
        "title": "HogQL Queries",
        "body": "The query endpoint (POST /api/projects/:project_id/query/) is the most powerful way to extract data. Uses SQL-like HogQL syntax against tables: events, persons, sessions, groups, plus data warehouse tables.\n\nAlways include time ranges and LIMIT. Use timestamp-based pagination for large exports."
      },
      {
        "title": "Rate Limits (private endpoints)",
        "body": "TypeLimitAnalytics (insights, persons, recordings)240/min, 1200/hrQuery endpoint2400/hrFeature flag local evaluation600/minOther CRUD480/min, 4800/hr\n\nLimits apply per organization. On 429: back off and retry."
      },
      {
        "title": "Domains",
        "body": "CloudPublicPrivateUSus.i.posthog.comus.posthog.comEUeu.i.posthog.comeu.posthog.com"
      },
      {
        "title": "Events API (deprecated)",
        "body": "The /api/projects/:project_id/events/ endpoint is deprecated. Use HogQL queries or batch exports instead."
      },
      {
        "title": "Direct curl",
        "body": "# Private endpoint\ncurl -H \"Authorization: Bearer $POSTHOG_API_KEY\" \\\n  \"$POSTHOG_HOST/api/projects/$POSTHOG_PROJECT_ID/feature_flags/\"\n\n# HogQL query\ncurl -H \"Authorization: Bearer $POSTHOG_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -X POST -d '{\"query\":{\"kind\":\"HogQLQuery\",\"query\":\"SELECT count() FROM events WHERE timestamp >= now() - INTERVAL 1 DAY\"}}' \\\n  \"$POSTHOG_HOST/api/projects/$POSTHOG_PROJECT_ID/query/\"\n\n# Capture event (public)\ncurl -H \"Content-Type: application/json\" \\\n  -X POST -d '{\"api_key\":\"'$POSTHOG_PROJECT_API_KEY'\",\"event\":\"test\",\"distinct_id\":\"u1\"}' \\\n  \"$POSTHOG_INGEST_HOST/i/v0/e/\""
      },
      {
        "title": "Full API Reference",
        "body": "See references/api-endpoints.md for complete endpoint listing with parameters, body schemas, scopes, and response formats.\n\nSections: Public Endpoints (Capture, Batch, Flags), Private Endpoints (Persons, Feature Flags, Insights, Dashboards, Annotations, Cohorts, Experiments, Surveys, Actions, Session Recordings, Users, Definitions), Query API (HogQL)."
      }
    ],
    "body": "PostHog API Skill\n\nInteract with PostHog via its REST API. Two types of endpoints:\n\nPublic (POST-only, project API key): capture events, evaluate flags — no rate limits\nPrivate (personal API key): query, CRUD for all resources — rate limited\nSetup\nGet personal API key: https://us.posthog.com/settings/user-api-keys\nGet project ID: https://us.posthog.com/settings/project#variables\nSet env vars:\nexport POSTHOG_API_KEY=\"phx_...\"\nexport POSTHOG_PROJECT_ID=\"12345\"\nexport POSTHOG_PROJECT_API_KEY=\"phc_...\"  # optional, for capture/flags\n# For EU Cloud:\n# export POSTHOG_HOST=\"https://eu.posthog.com\"\n# export POSTHOG_INGEST_HOST=\"https://eu.i.posthog.com\"\n\nVerify: bash scripts/posthog.sh whoami\nHelper Script\n\nscripts/posthog.sh wraps common operations. Run bash scripts/posthog.sh help for full usage.\n\nExamples\n# Capture an event\nbash scripts/posthog.sh capture \"signup\" \"user_123\" '{\"plan\":\"pro\"}'\n\n# Evaluate feature flags\nbash scripts/posthog.sh evaluate-flags \"user_123\"\n\n# HogQL query — top events last 7 days\nbash scripts/posthog.sh query \"SELECT event, count() FROM events WHERE timestamp >= now() - INTERVAL 7 DAY GROUP BY event ORDER BY count() DESC LIMIT 20\"\n\n# List persons\nbash scripts/posthog.sh list-persons 10 | jq '.results[] | {name, distinct_ids}'\n\n# List feature flags\nbash scripts/posthog.sh list-flags | jq '.results[] | {id, key, active}'\n\n# Create a feature flag\necho '{\"key\":\"new-dashboard\",\"name\":\"New Dashboard\",\"active\":true,\"filters\":{\"groups\":[{\"rollout_percentage\":50}]}}' | \\\n  bash scripts/posthog.sh create-flag\n\n# List dashboards\nbash scripts/posthog.sh list-dashboards | jq '.results[] | {id, name}'\n\nKey Concepts\nTwo API types\nPublic endpoints (/i/v0/e/, /batch/, /flags): Use project API key in body. No auth header. No rate limits.\nPrivate endpoints (/api/projects/:project_id/...): Use personal API key via Authorization: Bearer. Rate limited.\nHogQL Queries\n\nThe query endpoint (POST /api/projects/:project_id/query/) is the most powerful way to extract data. Uses SQL-like HogQL syntax against tables: events, persons, sessions, groups, plus data warehouse tables.\n\nAlways include time ranges and LIMIT. Use timestamp-based pagination for large exports.\n\nRate Limits (private endpoints)\nType\tLimit\nAnalytics (insights, persons, recordings)\t240/min, 1200/hr\nQuery endpoint\t2400/hr\nFeature flag local evaluation\t600/min\nOther CRUD\t480/min, 4800/hr\n\nLimits apply per organization. On 429: back off and retry.\n\nDomains\nCloud\tPublic\tPrivate\nUS\tus.i.posthog.com\tus.posthog.com\nEU\teu.i.posthog.com\teu.posthog.com\nEvents API (deprecated)\n\nThe /api/projects/:project_id/events/ endpoint is deprecated. Use HogQL queries or batch exports instead.\n\nDirect curl\n# Private endpoint\ncurl -H \"Authorization: Bearer $POSTHOG_API_KEY\" \\\n  \"$POSTHOG_HOST/api/projects/$POSTHOG_PROJECT_ID/feature_flags/\"\n\n# HogQL query\ncurl -H \"Authorization: Bearer $POSTHOG_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -X POST -d '{\"query\":{\"kind\":\"HogQLQuery\",\"query\":\"SELECT count() FROM events WHERE timestamp >= now() - INTERVAL 1 DAY\"}}' \\\n  \"$POSTHOG_HOST/api/projects/$POSTHOG_PROJECT_ID/query/\"\n\n# Capture event (public)\ncurl -H \"Content-Type: application/json\" \\\n  -X POST -d '{\"api_key\":\"'$POSTHOG_PROJECT_API_KEY'\",\"event\":\"test\",\"distinct_id\":\"u1\"}' \\\n  \"$POSTHOG_INGEST_HOST/i/v0/e/\"\n\nFull API Reference\n\nSee references/api-endpoints.md for complete endpoint listing with parameters, body schemas, scopes, and response formats.\n\nSections: Public Endpoints (Capture, Batch, Flags), Private Endpoints (Persons, Feature Flags, Insights, Dashboards, Annotations, Cohorts, Experiments, Surveys, Actions, Session Recordings, Users, Definitions), Query API (HogQL)."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/simonfunk/posthog",
    "publisherUrl": "https://clawhub.ai/simonfunk/posthog",
    "owner": "simonfunk",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/posthog",
    "downloadUrl": "https://openagent3.xyz/downloads/posthog",
    "agentUrl": "https://openagent3.xyz/skills/posthog/agent",
    "manifestUrl": "https://openagent3.xyz/skills/posthog/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/posthog/agent.md"
  }
}