Skip to content

fix: remove invalid 'skills' field from plugin.json#2

Open
poparcosmin wants to merge 1 commit into
Terryc21:mainfrom
poparcosmin:fix/plugin-json-skills-schema
Open

fix: remove invalid 'skills' field from plugin.json#2
poparcosmin wants to merge 1 commit into
Terryc21:mainfrom
poparcosmin:fix/plugin-json-skills-schema

Conversation

@poparcosmin
Copy link
Copy Markdown

Summary

Installing the bug-echo plugin via /plugin install bug-echo@bug-echo fails
on Claude Code 2.1.136 with a manifest validation error.

Reproduction

/plugin marketplace add Terryc21/bug-echo   # ✅ Successfully added marketplace
/plugin install bug-echo@bug-echo            # ❌ Fails

Error message:

Failed to install: Plugin temp_local_<id> has an invalid manifest file at
/home/<user>/.claude/plugins/cache/temp_local_<id>/.claude-plugin/plugin.json.

Validation errors: skills: Invalid input

Root cause

.claude-plugin/plugin.json declares the skills field as an array of
objects ([{name, description}]):

{
  ...
  "skills": [
    {
      "name": "bug-echo",
      "description": "After fixing a bug, find and rate other instances..."
    }
  ]
}

Claude Code 2.x schema rejects this field — skills are auto-discovered
from the skills/<name>/SKILL.md directory at install time. The frontmatter
of skills/bug-echo/SKILL.md already contains all the metadata needed
(name, description, version, allowed-tools, metadata.tier,
metadata.category).

For reference, your other plugin bug-prospector has a clean manifest
with no skills field and installs without issue:
https://github.com/Terryc21/bug-prospector/blob/main/.claude-plugin/plugin.json

Fix

Remove the skills array from plugin.json. 5-line diff:

diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json
index 6ab59d7..a23dc2e 100644
--- a/.claude-plugin/plugin.json
+++ b/.claude-plugin/plugin.json
@@ -15,11 +15,5 @@
     "post-fix-sweep",
     "swift",
     "swiftui"
-  ],
-  "skills": [
-    {
-      "name": "bug-echo",
-      "description": "After fixing a bug, find and rate other instances of the same pattern. Triggers: 'run bug-echo', 'echo this fix', 'scan for similar bugs', 'after-fix scan'."
-    }
   ]
 }

Happy to open a PR with this fix if helpful.

Environment

  • Claude Code: 2.1.136
  • OS: Linux 7.0.0-15-generic
  • Plugin source: Terryc21/bug-echo v1.0.0
  • Marketplace add: ✅ works
  • Plugin install: ❌ fails with validation error above

Workaround

Until merged, users can side-load the skill directly:

mkdir -p ~/.claude/skills/bug-echo/examples
SRC="$(find ~/.claude/plugins/cache -path '*temp_local_*/skills/bug-echo' -type d | head -1)"
cp "$SRC/SKILL.md" ~/.claude/skills/bug-echo/SKILL.md
cp "$SRC/examples/"* ~/.claude/skills/bug-echo/examples/ 2>/dev/null
# Skill becomes available at next session start

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.

1 participant