Fix Claude plugin marketplace and agent discovery - #2272
Fix Claude plugin marketplace and agent discovery#2272Brett Wilson (MSBrett) wants to merge 4 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the Claude Code plugin packaging for the FinOps Toolkit so Claude’s marketplace entry points at the actual plugin root in this repo, and the Claude-specific manifest explicitly declares agents and MCP configuration (with strict mode enabled to keep the manifest authoritative).
Changes:
- Declare Claude plugin
agentsandmcpServersinsrc/templates/agent-plugin/.claude-plugin/plugin.json. - Update PowerShell unit tests to validate Claude manifest paths/components and enforce strict mode in the Claude marketplace entry.
- Fix the Claude marketplace
sourcepath to the repo’s real plugin root for Claude (./src/templates/agent-plugin) and enablestrict: true.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/templates/agent-plugin/.claude-plugin/plugin.json | Adds explicit Claude manifest fields for agents and MCP servers, aligning with supported schema fields. |
| src/powershell/Tests/Unit/AgentPlugins.Tests.ps1 | Updates/extends Pester tests to validate Claude manifest component declarations and strict mode configuration. |
| .claude-plugin/marketplace.json | Points Claude marketplace source at the correct plugin root and enables strict mode for the entry. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Roland Krummenacher (RolandKrummenacher)
left a comment
There was a problem hiding this comment.
Verified the premise empirically rather than by reading alone: installed both the dev and PR versions of the plugin into isolated CLAUDE_CONFIG_DIRs and compared claude plugin details, and reproduced the symlink-source failure in a scratch marketplace.
Confirmed:
- On
dev, the.agent.mdfilenames cause Claude to derive agent ids from the filename stem and ignore frontmattername:, so agents surface asazure-capacity-manager.agent,ftk-database-query.agent, etc. This PR's version correctly exposes 5 unsuffixed agents, 1 skill, 1 MCP server. - The
./plugins/microsoft-finops-toolkitsource is genuinely unusable on Windows checkouts (the git symlink materializes as a text file, so install fails withENOTDIR). claude plugin validate --strictpasses on both manifests, and the validator does reject unknown fields, sostrictis a recognized marketplace field.- All 24 Pester tests pass locally.
The fix works for Claude Code. My concern is what it costs on the other platform.
Renaming the agents breaks GitHub Copilot CLI discovery
(Left here rather than inline, since the five renames carry no diff hunks to anchor to.)
The root plugin.json exists specifically for Copilot and declares "agents": "./agents/". GitHub's plugin format requires NAME.agent.md, so dropping the suffix takes Copilot from 5 agents to 0 — while the changelog still describes the plugin as shared between Claude Code and Copilot CLI. Claude auto-discovers agents/ regardless of what the manifest says, so adding a second directory doesn't resolve this; the Copilot-suffixed variant probably needs to be generated at package time in Build-AgentPlugin.ps1.
README is now out of date
src/templates/agent-plugin/README.md:7 isn't in this PR, but it now contradicts both changes — it still says the plugin directory is "used by both marketplace manifests", and that Claude declares only its output style.
Remaining comments inline.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
🛠️ Description
Correct the Claude Code marketplace source so it resolves to the repository's actual plugin root, enable strict marketplace validation, and load the shared agents through Claude's standard
agents/auto-discovery. Agent files now use plain.mdnames so Claude exposes the intended identifiers without an.agentsuffix. The MCP configuration remains declared explicitly.Validated against Anthropic's current documentation:
A clean installation from this PR's online branch with Claude Code CLI 2.1.235 reports one skill, five correctly named agents, and one MCP server.
Fixes # N/A
📷 Screenshots
N/A
📋 Checklist
🔬 How did you test this change?
Additional validation:
claude plugin validate . --strictclaude plugin validate src/templates/agent-plugin --strict📦 Deploy to test?
🙋♀️ Do any of the following that apply?
📑 Did you update
docs/changelog.md?📖 Did you update documentation?