← ClaudeAtlas

posthog-clilisted

Operate PostHog from a coding-agent terminal with the official @posthog/cli agent API and bundled REST helpers. Use when the agent needs to inspect, query, create, update, or delete PostHog insights, dashboards, feature flags, experiments, cohorts, persons, events, surveys, recordings, error-tracking issues, warehouse resources, CDP functions, LLM analytics, organizations, or projects; run HogQL or typed analytics queries; upload source maps or debug symbols; translate a PostHog MCP workflow; or when the user says posthog-cli, PostHog CLI, PostHog API, HogQL, query my PostHog data, or manage my PostHog flags. Do not use for application runtime instrumentation through PostHog SDKs, continuous polling, PostHog MCP server configuration, or dashboard-only billing and instance administration.
arthjean/skills · ★ 3 · AI & Automation · score 66
Install: claude install-skill arthjean/skills
# PostHog CLI Operate PostHog through the official `@posthog/cli` agent API. Keep the bundled Bash helpers for REST gaps, deterministic pipelines, and HogQL file or tabular workflows. ## Operating contract 1. Set the absolute directory containing this `SKILL.md` as `POSTHOG_SKILL_DIR`. In a standard user installation: ```bash POSTHOG_SKILL_DIR="${POSTHOG_SKILL_DIR:-$HOME/.agents/skills/posthog-cli}" ``` 2. Keep the working directory in the user's project. The helpers discover the nearest `.env.local` or `.env` from `$PWD`; changing into the skill directory selects the wrong context. 3. Use `bunx --bun @posthog/cli@latest`. Do not install the CLI globally and do not use npm, npx, pnpm, or yarn. 4. Prefer `posthog-cli api` over raw REST. It exposes the current agent-oriented tool catalog, schemas, dry-run validation, and destructive-operation checks. 5. Keep credentials in the environment. Never print, log, commit, or return a personal API key, locally stored login token, authorization header, or secret-bearing response field. 6. Keep browser use opt-in. Do not run `login`, open dashboard URLs, or invoke browser authentication unless the user explicitly requested it. 7. Require explicit intent and an unambiguous organization, project, environment, and resource before any create, update, delete, rollout, experiment transition, cohort membership change, bulk operation, or other mutation. An exact user request is authorization; do not add a redundant confirmation. 8.