Skip to content

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

Open
DanielVisca wants to merge 1 commit into
mainfrom
posthog-code/instrument-metrics-skill
Open

feat(skills): add instrument-metrics skill family#255
DanielVisca wants to merge 1 commit into
mainfrom
posthog-code/instrument-metrics-skill

Conversation

@DanielVisca

Copy link
Copy Markdown

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:

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