Automated system to ensure registry.json accuracy and prevent installation 404 errors.
scripts/validate-registry.sh)Validates that all paths in registry.json point to actual files.
Usage:
# Basic validation
./scripts/validate-registry.sh
# Verbose output with orphaned file detection
./scripts/validate-registry.sh -v
# Get fix suggestions for missing files
./scripts/validate-registry.sh --fix
Exit Codes:
0 = All paths valid1 = Missing files found2 = Registry parse errorscripts/auto-detect-components.sh)Scans .opencode/ directory for new components not in registry.
Usage:
# Dry run - see what would be added
./scripts/auto-detect-components.sh --dry-run
# Auto-add new components
./scripts/auto-detect-components.sh --auto-add
Features:
On Pull Request:
Workflow File: .github/workflows/validate-registry.yml
Developer adds new file (.opencode/command/my-cmd.md)
↓
Creates PR to dev
↓
GitHub Action runs automatically
↓
Auto-detects new file
↓
Adds to registry.json
↓
Validates all paths
↓
✓ Pass → PR can merge
✗ Fail → PR blocked
curl: (22) The requested URL returned error: 404
✗ Failed to install command: prompt-enhancer
Root Cause: Registry had wrong path
.opencode/command/prompt-enchancer.md (typo).opencode/command/prompt-engineering/prompt-enhancer.mdSolution:
.opencode/Add frontmatter with description:
---
description: "Your component description"
---
Create PR - automation handles the rest!
If you need to manually update registry.json:
./scripts/validate-registry.sh -v# Validate registry
./scripts/validate-registry.sh -v
# Check for new components
./scripts/auto-detect-components.sh --dry-run
# Add new components
./scripts/auto-detect-components.sh --auto-add
# Validate again
./scripts/validate-registry.sh
✅ Prevents 404 errors - All paths validated before merge
✅ Auto-registration - New components added automatically
✅ Zero manual work - Developers just add files
✅ CI/CD integration - Runs on every PR
✅ Clear feedback - Detailed error messages and suggestions