Official agent skill

Exploring LLM Costs

by PostHog in PostHog/posthog

Investigate LLM spend in PostHog — total cost over time, cost by model, provider, user, trace, or custom dimension, token and cache-hit economics, and cost regressions.

OfficialCustom licenceAuto-check passedAI & LLM Engineering

Install Exploring LLM Costs

skills CLI
$ npx skills add PostHog/posthog --skill exploring-llm-costs -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install PostHog/posthog exploring-llm-costs --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/PostHog/posthog.git skills-src && mkdir -p .claude/skills && cp -r skills-src/products/ai_observability/skills/exploring-llm-costs .claude/skills/exploring-llm-costs && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
exploring-llm-costs
GitHub stars
40k
Token cost
~2.9k tokens
SKILL.md length
1,269 words
Files
7 (incl. references)
Skills in repo
252
Repo updated
First seen
Licence
Custom licence

At a glance

Investigate LLM spend in PostHog — total cost over time, cost by model, provider, user, trace, or custom dimension, token and cache-hit economics, and cost regressions.

  • The user asks how much are we spending on LLMs?
  • SKILL.md covers Tools, Core rules, Workflow: total spend in a… and Workflow: cost breakdowns, plus 8 more sections
  • Reaches us.posthog.com
  • Which model / user / feature is most expensive?

What it does

Exploring LLM Costs is an agent skill from PostHog/posthog, published by the product's own GitHub organization. Investigate LLM spend in PostHog — total cost over time, cost by model, provider, user, trace, or custom dimension, token and cache-hit economics, and cost regressions. Use when the user asks "how much are we spending on LLMs?", "which model / user / feature is most expensive?", "why did cost spike?", wants to build a cost dashboard or alert, or pastes a trace URL and asks about its cost.

Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including reference files (for example `references/breakdown-patterns.md`, `references/cache-accounting.md` and `references/cost-properties.md`).

It sits in AI & LLM Engineering, covering LLM cost and token optimization. It works with PostHog. The repository describes itself as: :hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error…

When your agent uses it

  • The user asks how much are we spending on LLMs?
  • Which model / user / feature is most expensive?
  • Why did cost spike?
  • Wants to build a cost dashboard

Example prompts

  • “how much are we spending on LLMs?”
  • “which model / user / feature is most expensive?”
  • “why did cost spike?”
  • “/exploring-llm-costs”

What it can do on your machine

Read from SKILL.md and the folder at commit 812e5c6. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are sql and json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • us.posthog.com

    Also links to:

    • posthog.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Exploring LLM Costs loads about 2.9k tokens when it runs, and up to ~8.5k if it reads all its reference files. Until then it costs about 103 tokens; SKILL.md has 1,269 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~103
When it runs · the whole SKILL.md, loaded when a task matches
~2.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~8.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 1,269 words (~2,857 tokens).

“PostHog attaches per-call cost metadata to every $ai_generation and $ai_embedding event at ingestion time. Every cost question reduces to an aggregation over those two event types — the interesting variation is only in how you group, filter, and compare.”

— opening of SKILL.md by PostHog, Custom licence
name
exploring-llm-costs

Read the full SKILL.md on GitHub

Files

SKILL.md and 6 other files (references) in products/ai_observability/skills/exploring-llm-costs of PostHog/posthog.

  • SKILL.md
  • references/breakdown-patterns.md
  • references/cache-accounting.md
  • references/cost-properties.md
  • references/cost-sources.md
  • references/materializing.md
  • references/regression-debugging.md

Open the folder on GitHubat commit 812e5c6

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders. This page covers the copy in PostHog/posthog, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Exploring LLM Costs next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Exploring LLM Costs compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Exploring LLM Costs this skillPostHog/posthog40k—~2.9kAutomated safety check: PassCustom licence
Pp Posthogmvanhorn/printing-press-library2.1k—~3.2kAutomated safety check: NotesApache-2.0
Context Compressionguanyang/open-agent-hub9772 repos~4.6kAutomated safety check: PassMIT
Bounty Hunter1sadjlk/bounty-hunter-skill2821 repos~761Automated safety check: PassMIT
Skill Shortenerluongnv89/asm954—~3.8kAutomated safety check: NotesMIT
Fleet Auditoralexgreensh/token-optimizer2.5k—~1.7kAutomated safety check: PassCustom licence

