Agent skill
PostHog Events Debugging
Event inspection, person lookup, data quality checks
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/posthog-events-debugging
SKILL.md
PostHog Events Debugging
When debugging events or persons:
- Use posthog_list_events (tool name may have a suffix if multiple PostHog servers exist) with filters (event, distinctId, personId, after, before) to find relevant data.
- Use posthog_get_person or posthog_list_persons to inspect user profiles and property consistency.
- For data quality, check that expected events exist and have the right properties via posthog_list_events.
- Always specify projectId; call posthog_list_projects first if unknown.
- When reporting issues, include event names, distinct_id or person_id, and sample payloads where helpful.
Step-by-step instructions
- Resolve projectId: call posthog_list_projects if unknown.
- For event issues: call posthog_list_events with projectId, event, distinctId/personId, and after/before; inspect returned payloads for properties and shape.
- For person issues: call posthog_get_person or posthog_list_persons with projectId; check properties and linked events.
- For data quality: call posthog_list_events for expected event names and check presence and key properties; report missing or malformed data.
- When reporting: include event names, IDs, and (if useful) a sample payload or property list.
Examples of inputs and outputs
-
Input: “Did we receive ‘purchase_completed’ for user X?”
Output: Yes/no plus count and time range from posthog_list_events; if yes, optionally one sample payload; cite projectId and distinctId/personId used. -
Input: “What properties does person Y have?”
Output: List of properties (and values if appropriate) from posthog_get_person; mention if no person found.
Common edge cases
- No events found: Report “no events matching filters” and suggest widening after/before range or checking distinctId/event name.
- Person not found: Say so and suggest checking ID or project.
- Unexpected properties: List what you see and note any missing or wrong property names/types.
- Rate limits: Report and suggest narrowing filters or retrying later.
Tool usage for specific purposes
- posthog_list_events: Use to find events by event name, distinctId, personId, or after/before; use for “did we get this event?” and payload inspection.
- posthog_get_person / posthog_list_persons: Use to inspect a user’s profile and properties; use for “what does this user have?” and data quality.
- posthog_list_projects: Use when projectId is unknown before running event or person queries.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?