CtrlK
BlogDocsLog inGet started
Tessl Logo

instrumenting-first-party-metrics

How to instrument PostHog's own Metrics product from PostHog-owned code — record counters, gauges, and histograms that land in posthog.metrics, the same way customers do. Use when adding application metrics in this monorepo (web, Celery, Temporal), when asked to push or ship metrics into posthog metrics, or when unsure whether the SDK in this environment supports posthog.metrics yet. Covers the environment decision (SDK-first per the public docs, OTel fallback when the SDK path is not available), the exact version gates per SDK, what is already wired internally, and how to validate metrics actually arrive.

77

Quality

97%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

—

The risk profile of this skill

SKILL.md
Quality
Evals
Security

Quality

Content

92%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

The body is dense, executable, and well-sequenced with real file paths and a dedicated validation step. It earns its length by capturing non-obvious PostHog-internal wiring rather than restating known concepts.

Suggestions

Tighten the Temporal-worker warning block: lead with the actionable rule (use the SDK path or Temporal meter from a worker) and compress the CombinedMetricsServer deployment-detail explanation into a single line.

Consider moving the Step 4 dev/test gotchas and arrival-check details into a short references/validating-metrics.md so the main flow stays scannable, if a bundle directory is ever added.

DimensionReasoningScore

Conciseness

Lean and assumes Claude's competence throughout — no explaining what metrics/OTel are — but the Temporal-worker admonition and a few multi-clause sentences could be trimmed without losing the critical gotcha.

4 / 5

Actionability

Fully executable: copy-paste Python for both SDK and OTel paths, concrete commands (grep pyproject.toml, bin/verify-metrics-pipe), named MCP tools, a SQL check, and real reference call-site paths covering the common cases.

5 / 5

Workflow Clarity

A clear four-step sequence (identify environment → version gate → instrument → validate) with an explicit validation step, arrival checks, and feedback loops (confirm before dashboards, fallback when below the gate).

5 / 5

Progressive Disclosure

No bundle files exist; the single self-contained document is organized into clear, navigable sections (Steps 1–4, What not to do, Adjacent) with no nested references, satisfying the no-external-reference exception.

5 / 5

Total

19

/

20

Passed

Description

100%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A high-quality description: third-person, concrete, with explicit trigger guidance and a well-bounded niche. It tells Claude both what the skill does and precisely when to invoke it without padding.

DimensionReasoningScore

Specificity

Lists concrete actions — "record counters, gauges, and histograms that land in posthog.metrics" — plus environment decision, version gates, internal wiring, and validation; comprehensive coverage rather than vague abstraction.

5 / 5

Completeness

Explicitly answers both what (instrument PostHog's Metrics product from PostHog-owned code) and when (a concrete "Use when..." clause enumerating three trigger scenarios).

5 / 5

Trigger Term Quality

Natural trigger phrases with synonyms — "adding application metrics", "push or ship metrics into posthog metrics", "when unsure whether the SDK...supports posthog.metrics yet" — map closely to what a user would actually say.

5 / 5

Distinctiveness Conflict Risk

Scoped tightly to PostHog-owned code in a specific monorepo targeting posthog.metrics, giving it a clear niche with minimal overlap risk against generic metrics skills.

5 / 5

Total

20

/

20

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository
PostHog/posthog
Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.