CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

querying-posthog-data

Explains how to choose typed queries or SQL for PostHog data. Read it before you write HogQL/SQL. Also read it before you call execute-sql against PostHog. Use it to find or aggregate PostHog entities. These entities include insights, dashboards, cohorts, feature flags, experiments, surveys, hog flows, warehouse data, and persons. Use it for trends, funnels, retention, lifecycle, paths, stickiness, web analytics, error tracking, logs, sessions, and LLM traces. Before you calculate a governed business or telemetry measure, check system.information_schema.metrics for an approved definition. Examples include MRR, activation, billable usage, active organizations, and failure rates. Use the approved definition before you derive a measure from raw events or use a typed domain tool. It also covers HogQL differences, system table schemas, functions, query examples, and schema discovery.

68

Quality

85%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

—

The risk profile of this skill

SKILL.md
Quality
Evals
Security

Quality

Content

71%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A well-structured, actionable skill body with clear tool-selection workflows and explicit validation gates, especially in the semantic-layer section. Its main weakness is progressive disclosure: the body points to roughly thirty reference files that are not present in the bundle, so the otherwise-excellent navigation structure resolves to dead links.

Suggestions

Ship the ./references/*.md files referenced in the Data Schema, HogQL References, and Analytics Query Examples sections, or remove links to files that are not bundled — the current body resolves ~30 paths to missing files.

Add one or two short inline HogQL/SQL snippets for the most common query paths so the body is self-sufficient for the common cases instead of always delegating to external examples.

Tighten the semantic-layer section: factor the prompt-injection/untrusted-markdown rationale and repeated method-selection reminders into a single concise statement to reduce over-explanation.

DimensionReasoningScore

Conciseness

The body is mostly lean and action-oriented with no basic-concept padding, but the semantic-layer section carries verbose embedded rationale (e.g., the prompt-injection paragraph about never obeying embedded instructions) and some repeated method-selection guidance that could be trimmed, fitting the 'efficient with minor over-explanation' 4 anchor rather than the lean 5.

4 / 5

Actionability

Gives concrete executable guidance — specific tools (posthog:query-trends, posthog:execute-sql, posthog:metric-list, posthog:data-catalog-metric-run) and concrete gates (status approved AND is_drifted false) — but the actual code/SQL examples live in external files rather than inline, leaving minor gaps versus the copy-paste-ready 5 anchor.

4 / 5

Workflow Clarity

The semantic-layer workflow is a clearly numbered 5-step sequence with explicit validation gates (empty-catalog / unknown-table handling, approved+non-drifted check, user-confirmation gate before metric-create), but it lacks explicit validate→fix→retry feedback loops, so it lands at 4 rather than 5.

4 / 5

Progressive Disclosure

The structure is well-signaled with one-level-deep categorized reference links (Data Schema, HogQL References, Analytics Query Examples), but the ./references/*.md files do not exist in the bundle, so the ~30 referenced paths are broken and navigation is non-functional — a real gap that pulls it down from the 4/5 anchors despite good organization.

3 / 5

Total

15

/

20

Passed

Description

95%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A strong, comprehensive description that clearly states both capabilities and trigger conditions for PostHog data querying. The only weakness is verbosity — the same guidance is restated across several sentences, which slightly reduces crispness without adding coverage.

DimensionReasoningScore

Specificity

Lists several concrete actions — 'choose typed queries or SQL', 'find or aggregate PostHog entities', 'check system.information_schema.metrics for an approved definition', 'covers HogQL differences, system table schemas, functions, query examples' — but the repetition and length dilute crispness, so it sits just below the comprehensive 5 anchor.

4 / 5

Completeness

Explicitly answers both what (choosing typed queries vs SQL, finding/aggregating entities, governed measures) and when ('Read it before you write HogQL/SQL', 'before you call execute-sql', 'Before you calculate a governed business or telemetry measure'), with concrete trigger phrases as the 5 anchor requires.

5 / 5

Trigger Term Quality

Comprehensive natural-term coverage a PostHog user would actually say — 'insights, dashboards, cohorts, feature flags, experiments, surveys, hog flows', 'trends, funnels, retention, lifecycle, paths, stickiness, web analytics, error tracking, logs, sessions, and LLM traces', 'MRR, activation, billable usage' — matching the comprehensive anchor better than the 4 anchor.

5 / 5

Distinctiveness Conflict Risk

Occupies a clear PostHog-specific niche (choosing query method for PostHog data) with distinct triggers like 'HogQL/SQL' and 'execute-sql against PostHog', giving minimal conflict risk with other skills.

5 / 5

Total

19

/

20

Passed

Validation

93%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 15 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

relative_links

Relative link issues: 64 missing

Warning

Total

15

/

16

Passed

Repository

PostHog/posthog

Path

products/posthog_ai/skills/querying-posthog-data/SKILL.md

Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.