Skill / SKILL.md

Creating An Endpoint

PostHog/skills

Create a PostHog endpoint with the right shape on the first try — covers query kind choice, name conventions, what to expose as variables (HogQL code_name vs insight breakdown), data_freshness_seconds, and whether to materialise on day one. Use when the user says "create an endpoint", "expose this query as an API", "turn this insight into an endpoint", or asks for help structuring a new endpoint. Also use when the user wants PostHog data in code, a script, a cron job, a backend service, or a customer-facing feature, or has a `/query` call in code to replace, even if they never say "endpoint". Steers away from common mistakes: materialising a query with cohort breakdowns or an ineligible compare query, inline-only variables on a materialised endpoint, unbounded date ranges, ambiguous names.
2 views 80 repository stars 0 commentsUpdated Nov 28, 2026
Overview

Create a PostHog endpoint with the right shape on the first try — covers query kind choice, name conventions, what to expose as variables (HogQL code_name vs insight breakdown), data_freshness_seconds, and whether to materialise on day one. Use when the user says "create an endpoint", "expose this query as an API", "turn this insight into an endpoint", or asks for help structuring a new endpoint. Also use when the user wants PostHog data in code, a script, a cron job, a backend service, or a customer-facing feature, or has a `/query` call in code to replace, even if they never say "endpoint". Steers away from common mistakes: materialising a query with cohort breakdowns or an ineligible compare query, inline-only variables on a materialised endpoint, unbounded date ranges, ambiguous names.

Installation & variants

Download the repository, including the skill’s supporting files.

git clone -- 'https://github.com/PostHog/skills' skill-source

Use the complete skill-source/skills/omnibus/creating-an-endpoint directory with your client’s skill installer.

  • skills/omnibus/creating-an-endpoint

    main · SKILL.md

    Open installation source

    Source directory recorded from the imported repository path

Source directory skills/omnibus/creating-an-endpoint

Source instructions
Read source instructions

Open to load source instructions

Original SKILL.md

Open to load the original file

Source & validation
Source status
Awaiting source check
Format validation
Format valid
Checked at
Pending source check
Content SHA-256
884e33b20c38e4c8c7cb47b7cd3b8783ec33a61b6829ff86294837cfc51f039c
Discussion
Comments Be the First to Comment

Please log in to comment

    No comments yet

Related skills