Initial commit
This commit is contained in:
106
commands/validate-marketplace.md
Normal file
106
commands/validate-marketplace.md
Normal file
@@ -0,0 +1,106 @@
|
||||
---
|
||||
description: Comprehensive validation of Claude Code marketplace.json with quality scoring
|
||||
argument-hint: [path-to-marketplace.json]
|
||||
allowed-tools: Bash(${CLAUDE_PLUGIN_ROOT}/scripts/*), Read
|
||||
---
|
||||
|
||||
# Validate Marketplace
|
||||
|
||||
You are a marketplace validation specialist. Your task is to comprehensively validate a Claude Code marketplace.json file.
|
||||
|
||||
## Process
|
||||
|
||||
### 1. Locate Marketplace File
|
||||
|
||||
Determine the marketplace.json path:
|
||||
- If user provided an argument ($1): Use that path
|
||||
- If no argument: Look for `.claude-plugin/marketplace.json` in current directory
|
||||
- Auto-detect: Search up directory tree for `.claude-plugin/marketplace.json`
|
||||
|
||||
### 2. Run Validation Script
|
||||
|
||||
Execute the validation script located at:
|
||||
```
|
||||
${CLAUDE_PLUGIN_ROOT}/scripts/validate-marketplace-full.sh [path]
|
||||
```
|
||||
|
||||
The script will validate:
|
||||
- JSON syntax
|
||||
- Required fields (name, owner, plugins)
|
||||
- Optional recommended fields
|
||||
- Plugin entries structure
|
||||
- Quality scoring
|
||||
- Security checks
|
||||
|
||||
### 3. Interpret Results
|
||||
|
||||
The script outputs:
|
||||
- ✅ Success messages for valid items
|
||||
- ❌ Errors for critical issues
|
||||
- ⚠️ Warnings for recommended improvements
|
||||
- ℹ️ Info for suggestions
|
||||
|
||||
Quality Score:
|
||||
- 90-100: Excellent ⭐⭐⭐⭐⭐
|
||||
- 75-89: Good ⭐⭐⭐⭐
|
||||
- 60-74: Fair ⭐⭐⭐
|
||||
- 40-59: Needs Improvement ⭐⭐
|
||||
- 0-39: Poor ⭐
|
||||
|
||||
### 4. Provide Recommendations
|
||||
|
||||
Based on validation results, provide:
|
||||
1. **Critical Issues**: Must be fixed before publication
|
||||
2. **Warnings**: Should be addressed for quality
|
||||
3. **Suggestions**: Would improve discoverability and usability
|
||||
|
||||
### 5. Summary
|
||||
|
||||
Conclude with:
|
||||
- Overall quality assessment
|
||||
- Priority action items
|
||||
- Publication readiness status
|
||||
|
||||
## Example Output Structure
|
||||
|
||||
```
|
||||
🔍 Validating Marketplace: open-plugins
|
||||
|
||||
✅ JSON syntax valid
|
||||
✅ Required fields present
|
||||
✅ 3 plugins found
|
||||
|
||||
Plugin Validation:
|
||||
✅ plugin-name (v1.0.0) - Excellent ⭐⭐⭐⭐⭐
|
||||
⚠️ another-plugin (v0.1.0) - Fair ⭐⭐⭐
|
||||
- Missing recommended field: keywords
|
||||
- Description too short (< 50 chars)
|
||||
|
||||
Overall Quality Score: 85/100 - Good ⭐⭐⭐⭐
|
||||
|
||||
Recommendations:
|
||||
1. Add keywords to another-plugin
|
||||
2. Expand description in another-plugin
|
||||
|
||||
Summary: 1 excellent, 1 fair - Address warnings before publication
|
||||
```
|
||||
|
||||
## Error Handling
|
||||
|
||||
If validation fails:
|
||||
1. Show clear error messages
|
||||
2. Explain what's wrong
|
||||
3. Provide remediation steps
|
||||
4. Reference documentation if needed
|
||||
|
||||
Common issues:
|
||||
- **Invalid JSON**: Show syntax error location
|
||||
- **Missing required fields**: List which fields are missing
|
||||
- **Invalid formats**: Show expected format
|
||||
- **Security issues**: Explain the risk and how to fix
|
||||
|
||||
## References
|
||||
|
||||
- Marketplace schema: `.claude/docs/plugins/plugin-marketplaces.md`
|
||||
- Plugin standards: `.claude/docs/plugins/plugins-reference.md`
|
||||
- OpenPlugins contributing: `open-plugins/CONTRIBUTING.md`
|
||||
Reference in New Issue
Block a user