| name | plugin-validator |
| description | Validate Claude Code plugin structure, manifests, frontmatter, and dependencies. Use when user mentions "validate plugin", "check plugin health", "plugin broken", "plugin not loading", "plugin errors", "plugin.json invalid", "agent not working", "check plugin structure", or reports plugin-related issues. |
Plugin Validator
Validation Checks
1. Manifest Validation
2. Structure Validation
3. Frontmatter Validation
4. Dependency Validation
5. Configuration Validation
Process
-
Identify plugin location
find . -name "plugin.json" -o -name ".claude-plugin/plugin.json"
-
Run manifest validation
- Parse JSON syntax
- Check required fields
- Validate semver format
- Verify array structures
-
Validate file structure
- Read manifest file references
- Check each referenced file exists
- Verify paths are relative
- Check directory conventions
-
Check frontmatter
- For each agent/command file
- Parse YAML frontmatter
- Validate required fields
- Check field value constraints
-
Analyze dependencies
- Build dependency graph
- Detect circular references
- Validate skill references
- Check tool usage patterns
-
Report findings
- Categorize by severity (critical, warning, info)
- Provide specific file/line references
- Suggest fixes with examples
- Prioritize by impact
Validation Severity Levels
CRITICAL (Plugin won't load)
- Invalid JSON in plugin.json
- Missing required fields (name, description, version)
- Referenced files don't exist
- Invalid YAML in frontmatter
- Circular dependencies
WARNING (Plugin may malfunction)
- Invalid semver format
- Deprecated field usage
- Missing optional but recommended fields
- Inconsistent naming conventions
- Potential conflicts
INFO (Best practice suggestions)
- Missing documentation
- Version mismatch across files
- Code style inconsistencies
- Missing cross-references
- Optimization opportunities
Examples
✅ Good trigger: "Validate the waypoint plugin"
✅ Good trigger: "Check why my plugin isn't loading"
✅ Good trigger: "Plugin health check for claire"
✅ Good trigger: "My agent file has errors"
❌ Bad trigger: "Create a new plugin" (creation, not validation)
❌ Bad trigger: "Update plugin version" (modification, not validation)
❌ Bad trigger: "Install plugin" (installation, not validation)
Common Issues and Fixes
Issue: Plugin not loading
Check:
- plugin.json exists in correct location
- JSON syntax is valid
- Required fields present
- Version follows semver
Fix:
python3 -m json.tool plugin.json
test -f .claude-plugin/plugin.json || test -f plugin.json
Issue: Agent not working
Check:
- Agent file exists at path in plugin.json
- YAML frontmatter is valid
- Required fields (name, description) present
- Tools list is valid
Fix:
grep '"agents"' plugin.json
head -20 agents/my-agent.md
Issue: Circular dependencies
Check:
- Agent A references skill B
- Skill B references agent A
- Build dependency graph
Fix:
- Restructure to remove circular reference
- Extract shared logic to separate component
- Document dependency rationale
Supporting Files
For detailed validation rules, see:
Quick Reference
Valid plugin.json structure
{
"name": "plugin-name",
"description": "Plugin description",
"version": "1.0.0",
"agents": ["./agents/agent-name.md"],
"commands": ["./commands/command-name.md"],
"skills": ["./skills/skill-name"]
}
Valid agent/command frontmatter
---
name: component-name
description: Component description
tools: Read, Write, Bash
model: sonnet
---
Validation command pattern
ls -la .claude-plugin/plugin.json plugin.json
grep -o '"[^"]*\.md"' plugin.json | while read file; do
test -f "${file//\"/}" && echo "✓ $file" || echo "✗ $file"
done
Related
- Agent:
claire-plugin-manager for plugin management and health checks
- Skill:
doc-validator for documentation validation
- Commands: Claude Code plugin system documentation