Validate Claude Code marketplace or plugin by discovering manifest files
Automatically discovers and validates Claude Code plugin or marketplace manifests in common locations. Use it to quickly verify your plugin setup without specifying file paths.
/plugin marketplace add tmc/it2/plugin install claude-plugin-development@it2Intelligently validate Claude Code manifests by discovering them in common locations.
Discovery Logic:
../../.claude-plugin/marketplace.json (relative to current directory).claude-plugin/plugin.json in current directory.claude-plugin/marketplace.jsonUsage:
Simply run the command - it will discover and validate manifests automatically:
/claude-plugin-validate
Implementation:
# Function to find and validate manifests
validate_discovered() {
local repo_root
local current_dir="$(pwd)"
# Try to find git root
repo_root=$(git rev-parse --show-toplevel 2>/dev/null || echo "$current_dir")
# 1. Check for marketplace at repo root
if [ -f "$repo_root/.claude-plugin/marketplace.json" ]; then
echo "Found marketplace at repository root:"
claude plugin validate "$repo_root/.claude-plugin/marketplace.json"
return $?
fi
# 2. Check for local plugin
if [ -f "$current_dir/.claude-plugin/plugin.json" ]; then
echo "Found plugin in current directory:"
claude plugin validate "$current_dir"
return $?
fi
# 3. Check for local marketplace
if [ -f "$current_dir/.claude-plugin/marketplace.json" ]; then
echo "Found marketplace in current directory:"
claude plugin validate "$current_dir/.claude-plugin/marketplace.json"
return $?
fi
# 4. Nothing found
echo "No manifest found. Searched:"
echo " - $repo_root/.claude-plugin/marketplace.json (repository marketplace)"
echo " - $current_dir/.claude-plugin/plugin.json (local plugin)"
echo " - $current_dir/.claude-plugin/marketplace.json (local marketplace)"
return 1
}
validate_discovered
Example Output:
When marketplace found at root:
Found marketplace at repository root:
Validating marketplace manifest: /path/to/repo/.claude-plugin/marketplace.json
✔ Validation passed
When plugin found locally:
Found plugin in current directory:
Validating plugin manifest: /path/to/plugin/.claude-plugin/plugin.json
✔ Validation passed
When nothing found:
No manifest found. Searched:
- /path/to/repo/.claude-plugin/marketplace.json (repository marketplace)
- /current/dir/.claude-plugin/plugin.json (local plugin)
- /current/dir/.claude-plugin/marketplace.json (local marketplace)
Use Cases:
Notes: