Skip to content

Commit 6795c82

Browse files
committed
feat: use Claude CLI validator for plugin validation
- Use 'claude plugin validate .' when Claude CLI is available - Falls back to jq-based validation when CLI not present - Removes TODO comment about validation
1 parent d46a0ac commit 6795c82

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

justfile

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,17 @@ validate:
3737
set -e
3838
echo "Validating plugin structure..."
3939

40+
# Use Claude CLI validator if available (validates JSON schema + structure)
41+
if command -v claude >/dev/null 2>&1; then
42+
echo "Using Claude CLI validator..."
43+
claude plugin validate .
44+
exit $?
45+
fi
46+
47+
echo "Claude CLI not found, using fallback validation..."
4048
VALID=true
41-
# TODO does claude cli provide some validator? What about json schema validation?
42-
# Check marketplace.json exists and is valid
49+
50+
# Check marketplace.json exists and is valid JSON
4351
if [ ! -f ".claude-plugin/marketplace.json" ]; then
4452
echo "ERROR: marketplace.json not found"
4553
exit 1
@@ -50,7 +58,7 @@ validate:
5058
exit 1
5159
fi
5260

53-
echo "marketplace.json is valid"
61+
echo "marketplace.json is valid JSON"
5462

5563
# Validate each plugin
5664
for plugin_dir in plugins/*; do

0 commit comments

Comments
 (0)