fix(plugin): make plugin.json compatible with Claude Code 2.1.x schema#4
Open
hodoolisence-lab wants to merge 1 commit into
Open
fix(plugin): make plugin.json compatible with Claude Code 2.1.x schema#4hodoolisence-lab wants to merge 1 commit into
hodoolisence-lab wants to merge 1 commit into
Conversation
`claude plugin install tdpilot@dreamrec-TDPilot` fails on Claude Code 2.1.x:
1. `agents: Invalid input` — the manifest schema expects `agents` as an
array of file paths; a directory string ("./agents/") is rejected.
(`skills` still accepts a directory string.)
2. After fixing (1), loading fails with "Duplicate hooks file detected:
./hooks/hooks.json ... The standard hooks/hooks.json is loaded
automatically." The conventional root .mcp.json is auto-loaded the
same way, so both `hooks` and `mcpServers` declarations are removed
and left to auto-discovery.
After this change the plugin installs and shows enabled; all 8 skills,
4 agents and 2 commands load, and `uv run tdpilot doctor` passes with
registry=manifest=110 tools.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
agents: directory string"./agents/"→ explicit array of the four agent file paths.hooks(./hooks/hooks.json) andmcpServers(./.mcp.json) declarations — both live at the conventional paths that Claude Code auto-loads.Why
On Claude Code 2.1.x,
claude plugin install tdpilot@dreamrec-TDPilotfails in two stages:agents: Invalid input— the current plugin manifest schema expectsagentsto be an array of file paths. A directory string is rejected. (skillsstill accepts a directory string, which is why onlyagentstrips here.)After fixing (1), the plugin installs but fails to load:
The conventional root
.mcp.jsonis auto-discovered the same way, somcpServersis removed alongsidehooksto avoid the equivalent duplicate.Verification
claude plugin install tdpilot@dreamrec-TDPilot→ success;claude plugin list→ ✓ enabled./td-check,/td-snapshot) load.uv run tdpilot doctor→ all PASS,tool_count_drift: registry=manifest=110.Note for maintainers
Removing
hooks/mcpServersrelies on Claude Code auto-discovering the conventional./hooks/hooks.jsonand./.mcp.json. If you need to support older Claude Code versions that required explicit declaration, keep them only where auto-discovery isn't available. Tested on Claude Code 2.1.150.🤖 Generated with Claude Code