-
Notifications
You must be signed in to change notification settings - Fork 5
53 lines (45 loc) · 2.04 KB
/
Copy pathvalidate-plugin.yml
File metadata and controls
53 lines (45 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Validate Plugin Configuration
on:
pull_request:
push:
branches: [main]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
- name: Setup Node.js
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: '20'
- name: Validate JSON Syntax
run: |
for f in plugin.json mcp.json .mcp.json .claude-plugin/plugin.json .claude-plugin/marketplace.json .codex-plugin/plugin.json .agents/plugins/marketplace.json; do
jq empty "$f"
echo "✓ $f is valid JSON"
done
- name: Validate Agent Plugins Manifests
run: |
curl -fsSL --retry 3 -o /tmp/plugin.schema.json https://agent-plugins.org/schemas/1.0.0/plugin.schema.json
curl -fsSL --retry 3 -o /tmp/mcp.schema.json https://agent-plugins.org/schemas/1.0.0/mcp.schema.json
npx --yes ajv-cli@5 validate --spec=draft2020 -s /tmp/plugin.schema.json -d plugin.json
npx --yes ajv-cli@5 validate --spec=draft2020 -s /tmp/mcp.schema.json -d mcp.json
echo "✓ plugin.json and mcp.json conform to Agent Plugins 1.0.0 schemas"
- name: Check Version Sync
run: |
ROOT=$(jq -r '.version' plugin.json)
CODEX=$(jq -r '.version' .codex-plugin/plugin.json)
echo "plugin.json=$ROOT .codex-plugin/plugin.json=$CODEX"
if [ "$ROOT" != "$CODEX" ]; then
echo "Error: version mismatch between plugin.json and .codex-plugin/plugin.json"
exit 1
fi
echo "✓ Versions are in sync"
- name: Check Skill Frontmatter
run: |
for f in skills/*/SKILL.md; do
head -20 "$f" | grep -q '^name:' || { echo "Error: $f missing name frontmatter"; exit 1; }
head -20 "$f" | grep -q '^description:' || { echo "Error: $f missing description frontmatter"; exit 1; }
echo "✓ $f has name and description"
done