Skip to content

feat(skills): add instrument-metrics skill family - #255

Merged
DanielVisca merged 3 commits into
mainfrom
posthog-code/instrument-metrics-skill
Aug 27, 2026
Merged

feat(skills): add instrument-metrics skill family#255
DanielVisca merged 3 commits into
mainfrom
posthog-code/instrument-metrics-skill

Conversation

@DanielVisca

Copy link
Copy Markdown
Contributor

Changes

Adds the metrics sibling of the logs skill family:

  • context/skills/metrics/ — per-platform variants (Web JavaScript, Node.js, Python, Other Languages) sourcing the new /docs/metrics/installation/* pages
  • context/skills/omnibus/instrument-metrics/ — aggregated all-platforms skill with step-by-step instructions: detect existing metrics instrumentation, add posthog.metrics capture alongside it (never replace), add new metrics where they belong, keep cardinality low, and wire env vars via the MCP projects-get flow
  • posthog-metrics plugin mapping in context/marketplace.yaml

Why: metrics is the one observability product missing from the instrument-* family, so agents asked to "push metrics into PostHog" improvise OTel plumbing instead of using the posthog.metrics SDK APIs that shipped in posthog-js #4115, posthog-node #4117, and posthog-python #739.

Depends on

⚠️ Blocked on PostHog/posthog.com#18700 deploying — the variant docs_urls point at the new installation pages and the build fetches them at generation time (currently 404).

Validation

  • npm test — 136/136 pass
  • npm run build with the doc URLs temporarily substituted for live metrics pages: all 5 skills generate (metrics-{javascript,nodejs,python,other}, omnibus-instrument-metrics), zips build, posthog-metrics marketplace plugin renders with correct SKILL.md frontmatter, and entries appear in skill-menu.json

Created with PostHog Code

Adds the metrics sibling of the logs skill family: per-platform variants (Web JavaScript, Node.js, Python, Other Languages) plus an aggregated omnibus/instrument-metrics skill, and a posthog-metrics plugin mapping in marketplace.yaml. The skill teaches agents to add posthog.metrics capture alongside existing Prometheus/StatsD/OTel instrumentation and to add new metrics where they belong, with cardinality and metric-type guidance.

Generated-By: PostHog Code
Task-Id: 470062dd-05c0-40bf-bfa3-bc89b194121e
@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 basic-integration
  • /wizard-ci mcp-analytics
  • /wizard-ci revenue

Test an individual app:

  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
Show more apps
  • /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

Results will be posted here when complete.

@DanielVisca
DanielVisca marked this pull request as ready for review July 20, 2026 20:00
@DanielVisca
DanielVisca requested a review from a team as a code owner July 20, 2026 20:00

@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.

:chef-kiss:

This branch added context/skills/metrics/ before an equivalent family landed on main, so the two collided. Main's version is the newer one - it gained a Kubernetes variant and the architecture reference - so adopt it verbatim here. That leaves the omnibus skill and the marketplace mapping as this branch's only remaining contribution, and lets main merge in cleanly.

Generated-By: PostHog Desktop
Task-Id: 8147d9e4-7db5-46a3-a349-6b859021cca7
The omnibus skill listed the docs that existed when it was written. The metrics family has since gained a Kubernetes installation guide and an architecture reference, so add both - the omnibus skill is meant to cover every platform, and it was silently missing one.

Generated-By: PostHog Desktop
Task-Id: 8147d9e4-7db5-46a3-a349-6b859021cca7
@DanielVisca
DanielVisca merged commit 6cd6522 into main Aug 27, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants