From 2d5fda4e241f0c8cffec1f494d2706b918be8a0e Mon Sep 17 00:00:00 2001 From: richlira Date: Sat, 27 Dec 2025 22:15:28 -0600 Subject: [PATCH] feat: Add component metadata to plugin.json schema MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extend plugin.json with `components` and `metadata` fields to enable better plugin discoverability in the Claude Code UI. New fields (optional, backwards-compatible): - components: lists agents, commands, skills, hooks, mcpServers - metadata.tags: categorization tags for filtering Also includes RFC proposal for UI badges and expanded view. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../agent-sdk-dev/.claude-plugin/plugin.json | 10 + .../.claude-plugin/plugin.json | 10 + .../code-review/.claude-plugin/plugin.json | 11 +- .../.claude-plugin/plugin.json | 11 +- .../.claude-plugin/plugin.json | 10 + .../feature-dev/.claude-plugin/plugin.json | 10 + .../.claude-plugin/plugin.json | 10 + plugins/hookify/.claude-plugin/plugin.json | 10 + .../.claude-plugin/plugin.json | 10 + plugins/plugin-dev/.claude-plugin/plugin.json | 19 ++ .../.claude-plugin/plugin.json | 10 + .../ralph-wiggum/.claude-plugin/plugin.json | 10 + .../.claude-plugin/plugin.json | 10 + proposals/001-plugin-component-badges.md | 179 ++++++++++++++++++ 14 files changed, 318 insertions(+), 2 deletions(-) create mode 100644 plugins/plugin-dev/.claude-plugin/plugin.json create mode 100644 proposals/001-plugin-component-badges.md diff --git a/plugins/agent-sdk-dev/.claude-plugin/plugin.json b/plugins/agent-sdk-dev/.claude-plugin/plugin.json index 713683ccd8..5c1fa8cc8a 100644 --- a/plugins/agent-sdk-dev/.claude-plugin/plugin.json +++ b/plugins/agent-sdk-dev/.claude-plugin/plugin.json @@ -5,5 +5,15 @@ "author": { "name": "Ashwin Bhat", "email": "ashwin@anthropic.com" + }, + "components": { + "agents": ["agent-sdk-verifier-py", "agent-sdk-verifier-ts"], + "commands": ["new-sdk-app"], + "skills": [], + "hooks": [], + "mcpServers": [] + }, + "metadata": { + "tags": ["sdk", "development", "python", "typescript"] } } diff --git a/plugins/claude-opus-4-5-migration/.claude-plugin/plugin.json b/plugins/claude-opus-4-5-migration/.claude-plugin/plugin.json index 1c209e6d9c..c6e037037f 100644 --- a/plugins/claude-opus-4-5-migration/.claude-plugin/plugin.json +++ b/plugins/claude-opus-4-5-migration/.claude-plugin/plugin.json @@ -5,5 +5,15 @@ "author": { "name": "William Hu", "email": "whu@anthropic.com" + }, + "components": { + "agents": [], + "commands": [], + "skills": ["claude-opus-4-5-migration"], + "hooks": [], + "mcpServers": [] + }, + "metadata": { + "tags": ["migration", "opus", "upgrade"] } } diff --git a/plugins/code-review/.claude-plugin/plugin.json b/plugins/code-review/.claude-plugin/plugin.json index dd45018d7f..9dfbf2c920 100644 --- a/plugins/code-review/.claude-plugin/plugin.json +++ b/plugins/code-review/.claude-plugin/plugin.json @@ -5,6 +5,15 @@ "author": { "name": "Boris Cherny", "email": "boris@anthropic.com" + }, + "components": { + "agents": [], + "commands": ["code-review"], + "skills": [], + "hooks": [], + "mcpServers": [] + }, + "metadata": { + "tags": ["code-review", "pull-request", "quality"] } } - diff --git a/plugins/commit-commands/.claude-plugin/plugin.json b/plugins/commit-commands/.claude-plugin/plugin.json index 8c7bde5db1..f5abc3b2a7 100644 --- a/plugins/commit-commands/.claude-plugin/plugin.json +++ b/plugins/commit-commands/.claude-plugin/plugin.json @@ -5,6 +5,15 @@ "author": { "name": "Anthropic", "email": "support@anthropic.com" + }, + "components": { + "agents": [], + "commands": ["commit", "commit-push-pr", "clean_gone"], + "skills": [], + "hooks": [], + "mcpServers": [] + }, + "metadata": { + "tags": ["git", "workflow", "commit", "pull-request"] } } - diff --git a/plugins/explanatory-output-style/.claude-plugin/plugin.json b/plugins/explanatory-output-style/.claude-plugin/plugin.json index a70cbf97c1..c7da8c7a45 100644 --- a/plugins/explanatory-output-style/.claude-plugin/plugin.json +++ b/plugins/explanatory-output-style/.claude-plugin/plugin.json @@ -5,5 +5,15 @@ "author": { "name": "Dickson Tsai", "email": "dickson@anthropic.com" + }, + "components": { + "agents": [], + "commands": [], + "skills": [], + "hooks": ["SessionStart"], + "mcpServers": [] + }, + "metadata": { + "tags": ["output-style", "educational", "learning"] } } diff --git a/plugins/feature-dev/.claude-plugin/plugin.json b/plugins/feature-dev/.claude-plugin/plugin.json index 2c37a20746..a1d19b632b 100644 --- a/plugins/feature-dev/.claude-plugin/plugin.json +++ b/plugins/feature-dev/.claude-plugin/plugin.json @@ -5,5 +5,15 @@ "author": { "name": "Sid Bidasaria", "email": "sbidasaria@anthropic.com" + }, + "components": { + "agents": ["code-explorer", "code-architect", "code-reviewer"], + "commands": ["feature-dev"], + "skills": [], + "hooks": [], + "mcpServers": [] + }, + "metadata": { + "tags": ["feature-development", "architecture", "workflow"] } } diff --git a/plugins/frontend-design/.claude-plugin/plugin.json b/plugins/frontend-design/.claude-plugin/plugin.json index cf6b13f14a..6ba3ce68e4 100644 --- a/plugins/frontend-design/.claude-plugin/plugin.json +++ b/plugins/frontend-design/.claude-plugin/plugin.json @@ -5,5 +5,15 @@ "author": { "name": "Prithvi Rajasekaran, Alexander Bricken", "email": "prithvi@anthropic.com, alexander@anthropic.com" + }, + "components": { + "agents": [], + "commands": [], + "skills": ["frontend-design"], + "hooks": [], + "mcpServers": [] + }, + "metadata": { + "tags": ["frontend", "ui", "ux", "design", "css"] } } diff --git a/plugins/hookify/.claude-plugin/plugin.json b/plugins/hookify/.claude-plugin/plugin.json index 3cf8b5b8f6..485141fd56 100644 --- a/plugins/hookify/.claude-plugin/plugin.json +++ b/plugins/hookify/.claude-plugin/plugin.json @@ -5,5 +5,15 @@ "author": { "name": "Daisy Hollman", "email": "daisy@anthropic.com" + }, + "components": { + "agents": ["conversation-analyzer"], + "commands": ["hookify", "list", "configure", "help"], + "skills": ["writing-rules"], + "hooks": ["PreToolUse", "PostToolUse", "Stop", "UserPromptSubmit"], + "mcpServers": [] + }, + "metadata": { + "tags": ["hooks", "automation", "rules", "behavior"] } } diff --git a/plugins/learning-output-style/.claude-plugin/plugin.json b/plugins/learning-output-style/.claude-plugin/plugin.json index 3f798c518c..56ea072ccb 100644 --- a/plugins/learning-output-style/.claude-plugin/plugin.json +++ b/plugins/learning-output-style/.claude-plugin/plugin.json @@ -5,5 +5,15 @@ "author": { "name": "Boris Cherny", "email": "boris@anthropic.com" + }, + "components": { + "agents": [], + "commands": [], + "skills": [], + "hooks": ["SessionStart"], + "mcpServers": [] + }, + "metadata": { + "tags": ["output-style", "learning", "interactive", "educational"] } } diff --git a/plugins/plugin-dev/.claude-plugin/plugin.json b/plugins/plugin-dev/.claude-plugin/plugin.json new file mode 100644 index 0000000000..437ebac3ea --- /dev/null +++ b/plugins/plugin-dev/.claude-plugin/plugin.json @@ -0,0 +1,19 @@ +{ + "name": "plugin-dev", + "version": "1.0.0", + "description": "Comprehensive toolkit for developing Claude Code plugins with expert skills and AI-assisted creation", + "author": { + "name": "Anthropic", + "email": "support@anthropic.com" + }, + "components": { + "agents": ["agent-creator", "plugin-validator", "skill-reviewer"], + "commands": ["create-plugin"], + "skills": ["agent-development", "command-development", "hook-development", "mcp-integration", "plugin-settings", "plugin-structure", "skill-development"], + "hooks": [], + "mcpServers": [] + }, + "metadata": { + "tags": ["plugin", "development", "tooling", "sdk"] + } +} diff --git a/plugins/pr-review-toolkit/.claude-plugin/plugin.json b/plugins/pr-review-toolkit/.claude-plugin/plugin.json index 8e293aba91..4dd1e77400 100644 --- a/plugins/pr-review-toolkit/.claude-plugin/plugin.json +++ b/plugins/pr-review-toolkit/.claude-plugin/plugin.json @@ -5,5 +5,15 @@ "author": { "name": "Daisy", "email": "daisy@anthropic.com" + }, + "components": { + "agents": ["code-reviewer", "code-simplifier", "comment-analyzer", "pr-test-analyzer", "silent-failure-hunter", "type-design-analyzer"], + "commands": ["review-pr"], + "skills": [], + "hooks": [], + "mcpServers": [] + }, + "metadata": { + "tags": ["code-review", "pull-request", "testing", "quality"] } } diff --git a/plugins/ralph-wiggum/.claude-plugin/plugin.json b/plugins/ralph-wiggum/.claude-plugin/plugin.json index ec19b4012a..7ab3bc5d0c 100644 --- a/plugins/ralph-wiggum/.claude-plugin/plugin.json +++ b/plugins/ralph-wiggum/.claude-plugin/plugin.json @@ -5,5 +5,15 @@ "author": { "name": "Daisy Hollman", "email": "daisy@anthropic.com" + }, + "components": { + "agents": [], + "commands": ["ralph-loop", "cancel-ralph", "help"], + "skills": [], + "hooks": ["Stop"], + "mcpServers": [] + }, + "metadata": { + "tags": ["automation", "loops", "iterative", "workflow"] } } diff --git a/plugins/security-guidance/.claude-plugin/plugin.json b/plugins/security-guidance/.claude-plugin/plugin.json index ef6cd0493b..581a9c5b9f 100644 --- a/plugins/security-guidance/.claude-plugin/plugin.json +++ b/plugins/security-guidance/.claude-plugin/plugin.json @@ -5,5 +5,15 @@ "author": { "name": "David Dworken", "email": "dworken@anthropic.com" + }, + "components": { + "agents": [], + "commands": [], + "skills": [], + "hooks": ["PreToolUse"], + "mcpServers": [] + }, + "metadata": { + "tags": ["security", "owasp", "xss", "injection", "safety"] } } diff --git a/proposals/001-plugin-component-badges.md b/proposals/001-plugin-component-badges.md new file mode 100644 index 0000000000..8eac3861cd --- /dev/null +++ b/proposals/001-plugin-component-badges.md @@ -0,0 +1,179 @@ +# RFC 001: Plugin Component Badges and Expanded View + +## Summary + +Enhance the Claude Code plugin discovery and management UI by displaying component badges (agents, commands, skills, hooks, MCPs) and providing an expanded view with detailed composition information. + +## Problem Statement + +Currently, when users browse plugins in the Claude Code marketplace or plugin list, they only see: +- Plugin name +- Version number +- Short description + +**Users cannot tell:** +- What components a plugin includes (agents, commands, skills, hooks, MCP servers) +- The "weight" or complexity of a plugin +- Whether a plugin fits their tech stack +- Approximate context impact + +This makes it difficult to: +1. Compare plugins with similar functionality +2. Understand what you're installing before installation +3. Find plugins that match specific needs (e.g., "I want a plugin with code review agents") + +## Proposed Solution + +### 1. Component Badges in Plugin List + +Display component counts as badges in the plugin listing: + +``` +feature-dev v1.0.0 +├─ 🤖 3 agents 📝 0 skills ⚡ 1 command 🪝 0 hooks +└─ 🏷️ feature-development, architecture, workflow +``` + +### 2. Expanded View on Selection + +When a user selects a plugin, show detailed composition: + +``` +feature-dev +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +Agents (3): Commands (1): +• code-explorer • /feature-dev +• code-architect +• code-reviewer + +Skills (0) Hooks (0) + +MCP Servers (0) + +Tags: feature-development, architecture, workflow +``` + +### 3. Filter Options in Discover + +Allow users to filter plugins by component type: + +``` +[x] Has agents +[ ] Has skills only +[ ] Has MCP servers +[ ] Filter by tag: [workflow ▼] +``` + +## Schema Changes + +This PR extends the `plugin.json` schema with two new optional fields: + +### `components` Object + +```json +{ + "components": { + "agents": ["agent-name-1", "agent-name-2"], + "commands": ["command-1", "command-2"], + "skills": ["skill-1"], + "hooks": ["PreToolUse", "Stop"], + "mcpServers": ["server-1"] + } +} +``` + +### `metadata` Object + +```json +{ + "metadata": { + "tags": ["git", "workflow", "automation"] + } +} +``` + +## Complete Example + +```json +{ + "name": "pr-review-toolkit", + "version": "1.0.0", + "description": "Comprehensive PR review agents...", + "author": { + "name": "Daisy", + "email": "daisy@anthropic.com" + }, + "components": { + "agents": [ + "code-reviewer", + "code-simplifier", + "comment-analyzer", + "pr-test-analyzer", + "silent-failure-hunter", + "type-design-analyzer" + ], + "commands": ["review-pr"], + "skills": [], + "hooks": [], + "mcpServers": [] + }, + "metadata": { + "tags": ["code-review", "pull-request", "testing", "quality"] + } +} +``` + +## Implementation Notes + +### Phase 1: Schema (This PR) +- Add `components` and `metadata` fields to all official plugins +- Document the extended schema + +### Phase 2: UI (Future - requires Claude Code changes) +- Parse `components` field in plugin browser +- Render badges in list view +- Render expanded view on selection +- Add filter controls + +## Benefits + +1. **Better Discoverability**: Users can quickly identify what a plugin offers +2. **Informed Decisions**: See exactly what you're installing +3. **Easier Comparison**: Compare plugins by their composition +4. **Stack Filtering**: Find plugins relevant to your tech stack via tags + +## Backwards Compatibility + +**Critical**: The new fields MUST be optional and non-breaking. + +### For Existing Plugins (without new fields) +- Plugins without `components` or `metadata` fields MUST continue to work +- The UI should gracefully handle missing fields by not showing badges +- No validation errors should occur for missing optional fields + +### For New Schema (with new fields) +- Adding extra fields to JSON typically doesn't break parsers +- If Claude Code uses strict schema validation (`additionalProperties: false`), the schema would need updating +- Recommended: Test with existing Claude Code version before merging + +### Graceful Degradation Example +```javascript +// UI should handle missing components gracefully +const agents = plugin.components?.agents ?? []; +const commands = plugin.components?.commands ?? []; +// Only show badges if data exists +if (agents.length > 0) showBadge('agents', agents.length); +``` + +## Open Questions + +1. Should we include estimated token impact in metadata? +2. Should tags be free-form or from a controlled vocabulary? +3. Should component lists be auto-generated from directory structure or manually maintained? + +--- + +**Author**: richlira (Claude CDMX Community) +**Date**: December 2025 +**Status**: Proposal