AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

querying-posthog-data

Explains how to query PostHog data, defaulting to typed runners for supported product analytics. 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.

Original source
posthog
License
MIT
Pinned revision
cac7c80a9e5b73484d18eda1bffb47297c938e0c

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

Ask your assistant

Use Agentic Memory skills to read posthog--querying-posthog-data at revision cac7c80a9e5b73484d18eda1bffb47297c938e0c, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 65

references/models-early-access-features.md

Early Access Features

EarlyAccessFeature (system.early_access_features)

Early access features let teams manage staged feature rollouts where users can opt in. Each feature is linked to a feature flag that controls access.

Columns

Column | Type | Nullable | Description --- | --- | --- | --- id | String | NOT NULL | Early access feature UUID. team_id | Integer | NOT NULL | feature_flag_id | Integer | NOT NULL | Feature flag gating the feature; joins to feature_flags.id. name | String | NOT NULL | Feature name shown to users. description | String | NOT NULL | Feature description shown to users. stage | String | NOT NULL | Lifecycle stage, e.g. 'concept', 'beta', 'general-availability'. documentation_url | String | NOT NULL | Link to the feature's documentation. created_by_id | Integer | NULL | User who created the feature. created_at | DateTime | NOT NULL | When the feature was created.

Stage Values

Value | Description draft | Initial stage, not visible to users concept | Gauging interest, opt-in tracked but feature flag not enabled alpha | Active stage, opted-in users get the feature flag enabled beta | Active stage, opted-in users get the feature flag enabled general-availability | Active stage, feature available to all users archived | Feature retired, flag enrollment conditions removed

Active stages (where opted-in users get the feature flag enabled): alpha, beta, general-availability.

Key Relationships

  • Feature flags: feature_flag_id -> system.feature_flags.id

Important Notes

  • The stage field uses a hyphenated value general-availability (not underscore).
  • Features without a feature_flag_id are rare but possible during creation errors.
  • There is no soft-delete column; deleted features are removed from the table.

Common Query Patterns

List all early access features with their stages:

SELECT id, name, stage, feature_flag_id, created_at
FROM system.early_access_features
ORDER BY created_at DESC
LIMIT 100

Find active features (in alpha, beta, or GA):

SELECT id, name, stage, feature_flag_id
FROM system.early_access_features
WHERE stage IN ('alpha', 'beta', 'general-availability')
ORDER BY created_at DESC

Join with feature flags to see flag keys:

SELECT eaf.id, eaf.name, eaf.stage, ff.key AS flag_key
FROM system.early_access_features AS eaf
LEFT JOIN system.feature_flags AS ff ON eaf.feature_flag_id = ff.id
ORDER BY eaf.created_at DESC
LIMIT 100