Similar skills

  • Pp Posthog

    mvanhorn/printing-press-library

    Every PostHog resource in one CLI — with offline search, agent-native output, and cross-resource analytics no...

    2.1k GitHub stars~3.2k tokensUpdated today
    AI & LLM EngineeringAuto-check: notes
  • Context Compression

    guanyang/open-agent-hub

    This skill should be used when long-running agent sessions need context compression, structured summarization, compaction, token-per-task optimization, or durable handoff summaries that preserve…

    977 GitHub starsUsed in 2 repos~4.6k tokens
    AI & LLM EngineeringAuto-check passed
  • Bounty Hunter

    1sadjlk/bounty-hunter-skill

    A professional AI bounty hunter persona named Atlas. An agent skill from 1sadjlk/bounty-hunter-skill.

    282 GitHub starsUsed in 1 repo~761 tokens
    AI & LLM EngineeringAuto-check passed
  • Skill Shortener

    luongnv89/asm

    Refactor a too-long SKILL.md by progressive disclosure: measure token cost, classify every section KEEP/CUT/MOVE, shorten the body into references/ and scripts/, verify nothing was lost.

    954 GitHub stars~3.8k tokensUpdated 3 days ago
    AI & LLM EngineeringAuto-check: notes
  • Fleet Auditor

    alexgreensh/token-optimizer

    Cross-system agent token/cost audit (Claude Code, Codex, OpenClaw, Hermes, OpenCode): idle burns, model misrouting, config bloat, with dollar savings.

    2.5k GitHub stars~1.7k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Context Audit

    undefined-ui/second-brain-os

    Audit an agent's context layout against the four places: system prompt, tools, history, tail.

    1k GitHub stars~802 tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed

More from PostHog/posthog

All 252 skills in this repo
  • Authoring Log Alerts

    PostHog/posthog

    Official

    Author useful, low-noise log alerts on services in a PostHog project.

    40k GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Official

    Operating procedure for the conflict-autoresolver agent: sweep open PostHog/posthog PRs that conflict with master, resolve the trivial conflicts (generated artifacts deterministically, source…

    40k GitHub stars~4.2k tokensUpdated today
    Auto-check passed
  • Official

    Help users debug PostHog Error Tracking stack-trace symbolication for any supported platform — JavaScript/TypeScript web, React Native (Hermes), Android (Proguard / R8), or iOS / macOS (dSYM).

    40k GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Exploring Apm Traces

    PostHog/posthog

    Official

    Investigates distributed application performance using PostHog APM (OpenTelemetry span) data via MCP.

    40k GitHub stars~3.5k tokensUpdated today
    Auto-check passed
  • Exploring LLM Traces

    PostHog/posthog

    Official

    Debug and inspect LLM/AI agent traces using PostHog's MCP tools.

    40k GitHub stars~4.4k tokensUpdated today
    Auto-check passed
  • Investigate Metric

    PostHog/posthog

    Official

    Diagnose why a product metric changed (dropped, spiked, or plateaued) by orchestrating breakdowns, actors, paths, lifecycle, retention, and annotations queries.

    40k GitHub stars~1.9k tokensUpdated today
    Auto-check passed

Works with

Questions about Exploring LLM Costs

What does Exploring LLM Costs do?

Investigate LLM spend in PostHog — total cost over time, cost by model, provider, user, trace, or custom dimension, token and cache-hit economics, and cost regressions. Exploring LLM Costs is an agent skill from PostHog/posthog, published by the product's own GitHub organization. Investigate LLM spend in PostHog — total cost over time, cost by model, provider, user, trace, or custom dimension, token and cache-hit economics, and cost regressions.

When should I use Exploring LLM Costs?

Exploring LLM Costs fits situations like: the user asks how much are we spending on LLMs?; which model / user / feature is most expensive?; why did cost spike?; wants to build a cost dashboard.

How do I install Exploring LLM Costs in Claude Code?

Run `npx skills add PostHog/posthog --skill exploring-llm-costs -a claude-code`. Or copy the skill folder (products/ai_observability/skills/exploring-llm-costs in PostHog/posthog) into .claude/skills/exploring-llm-costs in your project. Claude Code loads it when a task matches its description.

How do I install Exploring LLM Costs in Codex?

Run `npx skills add PostHog/posthog --skill exploring-llm-costs -a codex`. Or copy the skill folder (products/ai_observability/skills/exploring-llm-costs in PostHog/posthog) into .agents/skills/exploring-llm-costs in your project. Codex loads it when a task matches its description.

Can I use Exploring LLM Costs in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add PostHog/posthog --skill exploring-llm-costs -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/exploring-llm-costs, .gemini/skills/exploring-llm-costs, .github/skills/exploring-llm-costs and .opencode/skills/exploring-llm-costs in your project.

What does Exploring LLM Costs need to run?

SKILL.md names no scripts, command-line tools or credentials: Exploring LLM Costs is instructions for the agent only.

Does Exploring LLM Costs access the network?

SKILL.md names 2 domains. In commands or code: us.posthog.com; the agent is likely to contact it when it follows the instructions. As links in the text: posthog.com. This is read from the text; nothing was executed.

Is Exploring LLM Costs safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Exploring LLM Costs use?

Exploring LLM Costs has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Exploring LLM Costs use?

About 2.9k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 5.6k tokens, read only when the agent opens those files.

What are the alternatives to Exploring LLM Costs?

Skills that share tags, products or a category with Exploring LLM Costs: Pp Posthog (mvanhorn/printing-press-library, 2.1k stars), Context Compression (guanyang/open-agent-hub, 977 stars), Bounty Hunter (1sadjlk/bounty-hunter-skill, 282 stars) and Skill Shortener (luongnv89/asm, 954 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Exploring LLM Costs?

PostHog (a GitHub organization, an official publisher) maintains it in PostHog/posthog, which has 40,200 GitHub stars. The repository holds 252 skills in this directory. The repository was last updated on October 9, 2026.

Source: PostHog/posthog on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.