Validate plugin structure, manifest, and component files for common issues
Validates plugin structure, manifest, and component files for common issues.
/plugin marketplace add LucasXu0/claude-code-plugin/plugin install plugin-development@LucasXu0-flutter-toolsComprehensive validation of plugin structure, configuration, and components.
.claude-plugin/plugin.json)Performs a thorough validation of the plugin:
Verify these exist:
โก .claude-plugin/plugin.json
โก At least one component directory (commands/, agents/, skills/, or hooks/)
Read and check:
name, version, description./ not /Example valid structure:
{
"name": "plugin-name",
"version": "1.0.0",
"description": "What the plugin does",
"author": {
"name": "Your Name"
},
"license": "MIT",
"keywords": ["keyword1"],
"commands": "./commands/",
"agents": "./agents/",
"hooks": "./hooks/hooks.json"
}
For each path in plugin.json:
For each file in commands/:
--- delimitersdescriptionFor each directory in skills/:
--- delimitersname and description presentFor each file in agents/:
--- delimitersIf hooks.json exists:
hooks object${CLAUDE_PLUGIN_ROOT}Report findings in this structure:
๐ Validating plugin: <plugin-name>
โ
Structure
โ .claude-plugin/plugin.json exists
โ Component directories present
โ
Manifest (plugin.json)
โ Valid JSON
โ Required fields: name, version, description
โ Name format: kebab-case
โ Version format: SemVer
โ Paths are relative
โ
Commands (3 files)
โ commands/init.md
โ commands/validate.md
โ commands/test-local.md
โ
Skills (1 skill)
โ skills/plugin-authoring/SKILL.md
- name matches directory: โ
- description present: โ
โ
Agents (1 agent)
โ agents/plugin-reviewer.md
โ
Hooks
โ hooks/hooks.json is valid
โ Scripts exist and are executable
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
Validation passed: 0 errors, 0 warnings
If issues are found, report clearly:
โ Errors Found
1. Manifest: plugin.json missing required field "version"
Fix: Add "version": "1.0.0" to .claude-plugin/plugin.json
2. Command: commands/myCommand.md uses camelCase
Fix: Rename to commands/my-command.md (kebab-case)
3. Skill: skills/MySkill/SKILL.md name doesn't match directory
Fix: Change frontmatter 'name' to "my-skill" (matches directory)
โ ๏ธ Warnings
1. No README.md found
Suggestion: Create README.md with usage documentation
2. No keywords in plugin.json
Suggestion: Add keywords array for discoverability
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Validation failed: 3 errors, 2 warnings
โ "commands": "/Users/you/plugin/commands/"
โ
"commands": "./commands/"
Directory: skills/code-review/
Frontmatter: name: codeReview
โ Names don't match
Fix: Change frontmatter to name: code-review
# My Command
Instructions...
โ No frontmatter with description
---
description: What this command does
---
# My Command
Instructions...
โ Has required frontmatter
$ ls -l scripts/validate.sh
-rw-r--r-- validate.sh
โ Not executable
$ chmod +x scripts/validate.sh
โ
Now executable
Complete checklist used for validation:
Structure:
โก .claude-plugin/plugin.json exists
โก At least one component directory present
โก README.md exists
Manifest:
โก Valid JSON syntax
โก name field: present, kebab-case
โก version field: present, valid SemVer
โก description field: present, non-empty
โก Paths are relative (start with ./)
โก Referenced paths exist
Commands:
โก .md extension
โก Frontmatter with description
โก kebab-case naming
โก Non-empty content
Skills:
โก Directory structure (skill-name/SKILL.md)
โก SKILL.md in uppercase
โก Frontmatter with name and description
โก Name matches directory (exact, kebab-case)
Agents:
โก .md extension
โก Frontmatter with description
โก kebab-case naming
โก Non-empty content
Hooks:
โก hooks.json valid JSON
โก Proper structure (hooks object)
โก Valid event names
โก Scripts use ${CLAUDE_PLUGIN_ROOT}
โก Scripts exist
โก Scripts are executable (chmod +x)
โ
Plugin is valid and ready for testing!
Next steps:
1. Test locally: /plugin-development:test-local
2. Create dev marketplace and install
3. Test all commands and features
4. Register in team marketplace when ready
โ Please fix the errors above before testing.
Need help?
- Review error messages for specific fixes
- Check best practices: /plugin-development:help
- Common issues documented in examples
Input: /plugin-development:validate
Output:
๐ Validating plugin: my-awesome-plugin
โ
All checks passed
โ Structure correct
โ Manifest valid
โ 5 commands validated
โ 2 skills validated
โ 1 agent validated
โ Hooks configured correctly
โ
Plugin ready for testing!
claude --debug for deep inspection