feat: use PostHog MCP projects-get to auto-retrieve API key in instrument skills#25
Closed
feat: use PostHog MCP projects-get to auto-retrieve API key in instrument skills#25
Conversation
…ment skills Previously, the instrument-* skills either asked users for their API key inline, wrote placeholder values, or referenced an env-file-tools MCP server that isn't available in the plugin context. Now skills use the already-authenticated PostHog MCP server's projects-get tool to retrieve the api_token automatically, with graceful fallback if the MCP server is not connected or authenticated. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
|
@MattBro, these skills are auto-synced. You should update them in https://github.com/PostHog/context-mill. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
instrument-*skills (integration, product-analytics, feature-flags, error-tracking, llm-analytics, logs) need the user's PostHog project API key and host URL to write into.envfiles when setting up the SDK. Currently they either:env-file-toolsMCP server that doesn't exist in the plugin contextMeanwhile, the PostHog MCP server is already connected and authenticated via OAuth, and
projects-getreturns theapi_tokenfor every project.Changes
Updated the env var setup step in all 6
instrument-*SKILL.md files to:projects-getfrom the PostHog MCP to retrieve theapi_tokenHow did you test this code
projects-getreturnsapi_tokenvia the MCP toolsChangelog
No - this is an internal skill improvement, not a user-facing feature.