Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

consuming-endpoints-from-client-code

Skill by PostHog

Explains how to call a PostHog endpoint from client code. It covers the run URL, the auth header, the variables payload, typed client generation and error handling.

  • Score 85
  • 41k stars
  • NOASSERTION
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install consuming-endpoints-from-client-code

Built from the published package, never by AI.

git clone --depth 1 https://github.com/PostHog/posthog /tmp/posthog && mkdir -p ~/.claude/skills && cp -r /tmp/posthog/products/endpoints/skills/consuming-endpoints-from-client-code ~/.claude/skills/consuming-endpoints-from-client-code

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install consuming-endpoints-from-client-code in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill helps developers integrate an existing PostHog endpoint into a separate codebase, such as a mobile app, server backend, customer dashboard or downstream pipeline. It is the caller-side counterpart to creating-an-endpoint and does not modify PostHog code.

It walks through the endpoint URL, the Bearer personal API key header, and the request payload with variables, limit, offset and refresh. It explains that materialised endpoints require every declared variable, and it describes generating a typed client from the endpoint's OpenAPI 3.0 spec with openapi-generator or @hey-api/openapi-ts. It also covers the response shape, PostHog CLI calls, and handling of 400, 401, 403, 404, 429 and 5xx responses.

Written from the project's SKILL.md and checked against it.

What it can do

  • endpoint-getReturns the full config for a named endpoint, including query shape and required variables.
  • endpoint-openapi-specReturns an OpenAPI 3.0 spec for one endpoint, ready for a code generator.
  • endpoint-runMakes a live call against the endpoint to confirm a payload works.

What you need

  • A PostHog personal API key with endpoint:read scope
  • A PostHog project with a named endpoint
  • openapi-generator or @hey-api/openapi-ts for typed client generation

Try asking

  • How do I call my monthly_active_users endpoint from my backend?
  • Generate a typed TypeScript client for this PostHog endpoint
  • What auth header do I use to call my PostHog endpoint?

Good to know

  • Personal API keys must stay server-side, never in mobile apps or browser JS.
  • Materialised endpoints require every declared variable on each call.
  • Rate limits apply per team, not per endpoint.
  • The posthog-cli exp commands are experimental and may change.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: products/endpoints/skills/consuming-endpoints-from-client-code/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md13 KB

Alternatives to consuming-endpoints-from-client-code

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

consuming-endpoints-from-client-code: common questions

What auth header do PostHog endpoint calls need?

Calls use Authorization: Bearer with a personal API key that has at least the endpoint:read scope. The source says the key should stay on the server.

Why does my materialised endpoint return a 400 error?

A materialised endpoint requires every declared variable on each call. The source says the fix is in the call, not in the endpoint.

Should I pin the endpoint version when calling it?

The source recommends calling with ?version=N. Without it, the latest active version runs, and a query edit can change results.

How do I install consuming-endpoints-from-client-code?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is consuming-endpoints-from-client-code free?

The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.

Is consuming-endpoints-from-client-code safe to use?

It scores 85 of 100. Grades: maintenance A, licence F, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to consuming-endpoints-from-client-code?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

consuming-endpoints-from-client-code Install

Add to stack

Loading.