exploring-llm-traces

exploring-llm-traces is a skill for Claude Code, Codex from PostHog/posthog-foss. It costs 146 tokens per session (4,561 once invoked), scanned A, original, MIT.

A tool for inspecting recorded AI and agent interactions in PostHog. It shows a trace as a tree of related events, such as language-model calls, retrieval steps, and tool executions.

In plain words
What is it for?
Use it to search for traces, open one in detail, debug an AI response, check tool usage, and verify which context or files were provided.
Why use it?
It helps you see what happened inside a single AI interaction instead of judging only the final answer. This makes incorrect tool use, missing context, and other debugging clues easier to find.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; mentions Claude Code.

Good fit Use it to search for traces, open one in detail, debug an AI response, check tool usage, and verify which context or files were provided.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/posthog/posthog-foss/exploring-llm-traces
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add PostHog/posthog-foss --skill exploring-llm-traces
Clone the repo
git clone --depth 1 https://github.com/PostHog/posthog-foss

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 exploring-llm-traces

README.md
[![agentmods](https://agentmods.dev/badge/skills/posthog/posthog-foss/exploring-llm-traces/github.svg)](https://agentmods.dev/skills/posthog/posthog-foss/exploring-llm-traces)
Your own site
<a href="https://agentmods.dev/skills/posthog/posthog-foss/exploring-llm-traces"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/exploring-llm-traces/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 exploring-llm-traces

Your own site · 80×15
<a href="https://agentmods.dev/skills/posthog/posthog-foss/exploring-llm-traces"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/exploring-llm-traces.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 146 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,561 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: 1 finding, 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 281
    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.00146 $0.04561
Opus 5.5 $0.00058 $0.01824
Sonnet 5.5 $0.00029 $0.00912
Haiku 4.5 $0.00015 $0.00456

Measured today against content hash 225d6b716a77, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

exploring-llm-traces 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 today.

The scan reads SKILL.md. This mod also ships 6 executable files (scripts/extract_conversation.py, scripts/extract_span.py, scripts/print_summary.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/ai_observability/skills/exploring-llm-traces/SKILL.md · 373 lines

How it starts

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

Exploring LLM traces with MCP tools

PostHog captures LLM/AI agent activity as traces. Each trace is a tree of events representing a single AI interaction — from the top-level agent invocation down to individual LLM API calls.

Available tools

Tool Purpose
posthog:query-llm-traces-list Search and list traces; can return large multi-trace payloads
posthog:query-llm-trace Get a single trace by ID with full event tree
posthog:read-data-schema Discover custom event/person properties before filtering
posthog:execute-sql Ad-hoc SQL for complex trace analysis

Event hierarchy

See the event reference for the full schema.

$ai_trace (top-level container)
  └── $ai_span (logical groupings, e.g. "RAG retrieval", "tool execution")
        ├── $ai_generation (individual LLM API call)
        └── $ai_embedding (embedding creation)

Events are linked via $ai_parent_id → parent's $ai_span_id or $ai_trace_id.

Workflow: debug a trace or session from a URL

Step 1 — Classify the URL

First inspect the path. Do not treat every UUID-looking value as a trace ID.

  • /ai-observability/traces/<trace_id> or legacy /llm-analytics/traces/<trace_id> / /llm-observability/traces/<trace_id> is a single trace. Fetch it with posthog:query-llm-trace.
  • /ai-observability/sessions/<session_id> or legacy /llm-analytics/sessions/<session_id> is an AI session, not a trace. Fetch traces with posthog:query-llm-traces-list filtered by event property $ai_session_id.

Preserve date_from / date_to query parameters from the URL when present. If none are present but the URL has a timestamp query parameter, use that timestamp as the anchor and query an absolute window around it, for example timestamp - 36h to timestamp + 36h. This handles exact session links whose UI timestamp may be offset from the stored event timestamps while keeping the query bounded. If the URL has neither explicit dates nor timestamp, use a safe default like {"date_from": "-7d"}.

Read the full file on GitHub · 373 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. today Changed · +2 lines 225d6b716a77
  2. 5d ago Changed · +1 lines 30427d23d6e8
  3. 7d ago Changed · +11 lines e3a53f2cd2eb
  4. 27d ago Changed · +1 lines dbcda55e4a8f
  5. 2mo ago Changed · +26 lines 202fc32a4efc
  6. 2mo ago Changed · +33 lines 0f8f494b1512
  7. 2mo ago First seen · 299 lines · 146 tokens per session scan A 2ca9ec45f1a7

Subscribe to this mod's changes

exploring-llm-traces is a skill published in the GitHub repository PostHog/posthog-foss (734 stars, last pushed today), licensed MIT. It adds 146 tokens to every session and 4,561 once invoked, about $0.0006 per session on Opus 5.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

exploring-llm-traces compared with skills from other repositories

exploring-llm-traces next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
exploring-llm-tracesPostHog/posthog-fossSkill734todayMITA146Claude Code, Codex
systematic-debuggingopen-metadata/OpenMetadataSkill16ktodayApache-2.0A37Claude Code
log-error-digestzebbern/claude-code-guideSkill4.7ktodayMITA71Claude Code, Codex
observability-audit-sessionsIBM/mcp-context-forgeSkill4.9ktodayApache-2.0A64Claude Code, Codex
cwv-optimizeradobe/skillsSkill342todayApache-2.0A112Claude Code
ci-fixersipyourdrink-ltd/bernsteinSkill1.2ktodayApache-2.0A15Claude Code, Codex
diagnosing-missing-recordingsPostHog/posthogSkill41ktodaynoneA76Claude Code, Codex