Plugin Validation Skill
Overview
Validates Claude Code plugins against 190+ structural and quality rules covering manifests, hooks, skills, MCP servers, marketplace configs, and agents. Produces a severity-graded report with actionable fix guidance.
Prerequisites
- Python 3.12+ with
pyyaml,uvpackage manager - Plugin directory with valid structure (
.claude-plugin/plugin.json)
Instructions
- Set
CLAUDE_PRIVATE_USERNAMES="your_username"if needed (usually auto-detected) - Run the validator:
uv run python scripts/validate_plugin.py /path/to/plugin --report docs_dev/validate_plugin_YYYYMMDD.md - Review compact summary (always use
--reportto save details to file) - Fix issues: CRITICAL > MAJOR > MINOR (use
/cpv-fix-validation <report_path>for plugin reports,/cpv-fix-marketplace-validation <report_path>for marketplace reports) - Re-run until exit code 0
Output
- Syntactic Score: 0-100 numeric with tier (PASS / CONDITIONAL_PASS / FAIL)
- Exit Code: 0 (pass), 1 (CRITICAL), 2 (MAJOR), 3 (MINOR), 4 (NIT, --strict only). WARNING never blocks.
- Summary: Issue counts by severity level
- Report File: Full output saved to
docs_dev/validate_<plugin-name>_<date>.md
For Semantic Quality Grading (A-F letter grades), use
/cpv-semantic-validation.
Error Handling
- Non-zero exit: Report severity and failing checks. Do NOT publish until MAJOR/CRITICAL resolved.
- Missing deps:
uv pip install ruff mypyorbrew install shellcheck. - Invalid JSON/YAML: Show parse error with path and line number.
Examples
uv run python scripts/validate_plugin.py /path/to/plugin --verbose --report docs_dev/report.md
uv run python scripts/validate_skill_comprehensive.py /path/to/skill/ --strict --report docs_dev/report.md
Resources
- Validation Checklist - Master checklist for pre-release
- Plugin Manifest Checklist
- Plugin Structure Checklist
- Hook Configuration Checklist
- Skill Validation Checklist
- MCP Server Checklist
- Marketplace Checklist
- Agent Checklist
- LSP Server Checklist
- Script and Code Quality Checklist
- Pre-Release Final Checklist
- Validation Commands
- Plugin Structure - Required plugin directory layout
- Directory Structure
- Plugin Manifest (plugin.json)
- Component Placement Rules
- Path Variables
- Common Structure Errors
- Validation Checklist
- Hook Validation - Hook configuration reference
- Hook Configuration File
- Valid Hook Events
- Matcher Syntax
- Hook Types
- Hook Input/Output Format
- Script Requirements
- Common Hook Errors
- Validation Checklist
- Troubleshooting
Bash Arithmetic Exit Codes · Unused Variable Warnings - Pyright/ruff · Missing Python Dependencies - ModuleNotFoundError · Git Hook Not Running · Plugin JSON Missing Required Fields · Ruff Linting - Unused Variable Error · Marketplace Plugin Source Format · Version Consistency Between Plugins and Marketplace · Git Tag Already Exists Error · subprocess.run Output Truncation · Best Practices Summary · Quick Diagnostic Commands
Token Optimization
Always --report <path> — share path, don't read. One script per run.
Prefer LLM Externalizer MCP for report analysis to save context tokens.
Checklist
Copy this checklist and track your progress:
- Run validate_plugin.py --verbose --report
- Fix CRITICAL > MAJOR > MINOR
- Re-run until exit 0
Converted and distributed by TomeVault — claim your Tome and manage your conversions.