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.
npx skills add PostHog/skills --skill instrument-logsgit clone --depth 1 https://github.com/PostHog/skillsWrote 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.
[](https://agentmods.dev/skills/posthog/skills/instrument-logs)<a href="https://agentmods.dev/skills/posthog/skills/instrument-logs"><img src="https://agentmods.dev/badge/skills/posthog/skills/instrument-logs/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.
<a href="https://agentmods.dev/skills/posthog/skills/instrument-logs"><img src="https://agentmods.dev/badge/skills/posthog/skills/instrument-logs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
- Socket pass
- Snyk fail
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00046 | $0.01576 |
| Opus 5.5 | $0.00018 | $0.00630 |
| Sonnet 5.5 | $0.00009 | $0.00315 |
| Haiku 4.5 | $0.00005 | $0.00158 |
Grade A, and why
instrument-logs 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 13d 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.
How it starts
The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Add PostHog log capture
Use this skill to add PostHog log capture for new or changed code. Use it after implementing features or reviewing PRs to ensure meaningful log events are captured with structured properties. If PostHog log export is not yet configured, this skill also covers initial OTLP exporter setup. Supports any platform or language.
Supported platforms: Next.js, Node.js, Python, Go, Java, Datadog, Android, React Native, iOS, and any language via OpenTelemetry.
Instructions
Follow these steps IN ORDER:
STEP 1: Analyze the codebase and detect the platform.
- Detect the language, framework, and existing logging setup.
- Look for dependency files and project files (package.json, Podfile, Package.swift, requirements.txt, go.mod, pom.xml, etc.).
- Look for log libraries (winston, pino, logging module, logrus, log4j, serilog, os_log, Logger, etc.).
- Look for lockfiles (pnpm-lock.yaml, package-lock.json, yarn.lock, bun.lockb, go.sum, Podfile.lock, Package.resolved, etc.) to determine the package manager.
- Check for existing PostHog log export setup. If the OTLP exporter is already configured, skip to STEP 5 to add log capture for new code.
STEP 2: Research log capture. (Skip if PostHog log export is already configured.) 2.1. Find the reference file below that matches the detected platform — it is the source of truth for OTLP exporter configuration and integration with existing logging. Read it now. 2.2. If no reference matches, use the "Other Languages" reference as a fallback — it covers the generic OpenTelemetry approach.
STEP 3: Install dependencies. (Skip if PostHog log export is already configured.)
- Install the OpenTelemetry SDK and OTLP exporter packages for the detected platform.
- Do not manually edit dependency files — use the package manager's install command.
- If the project keeps more than one lockfile for the same manifest, such as a second Gemfile lock for another bundle, update each one.
STEP 4: Configure the OTLP exporter. (Skip if PostHog log export is already configured.)
- PostHog logs use the OpenTelemetry protocol. Set up an OTLP exporter pointed at PostHog's ingest endpoint.
- For SDK-native log support such as Android, React Native, and iOS, follow the platform reference instead of adding a separate OTLP exporter.
- Follow the platform-specific reference for the exact configuration.
What ships with it
18 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/android.md 9.3 KB
- references/best-practices.md 25 KB
- references/COMMANDMENTS.md 1.5 KB
- references/datadog.md 5.0 KB
- references/flutter.md 21 KB
- references/go.md 4.9 KB
- references/ios.md 12 KB
- references/java.md 4.7 KB
- references/link-session-replay.md 6.4 KB
- references/mcp.md 4.1 KB
- references/nextjs.md 6.9 KB
- references/nodejs.md 5.2 KB
- references/other.md 3.5 KB
- references/python.md 4.8 KB
- references/react-native.md 11 KB
- references/search.md 8.0 KB
- references/start-here.md 10 KB
- references/troubleshooting.md 6.5 KB
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.
- 13d ago Changed d096e6c08a49
- 19d ago Changed · +4 lines 26d110d763df
- 2mo ago Changed 0b8cec60146c
- 2mo ago Changed · +1 lines 6508b9b8ec50
- 3mo ago First seen · 87 lines · 46 tokens per session scan A e456e06e0f69
instrument-logs is a skill published in the GitHub repository PostHog/skills (81 stars, last pushed today), licensed MIT. It adds 46 tokens to every session and 1,576 once invoked, about $0.0002 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-08-30.
instrument-logs compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| instrument-logsPostHog/skills | Skill | 81 | today | MIT | A | 46 | Claude Code, Codex |
| mem0-oss-to-platformmem0ai/mem0 | Skill | 70k | 3d ago | Apache-2.0 | A | 217 | Claude Code, Codex |
| tao-run-inference-serviceNVIDIA/skills | Skill | 4.2k | today | Apache-2.0 | A | 92 | Claude Code |
| azure-mgmt-botservice-dotnetmicrosoft/skills | Skill | 3.3k | today | MIT | A | 78 | Claude Code |
| fastapi-router-pymicrosoft/skills | Skill | 3.3k | today | MIT | A | 46 | Claude Code |
| api-designericrisco/rsc-harness | Skill | 691 | 5d ago | MIT | A | 105 | Claude Code, Codex |
| migrate-segw-to-raparc-mcp/arc-1 | Skill | 275 | today | MIT | A | 106 | Claude Code |