Skip to content

feat: discover skills from Claude plugin manifests#259

Merged
quuu merged 4 commits intovercel-labs:mainfrom
galligan:feat/plugin-manifest-discovery
Feb 3, 2026
Merged

feat: discover skills from Claude plugin manifests#259
quuu merged 4 commits intovercel-labs:mainfrom
galligan:feat/plugin-manifest-discovery

Conversation

@galligan
Copy link
Contributor

@galligan galligan commented Feb 2, 2026

Summary

  • Adds support for discovering skills declared in .claude-plugin/marketplace.json and .claude-plugin/plugin.json files
  • Enables compatibility with the Claude Code plugin marketplace ecosystem
  • Integrates seamlessly with existing priority-based discovery flow

Closes #121

Details

When a repository contains plugin manifest files, this PR extracts skill paths from them and includes those directories in the skill discovery search. This allows plugins that declare their skills explicitly in manifest files to be discovered without requiring skills to live in conventional directories.

New file: src/plugin-manifest.ts - Parses marketplace.json and plugin.json, returning directories to search for skills.

Modified: src/skills.ts - Calls getPluginSkillPaths() during priority directory discovery phase.

Tests: Comprehensive test coverage for both manifest formats and edge cases.

Test plan

  • Run npm test - all tests pass including new plugin-manifest tests
  • Manual testing with a real plugin that uses marketplace.json

→ In-collaboration-with: Claude Code

Add support for discovering skills declared in `.claude-plugin/marketplace.json`
and `.claude-plugin/plugin.json` files. This enables compatibility with the
Claude Code plugin marketplace ecosystem.

- Add `getPluginSkillPaths()` to extract skill directories from manifests
- Integrate manifest discovery into existing `discoverSkills()` flow
- Document the feature in README.md

→ In-collaboration-with: [Claude Code](https://claude.com/claude-code)
@vercel
Copy link

vercel bot commented Feb 2, 2026

@galligan is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9cb0c93a92

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Add containment check to reject manifest paths that escape basePath
via `..` segments or absolute paths. This prevents malicious repos
from causing skill discovery to read files outside the cloned repository.

→ In-collaboration-with: [Claude Code](https://claude.com/claude-code)
@galligan
Copy link
Contributor Author

galligan commented Feb 2, 2026

Fixed in c05d3a5 — added isContainedIn() check that validates all resolved paths stay within basePath before adding them to the search list. Added test coverage for both ../ traversal and absolute path attempts.

Add validation that pluginRoot, source, and skill paths must start
with './' to match Claude Code plugin manifest conventions. Paths
without the prefix are now skipped.

→ In-collaboration-with: [Claude Code](https://claude.com/claude-code)
@galligan
Copy link
Contributor Author

galligan commented Feb 2, 2026

Updates

Added two security/compliance fixes based on review feedback and Claude Code documentation:

1. Path traversal prevention (c05d3a5)

  • Added isContainedIn() check that validates all resolved paths stay within basePath
  • Rejects ../ traversal attempts and absolute paths
  • Test coverage for both attack vectors

2. Enforce ./ prefix per Claude Code spec (73eca31)

  • Per Claude Code plugin manifest docs, relative paths must start with ./
  • Now validates pluginRoot, source, and skills paths
  • Invalid paths are silently skipped (matches how remote sources are handled)

Both changes include comprehensive test coverage (18 tests total).

Replace hardcoded '/' with path.sep and add normalize() for Windows
compatibility where paths use '\' as separator.

→ In-collaboration-with: [Claude Code](https://claude.com/claude-code)
@galligan
Copy link
Contributor Author

galligan commented Feb 2, 2026

@vercel Fixed in 4480b2a — now using path.sep and normalize() for Windows compatibility.

Copy link
Collaborator

@quuu quuu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@quuu quuu merged commit 84c08b1 into vercel-labs:main Feb 3, 2026
1 of 2 checks passed
@galligan galligan changed the title feat: discover skills from plugin manifests feat: discover skills from Claude plugin manifests Feb 3, 2026
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.

[Feature]: Enhance skill discovery with nested plugins support and marketplace compatibility

2 participants