consuming-endpoints-from-client-code

consuming-endpoints-from-client-code is a skill for Claude Code, Codex from PostHog/posthog-foss. It costs 105 tokens per session (2,743 once invoked), scanned A, original, MIT.

A guide for calling a PostHog endpoint from another application, such as a mobile app, backend, dashboard, or data pipeline. It covers the endpoint's API description, request data, authentication, and common errors.

In plain words
What is it for?
Use it to generate a typed client, build a valid request, test an endpoint call, or troubleshoot authentication and request failures.
Why use it?
It removes guesswork when integrating an endpoint, especially around required variables, authorization, rate limits, and materialised data.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is pnpm dlx @hey-api/openapi-ts -i spec.json -o ./generated/posthog.

Good fit Use it to generate a typed client, build a valid request, test an endpoint call, or troubleshoot authentication and request failures.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/PostHog/posthog-foss
agentmods
npx agentmods add skills/posthog/posthog-foss/consuming-endpoints-from-client-code

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for consuming-endpoints-from-client-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/posthog/posthog-foss/consuming-endpoints-from-client-code/github.svg)](https://agentmods.dev/skills/posthog/posthog-foss/consuming-endpoints-from-client-code)
Your own site
<a href="https://agentmods.dev/skills/posthog/posthog-foss/consuming-endpoints-from-client-code"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/consuming-endpoints-from-client-code/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for consuming-endpoints-from-client-code

Your own site · 80×15
<a href="https://agentmods.dev/skills/posthog/posthog-foss/consuming-endpoints-from-client-code"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/consuming-endpoints-from-client-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 105 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,743 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 4 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Prompt Injection · line 30
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 76
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 79
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 80
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00105 $0.02743
Opus 5 $0.00053 $0.01372
Sonnet 5 $0.00021 $0.00549
Haiku 4.5 $0.00011 $0.00274

Measured 7d ago against content hash 544c15e8e5ac, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

consuming-endpoints-from-client-code scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

products/endpoints/skills/consuming-endpoints-from-client-code/SKILL.md · 238 lines

How it starts

The opening of the file, as written. The whole thing — 238 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Consuming endpoints from client code

This skill is the caller-side counterpart to creating-an-endpoint. It helps integrate an existing endpoint into a separate codebase — a mobile app, server backend, customer dashboard, or downstream pipeline. No PostHog code is modified here.

When to use this skill

  • "How do I call my endpoint?" / "What does a request look like?"
  • "Generate a typed TypeScript / Python / Go client for this endpoint"
  • "I'm getting a 401 calling the endpoint" / auth questions
  • "The endpoint rejects my call when I omit user_id" → materialised-endpoint variable questions
  • "How do I handle rate limits?"

If the user is creating the endpoint, use creating-an-endpoint first.

Available tools

Tool Purpose
endpoint-get Full config for a named endpoint, including the query shape and required variables
endpoint-openapi-spec OpenAPI 3.0 spec for one endpoint, ready to feed to a code generator
endpoint-run A live call against the endpoint — useful to confirm a payload works before sharing it with the user's app

The endpoint URL

/api/projects/{team_id}/endpoints/{name}/run
  • team_id is the project ID (numeric). Available in PostHog under project settings, or via projects-get if the user doesn't know it.
  • name is the endpoint name — see endpoints-get-all if the user isn't sure.
  • The trailing /run is required.

POST is the canonical method. GET also works for simple cases without a request body but POST is preferred — variables go in the body.

Auth

Endpoints are authenticated with a personal API key. The header is:

Authorization: Bearer <key>

Read the full file on GitHub · 238 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 238 lines · 105 tokens per session scan A 544c15e8e5ac

Subscribe to this mod's changes

consuming-endpoints-from-client-code is a skill published in the GitHub repository PostHog/posthog-foss (715 stars, last pushed today), licensed MIT. It adds 105 tokens to every session and 2,743 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

gemini-api-agent-platform

Guides the usage of the Gemini API on Agent Platform with the Google Gen AI SDK for enterprise AI applications. Covers SDK usage (Python, JS/TS, Go, Java, C#), capabilities like Live API, tools, multimedia generation, caching, and batch prediction.

davila7/claude-code-templates · 61 tokens

open-source

Documentation reference for writing Python code using the browser-use open-source library. Use this skill whenever the user needs help with Agent, Browser, or Tools configuration, is writing code that imports from browseruse, asks about @sandbox deployment, supported LLM models, Actor API, custom tools, lifecycle…

browser-use/browser-use · 137 tokens

deepstream-sop

Use this skill when building, deploying, evaluating, debugging, or measuring latency for the DeepStream SOP Inference Microservice — a GPU-accelerated FastAPI service that detects whether operators perform assembly-line steps in order via event boundary detection (GEBD) plus VLM classification. Trigger even if the…

NVIDIA/skills · 219 tokens

gemini-api-dev

Use this skill when writing code that calls the Gemini API for text generation, multi-turn chat, multimodal understanding, image generation, video generation, streaming responses, background research tasks, function calling, structured output, or migrating from the old generateContent API. Covers SDK usage and best…

google-gemini/gemini-skills · 73 tokens

azure-search-documents-dotnet

Azure AI Search SDK for .NET (Azure.Search.Documents). Use for building search applications with full-text, vector, semantic, and hybrid search. Covers SearchClient (queries, document CRUD), SearchIndexClient (index management), and SearchIndexerClient (indexers, skillsets). Triggers: "Azure Search .NET"…

microsoft/skills · 102 tokens

azure-search-documents-ts

Build search applications using Azure AI Search SDK for JavaScript (@azure/search-documents). Use when creating/managing indexes, implementing vector/hybrid search, semantic ranking, or building agentic retrieval with knowledge bases.

microsoft/skills · 48 tokens