← Files Job Outreach CopilotARCHIVED FILE
scripts/validate_package.py
2.56 KB · Nov 21, 2026 · 12:50 UTC
#!/usr/bin/env python3
from pathlib import Path
import json,re,sys
base=Path(__file__).resolve().parents[1]
errors=[];checks=0
p=json.loads((base/'plugin.json').read_text());interface=p['extensions']['com.openai']['interface']
for k in ['name','version','description','author','skills']:
checks+=1
if not p.get(k):errors.append(f'missing {k}')
for k in ['displayName','shortDescription','longDescription','developerName','logo','composerIcon','websiteURL','supportURL','privacyPolicyURL','termsOfServiceURL']:
checks+=1
if not interface.get(k):errors.append(f'missing interface {k}')
checks+=1
if len(interface['shortDescription'])>30:errors.append('shortDescription exceeds 30 characters')
checks+=1
if len(interface['defaultPrompt'])!=3:errors.append('starter prompt count != 3')
for s in interface['defaultPrompt']:
checks+=1
if len(s)>128:errors.append('starter prompt exceeds 128 characters')
for k in ['logo','composerIcon']:
checks+=1
if not (base/interface[k]).is_file():errors.append('missing icon '+interface[k])
for n in ['get-started','candidate-profile','discover-jobs','find-recruiters','assess-fit','qualify-opportunity','linkedin-outreach','email-outreach','recruiter-replies','resume-alignment','prepare-applications','pipeline-tracking','follow-up-planning','interview-preparation','company-role-research','safety-and-privacy','orchestrate-specialists','job-search-review']:
f=base/'skills'/n/'SKILL.md';checks+=1
if not f.exists(): errors.append('missing '+str(f.relative_to(base)));continue
content=f.read_text()
if not re.search(r'^---\nname: '+re.escape(n)+r'\n',content):errors.append('bad front matter '+n)
checks+=1
if len(content)<550: errors.append('suspiciously short skill '+n)
for target in re.findall(r'`(\.\./\.\./references/[^`]+)`',content):
checks+=1
if not (f.parent/target).exists():errors.append(f'broken skill reference {n}: {target}')
for f in (base/'references'/'legacy').glob('*.md'):
checks+=1
if f.stat().st_size<100:errors.append('short legacy '+f.name)
bench=json.loads((base/'benchmarks/cases.json').read_text())
checks+=1
if len(bench['cases'])!=30:errors.append('bench count invalid')
checks+=1
if not any(x['type']=='negative' for x in bench['cases']): errors.append('no negative cases')
checks+=1
if (base/'mcp.json').exists():errors.append('unexpected remote MCP')
print(json.dumps({'checks':checks,'errors':errors,'skills':len(list((base/'skills').glob('*/SKILL.md'))),'refs':len(list((base/'references').rglob('*.md'))),'templates':len(list((base/'templates').glob('*'))),'benchmarks':len(bench['cases'])},indent=2))
sys.exit(1 if errors else 0)
SHA-256: 319cc5773e79d7f0a5c97c70c0bec643d25e5fe62c96f890239d2608c51540af