Skip to content

feat(skills): add metrics skill family (posthog.metrics) - #342

Merged
gewenyu99 merged 19 commits into
mainfrom
posthog/metrics-skill-family
Aug 21, 2026
Merged

feat(skills): add metrics skill family (posthog.metrics)#342
gewenyu99 merged 19 commits into
mainfrom
posthog/metrics-skill-family

Conversation

@DanielVisca

Copy link
Copy Markdown
Contributor

Adds a docs-driven metrics skill group — the first skill surface for the PostHog Metrics product (posthog.metrics count/gauge/histogram, alpha). Mirrors the logs family: config.yaml variants pulling the published installation docs, plus a description template that carries the placement discipline (instrument middleware / background jobs / external calls / business commit sites; low-cardinality attributes only; no per-user context).

Variants: metrics-python, metrics-nodejs, metrics-javascript, metrics-kubernetes, metrics-other (OTLP fallback). No cli: block — Tier 1 scope, reachable via wizard skill metrics-<variant> with no wizard release.

Why

The wizard can already place event capture from skill markdown; this gives it the same knowledge surface for application metrics, as groundwork for instrumenting metrics during wizard runs.

Validation (end to end)

  • TDD: scripts/lib/tests/metrics-skills.test.js written first (red), then the config (green). Full suite 149/149; npm run build emits the 5 zips + menu entries; warlock scan passes.
  • Instrumented the wizard-workbench Flask microblog by following the built metrics-python skill, generated deterministic traffic, and queried the results back from PostHog: every counter matched exactly (http.requests 2xx/3xx/4xx = 47/11/5, posts.created = 7, users.registered = 2, final db.posts.total gauge = 7), and per-route p95 latency was immediately interpretable (password-hashing routes slowest, reads ~10 ms).
  • Validation chart (real ingested data): metrics-skill-validation.png · live data: metrics explorer (service microblog-metrics-e2e)

Note: Metrics is alpha — if the ingestion endpoint changes before GA, updating this skill is a context-mill release only.


Created with PostHog Desktop

Adds a docs-driven `metrics` skill group (python, nodejs, javascript, kubernetes, other/OTLP) mirroring the logs family, so the wizard can instrument posthog.metrics (count/gauge/histogram) via `wizard skill metrics-<variant>`. The description template carries the placement guidance: instrument middleware/jobs/external calls/business commit sites, low-cardinality attributes only.

Generated-By: PostHog Desktop
Task-Id: 495fbacb-61e8-4fdb-8c0f-7f69cd7a3fd6
@github-actions

Copy link
Copy Markdown

🧙 Wizard CI

Run the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands:

Test all apps:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci ai-observability
  • /wizard-ci basic-integration
  • /wizard-ci mcp-analytics
  • /wizard-ci revenue
  • /wizard-ci self-driving

Test an individual app:

  • /wizard-ci ai-observability/anthropic
  • /wizard-ci ai-observability/groq
  • /wizard-ci ai-observability/manual-capture
Show more apps
  • /wizard-ci ai-observability/openai
  • /wizard-ci ai-observability/openai-agents
  • /wizard-ci ai-observability/vercel-ai
  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
  • /wizard-ci basic-integration/django
  • /wizard-ci basic-integration/fastapi
  • /wizard-ci basic-integration/flask
  • /wizard-ci basic-integration/javascript-node
  • /wizard-ci basic-integration/javascript-web
  • /wizard-ci basic-integration/laravel
  • /wizard-ci basic-integration/next-js
  • /wizard-ci basic-integration/nuxt
  • /wizard-ci basic-integration/python
  • /wizard-ci basic-integration/rails
  • /wizard-ci basic-integration/react-native
  • /wizard-ci basic-integration/react-router
  • /wizard-ci basic-integration/sveltekit
  • /wizard-ci basic-integration/swift
  • /wizard-ci basic-integration/tanstack-router
  • /wizard-ci basic-integration/tanstack-start
  • /wizard-ci basic-integration/vue
  • /wizard-ci mcp-analytics/custom-dispatcher
  • /wizard-ci mcp-analytics/typescript-sdk
  • /wizard-ci revenue/stripe
  • /wizard-ci self-driving/astro
  • /wizard-ci self-driving/fastapi
  • /wizard-ci self-driving/nuxt
  • /wizard-ci self-driving/react-router
  • /wizard-ci self-driving/sveltekit

Results will be posted here when complete.

@DanielVisca
DanielVisca marked this pull request as ready for review August 18, 2026 16:47
@DanielVisca
DanielVisca requested a review from a team as a code owner August 18, 2026 16:47
DanielVisca added a commit to PostHog/wizard that referenced this pull request Aug 18, 2026
Flat skill command mirroring ai-observability: no fixed skillId — the agent loads the context-mill `metrics` category (PostHog/context-mill#342) and picks the platform variant (python, nodejs, javascript, kubernetes, other/OTLP) from the project manifest. Ships a metrics-specific intro screen, registry + switchboard binding, and program tests.

Generated-By: PostHog Desktop
Task-Id: 495fbacb-61e8-4fdb-8c0f-7f69cd7a3fd6

Copy link
Copy Markdown
Contributor Author

Wizard-side command for this skill family is now up: PostHog/wizard#1102 adds a flat wizard metrics TUI program (ai-observability shape — the agent picks the platform variant from this menu category at run time). Merge order: this PR first, then a context-mill release, then the wizard PR.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gewenyu99 and others added 14 commits August 21, 2026 11:44
…input

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ration report

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…the variant, not an install_skill call

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…try per framework

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
feat(metrics): orchestrator flow — verify the SDK before instrumenting
…tinel break, empty list falls back to one bare entry

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…docs are its reference files

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ching one themselves

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…— monorepo-aware, parallel chains

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…side an npm workspace gets its chain

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…n, every ecosystem

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gewenyu99

Copy link
Copy Markdown
Collaborator
Screenshot 2026-08-21 at 5 55 49 PM

Works great, added verify/install SDK steps + basic monorepo support

…y-vision — outro has a file to show

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gewenyu99

Copy link
Copy Markdown
Collaborator

1 last minor issue with handoff report. fixing quickly

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…-v2 — no report file

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@gewenyu99 gewenyu99 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All lookin good.

Image

@gewenyu99
gewenyu99 merged commit f57b7d9 into main Aug 21, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants