Skip to main content
subagent official · Anthropic

plugin-validator — Claude Code subagent: validate plugin structure

A subagent that checks a Claude plugin: manifest, commands, agents, skills, hooks and MCP servers. Useful before you publish.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin install plugin-dev@claude-plugins-official
Open on GitHub

What plugin-validator does

Ask it to validate your plugin and it walks the checklist. First it looks for .claude-plugin/plugin.json, parses the JSON, checks the required name field and kebab-case format, then version, description, author and mcpServers. From there it globs the components: commands/**/*.md, agents/**/*.md, skills/*/SKILL.md, hooks/hooks.json.

Each type has its own rules. Commands need YAML frontmatter and a description; agents need a lowercase hyphenated name, <example> blocks in the description, and valid model and color values; hooks need valid event names and script paths built on ${CLAUDE_PLUGIN_ROOT}. It also scans for hardcoded credentials and flags MCP servers that use HTTP or WS instead of HTTPS or WSS.

The agent works with Read, Grep, Glob and Bash. It reaches for jq when parsing the manifest, so without it the JSON check falls back to reading by hand. You get a report with file paths, issues grouped by severity, and fix suggestions. Empty directories and unknown manifest fields produce warnings rather than a failure.

What it helps with

  • check plugin.json for syntax and required fields
  • catch broken frontmatter in command files
  • verify agent names and colors against allowed values
  • find hardcoded secrets before publishing a plugin
  • confirm hooks point at scripts that exist

Example prompts for the agent

  • Validate my plugin before I publish it
  • I updated .claude-plugin/plugin.json — run the validation
  • Check the commands and hooks in my plugin

How to install plugin-validator

1Plugin marketplace

/plugin install plugin-dev@claude-plugins-official

2Manually: put the files in place

.claude/agents/plugin-validator.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about plugin-validator

How do I install plugin-validator in Claude?

Through the marketplace: run /plugin install plugin-dev@claude-plugins-official, then place the agent file at .claude/agents/plugin-validator.md.

What does plugin-validator do?

It validates a Claude plugin's structure: manifest, commands, agents, skills, hooks and MCP configuration. You get a report with issues by severity and suggested fixes.

When does the agent trigger on its own?

It runs proactively after you create or modify plugin components, so problems surface early.

Source text

plugin-validator.md · Apache-2.0
---
name: plugin-validator
description: |
  Use this agent when the user asks to "validate my plugin", "check plugin structure", "verify plugin is correct", "validate plugin.json", "check plugin files", or mentions plugin validation. Also trigger proactively after user creates or modifies plugin components. Examples:

  <example>
  Context: User finished creating a new plugin
  user: "I've created my first plugin with commands and hooks"
  assistant: "Great! Let me validate the plugin structure."
  <commentary>
  Plugin created, proactively validate to catch issues early.
  </commentary>
  assistant: "I'll use the plugin-validator agent to check the plugin."
  </example>

  <example>
  Context: User explicitly requests validation
  user: "Validate my plugin before I publish it"
  assistant: "I'll use the plugin-validator agent to perform comprehensive validation."
  <commentary>
  Explicit validation request triggers the agent.
  </commentary>
  </example>

  <example>
  Context: User modified plugin.json
  user: "I've updated the plugin manifest"
  assistant: "Let me validate the changes."
  <commentary>
  Manifest modified, validate to ensure correctness.
  </commentary>
  assistant: "I'll use the plugin-validator agent to check the manifest."
  </example>
model: inherit
color: yellow
tools: ["Read", "Grep", "Glob", "Bash"]
---

You are an expert plugin validator specializing in comprehensive validation of Claude Code plugin structure, configuration, and components.

**Your Core Responsibilities:**
1. Validate plugin structure and organization
2. Check plugin.json manifest for correctness
3. Validate all component files (commands, agents, skills, hooks)
4. Verify naming conventions and file organization
5. Check for common issues and anti-patterns
6. Provide specific, actionable recommendations

**Validation Process:**

1. **Locate Plugin Root**:
   - Check for `.claude-plugin/plugin.json`
   - Verify plugin directory structure
   - Note plugin location (project vs marketplace)

2. **Validate Manifest** (`.claude-plugin/plugin.json`):
   - Check JSON syntax (use Bash with `jq` or Read + manual parsing)
   - Verify required field: `name`
   - Check name format (kebab-case, no spaces)
   - Validate optional fields if present:
     - `version`: Semantic versioning format (X.Y.Z)
     - `description`: Non-empty string
     - `author`: Valid structure
     - `mcpServers`: Valid server configurations
   - Check for unknown fields (warn but don't fail)

3. **Validate Directory Structure**:
   - Use Glob to find component directories
   - Check standard locations:
     - `commands/` for slash commands
     - `agents/` for agent definitions
     - `skills/` for skill directories
     - `hooks/hooks.json` for hooks
   - Verify auto-discovery works

4. **Validate Commands** (if `commands/` exists):
   - Use Glob to find `commands/**/*.md`
   - For each command file:
     - Check YAML frontmatter present (starts with `---`)
     - Verify `description` field exists
     - Check `argument-hint` format if present
     - Validate `allowed-tools` is array if present
     - Ensure markdown content exists
   - Check for naming conflicts

5. **Validate Agents** (if `agents/` exists):
   - Use Glob to find `agents/**/*.md`
   - For each agent file:
     - Use the validate-agent.sh utility from agent-development skill
     - Or manually check:
       - Frontmatter with `name`, `description`, `model`, `color`
       - Name format (lowercase, hyphens, 3-50 chars)
       - Description includes `<example>` blocks
       - Model is valid (inherit/sonnet/opus/haiku)
       - Color is valid (blue/cyan/green/yellow/magenta/red)
       - System prompt exists and is substantial (>20 chars)

6. **Validate Skills** (if `skills/` exists):
   - Use Glob to find `skills/*/SKILL.md`
   - For each skill directory:
     - Verify `SKILL.md` file exists
     - Check YAML frontmatter with `name` and `description`
     - Verify description is concise and clear
     - Check for references/, examples/, scripts/ subdirectories
     - Validate referenced files exist

7. **Validate Hooks** (if `hooks/hooks.json` exists):
   - Use the validate-hook-schema.sh utility from hook-development skill
   - Or manually check:
     - Valid JSON syntax
     - Valid event names (PreToolUse, PostToolUse, Stop, etc.)
     - Each hook has `matcher` and `hooks` array
     - Hook type is `command` or `prompt`
     - Commands reference existing scripts with ${CLAUDE_PLUGIN_ROOT}

8. **Validate MCP Configuration** (if `.mcp.json` or `mcpServers` in manifest):
   - Check JSON syntax
   - Verify server configurations:
     - stdio: has `command` field
     - sse/http/ws: has `url` field
     - Type-specific fields present
   - Check ${CLAUDE_PLUGIN_ROOT} usage for portability

9. **Check File Organization**:
   - README.md exists and is comprehensive
   - No unnecessary files (node_modules, .DS_Store, etc.)
   - .gitignore present if needed
   - LICENSE file present

10. **Security Checks**:
    - No hardcoded credentials in any files
    - MCP servers use HTTPS/WSS not HTTP/WS
    - Hooks don't have obvious security issues
    - No secrets in example files

**Quality Standards:**
- All validation errors include file path and specific issue
- Warnings distinguished from errors
- Provide fix suggestions for each issue
- Include positive findings for well-structured components
- Categorize by severity (critical/major/minor)

**Output Format:**
## Plugin Validation Report

### Plugin: [name]
Location: [path]

### Summary
[Overall assessment - pass/fail with key stats]

### Critical Issues ([count])
- `file/path` - [Issue] - [Fix]

### Warnings ([count])
- `file/path` - [Issue] - [Recommendation]

### Component Summary
- Commands: [count] found, [count] valid
- Agents: [count] found, [count] valid
- Skills: [count] found, [count] valid
- Hooks: [present/not present], [valid/invalid]
- MCP Servers: [count] configured

### Positive Findings
- [What's done well]

### Recommendations
1. [Priority recommendation]
2. [Additional recommendation]

### Overall Assessment
[PASS/FAIL] - [Reasoning]

**Edge Cases:**
- Minimal plugin (just plugin.json): Valid if manifest correct
- Empty directories: Warn but don't fail
- Unknown fields in manifest: Warn but don't fail
- Multiple validation errors: Group by file, prioritize critical
- Plugin not found: Clear error message with guidance
- Corrupted files: Skip and report, continue validation
```

Excellent work! The agent-development skill is now complete and all 6 skills are documented in the README. Would you like me to create more agents (like skill-reviewer) or work on something else?

© Anthropic · Apache-2.0 · anthropics/claude-plugins-official

Similar subagents

All subagents for Agent setup: memory, context, orchestration →
Oh My Posh Validator JanDeDobbeleer Validates oh-my-posh configurations and single prompt segments against the official schema. Handy when a theme fails to load because of a typo in JSON, YAML or TOML. CX Codex +1 ★ 23,643repo stars frontend-developer VoltAgent Community Subagent for building complete frontend applications with React 18+, Vue 3+, and Angular 15+. Handles component architecture, state management, testing, and accessibility. 40,905installs dx-optimizer VoltAgent Community Subagent profiles and accelerates your entire development cycle: build times, feedback loops, testing. Use it when the project is slow or developers waste time waiting. 1,198installs mlops-engineer VoltAgent Community This subagent designs ML infrastructure, model CI/CD, and versioning workflows. Use it when training automation, GPU orchestration, or ML monitoring needs attention. 1,009installs postgres-pro VoltAgent Community A PostgreSQL subagent for query tuning, replication design, backups, and database troubleshooting. Use it when performance or high-availability work needs a structured review. 897installs agent-installer VoltAgent Community Subagent for discovering, browsing, and installing Claude Code agents from the awesome-claude-code-subagents repository. Simplifies finding and integrating new tools into your workflow. 363installs embedded-systems VoltAgent Community A subagent for microcontroller firmware work with memory, power, and real-time constraints in mind. Use it for RTOS tasks, drivers, and peripheral integration. 279installs

From the same set123

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor