Skip to content

fix(skills): read skills from plugins rooted at a skill directory - #33

Merged
git-hulk merged 1 commit into
git-hulk:masterfrom
leijuns:fix/marketplace-skill-root-plugins
Oct 23, 2026
Merged

git-hulk merged 1 commit into
git-hulk:masterfrom
leijuns:fix/marketplace-skill-root-plugins

Conversation

@leijuns

@leijuns leijuns commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Purpose

A Claude Code marketplace can root each plugin at the skill's own directory:

{"plugins": [{"name": "aha-react-ui-generator", "source": "./skills/aha-react-ui-generator"}]}

The entry has no skills array, and the plugin's .claude-plugin/plugin.json carries only name, description, and version. Claude Code loads the SKILL.md at the plugin root as that plugin's skill.

parseMarketplaceManifest only looked for a skills list in plugin.json, so it skipped every such plugin. AfterShip/skills recently moved to this layout (one plugin per skill, 82 entries), and clime skills install AfterShip/skills now offers only the 5 skills that still come from skills arrays.

Behavior change

For a plugin with no skills array:

  1. If its plugin.json lists skills, use them, as before.
  2. Otherwise, if the plugin root has a regular SKILL.md, add the plugin root as one skill.

A plugin rooted at the marketplace root ("./") is not treated as a skill. Duplicate roots are listed once.

Test evidence

  • New test TestReadCatalogFromMarketplaceSkillRootedPlugins covers a plugin root with a generated plugin.json, a nested root with no plugin.json and a trailing slash, a root without SKILL.md, and a duplicate entry. It fails on master (the catalog falls back to skills/unlisted) and passes with this change.

  • gofmt -l is clean. go vet ./... and go test ./... pass (LC_ALL=C).

  • I ran Manager.Fetch and Manager.Install against a local copy of AfterShip/skills master:

    Catalog entries Install clime-cli (skills/cli/clime-cli) and aha-react-ui-generator
    master 5 Neither is in the catalog
    this branch 84 Both installed into ~/.claude/skills

🤖 Generated with Claude Code

A Claude Code marketplace may root each plugin at the skill's own
directory, e.g. {"name": "alpha", "source": "./skills/alpha"}, with no
skills array and a plugin.json that lists no skills. Claude Code loads the
SKILL.md at the plugin root as the plugin's skill, but clime only looked
for a skills list in plugin.json, so it found none of these skills.

When a plugin has no skills array and its plugin.json lists none, treat
a SKILL.md at the plugin root as the plugin's skill.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@git-hulk
git-hulk merged commit adf25f4 into git-hulk:master Oct 23, 2026
1 check passed
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.

2 participants