Repository navigation
fix(skills): read the project token and host from project-get - #511
Merged
Merged
Conversation
The mcp-analytics skill and the eight omnibus instrument-* skills told an agent with no project token to call the PostHog MCP tool projects-get for the project's api_token, and the omnibus skills read a region field from it for the host. projects-get lists the organization's projects without the token or a region, so the agent got neither and fell back to asking the person. project-get with no ID returns the active project's api_token and api_host; the skills now call it, and use projects-get only to find another project's ID when the active one may be wrong. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🧙 Wizard CIRun 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:
Test all apps in a directory:
Test an individual app:
Show more apps
Test against a wizard branch:
Add Results will be posted here when complete. |
The first commit read the token from the active project and asked only when that project "may not be" the app's, which an agent cannot check. The active project is shared state on the MCP key, so in an organization with several projects the agent could write another project's token with no error. List the projects with projects-get, ask when more than one comes back, as the skills did before, then read api_token and api_host from project-get with the chosen id. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Silthus
marked this pull request as ready for review
November 12, 2026 20:03
Silthus
marked this pull request as draft
November 14, 2026 17:47
The judge found that the skills now write the token of the only project projects-get lists without a word to the user. projects-get lists only the MCP key's active organization, so an app that belongs to another organization would silently send to the wrong project. Before this PR the lookup never returned a token, so the agent always asked. Name the project from project-get and confirm it with the user before writing the token. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Silthus
marked this pull request as ready for review
November 14, 2026 19:56
sarahxsanders
approved these changes
Nov 16, 2026
sarahxsanders
left a comment
Collaborator
There was a problem hiding this comment.
I'll run CI to make sure nothing breaks, but looks good!
Collaborator
|
/wizard-ci basic-integration |
🧙 Wizard CI ResultsTrigger ID:
Configuration
|
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
Nine skills tell an agent that has no project token to call the PostHog MCP tool
projects-getfor the project'sapi_token:mcp-analyticsand the eightomnibus/instrument-*skills. The omnibus skills also read aregionfield from that response to pick the host.projects-getlists the organization's projects. It returns neitherapi_tokennorregion, so the agent's call comes back without what it asked for, and it falls back to asking the person for their token and region. The MCP server's own description ofproject-getsays it is the one tool that returns the project API token, and thatapi_hostis the SDK host.Changes
projects-get, asks the user which one to use when more than one comes back (as it did before), then callsproject-getwith that project'sidand readsapi_token.projects-getlists only the active organization's projects, so a single listed project can still be the wrong one; before this PR the lookup never returned a token, so the agent always asked.api_hostfield of the same response. The omnibus skills no longer map aregionfield. The ask-the-user fallback stays.Worth: W-20261112-skills-project-get
Note
🔵 Merge risk: low · two-way door
mcp-analyticsor anomnibus/instrument-*skill with no token from their caller still list projects and ask when there are several, then readapi_tokenandapi_hostfromproject-getby id instead of failing to find them inprojects-get, in both regions.mcp-analytics-pythonvariant.How did you test this?
omnibus-instrument-product-analyticsskill on a scratch Node app with no token, against the live PostHog MCP, with no answer for the confirmation. With several projects listed, it asked which one, took the scripted answer, calledproject-getby id, named the project, asked for confirmation and wrote no file. Told to treat the list as holding one project, it skipped the which-project ask, calledproject-get, named the project, asked for confirmation and wrote no file. The one-project org is simulated in the prompt: the test organization has several projects.omnibus-instrument-product-analyticsskill on a scratch Node app with no token, against the live PostHog MCP. Unscripted, it listed projects and stopped to ask which one. With the user's answers scripted, it calledproject-getby id, named the project for confirmation, and wrote.envwith that project'sapi_tokenandapi_host.projects-get {}lists projects with noapi_tokenand noregion;project-get {"id": <a project that is not the active one>}returns that project'sapi_tokenandapi_host(https://us.i.posthog.comfor a US project). Evidence saved withfleet proof save.node_modules/.bin/vitest run scriptsat ded8183: 31 files, 350 tests passed.node scripts/build.jsexits 0 at ded8183. No built zip still holds the oldprojects-gettoken text or theregionmapping; the new text is in exactly the nine skills' zips plusmcp-analytics-python.Decisions
project-getwith no ID,api_hostfor the host, replacing theregionmappingprojects-getlists more than one, as before; the first commit's "if the active project may not be right" gave the agent nothing to check (panel round 1)Involvement: no grilling rounds, no prototypes; reviews: qa-swarm panel (9 lenses, on Claude during a GPT quota outage), a Claude final read (Michael approved the move), a GPT final read with no findings, the GPT judge, and ReviewHog; proof captured.
🤖 Generated with Claude Code