Prepare and generate all required metadata files for Extension Index submission
Prepare and generate all required metadata files for Extension Index submission.
Use this skill when:
Before generating files, ALWAYS fetch the latest JSON schema:
# Fetch current schema to verify required/optional fields
curl -s "https://raw.githubusercontent.com/Slicer/Slicer/main/Schemas/slicer-extension-catalog-entry-schema-v1.0.1.json"
If schema version or fields have changed, the fetched schema is authoritative.
Collect the following from the user or repository:
| Field | Description | Example |
|---|---|---|
| EXTENSION_HOMEPAGE | URL to documentation/README | https://github.com/user/repo#readme |
| EXTENSION_CONTRIBUTORS | Names with affiliations | "Jane Doe (University), John Smith (Company)" |
| EXTENSION_DESCRIPTION | 1-2 sentence summary | "Adaptive brush for intelligent segmentation" |
| EXTENSION_ICONURL | Raw PNG URL (128x128 recommended) | https://raw.githubusercontent.com/user/repo/main/Icon.png |
| EXTENSION_SCREENSHOTURLS | Space-separated raw URLs | "https://raw.githubusercontent.com/.../1.png https://...2.png" |
| EXTENSION_DEPENDS | Other extensions required, or "NA" | "NA" or "SlicerIGT SlicerOpenIGTLink" |
| Field | Required | Description |
|---|---|---|
| $schema | Yes | Schema URL (use current version) |
| category | Yes | Extension category (e.g., "Utilities", "Segmentation") |
| scm_url | Yes | Git clone URL ending in .git |
| scm_revision | No | Branch name (recommended) or commit hash |
| scm_type | No | Default: "git" |
| build_dependencies | No | Array of extension names required to build |
| build_subdirectory | No | Default: "." (use "inner-build" for superbuild) |
| enabled | No | Default: true |
| tier | No | Default: 1 (set based on checklist completion) |
Locate and update the extension metadata section:
#-----------------------------------------------------------------------------
# Extension meta-information
set(EXTENSION_HOMEPAGE "https://github.com/USERNAME/REPONAME#readme")
set(EXTENSION_CONTRIBUTORS "Contributor Name (Affiliation)")
set(EXTENSION_DESCRIPTION "Brief 1-2 sentence description of extension functionality")
set(EXTENSION_ICONURL "https://raw.githubusercontent.com/USERNAME/REPONAME/main/ExtensionIcon.png")
set(EXTENSION_SCREENSHOTURLS "https://raw.githubusercontent.com/USERNAME/REPONAME/main/Screenshots/screenshot1.png")
set(EXTENSION_DEPENDS "NA") # Or list of extension names
example.com referenceshttps://raw.githubusercontent.com/"Name (Affiliation)"Create ExtensionName.json for the ExtensionsIndex repository:
{
"$schema": "https://raw.githubusercontent.com/Slicer/Slicer/main/Schemas/slicer-extension-catalog-entry-schema-v1.0.1.json#",
"build_dependencies": [],
"build_subdirectory": ".",
"category": "CATEGORY_HERE",
"scm_revision": "main",
"scm_url": "https://github.com/USERNAME/REPONAME.git",
"tier": 1
}
Diffusion - Diffusion MRI processingIGT - Image-guided therapyInformatics - Data management, DICOMQuantification - Measurements, analysisRegistration - Image registrationSegmentation - Image segmentationUtilities - General utilities. for standard CMake extensionsinner-build for Superbuild extensions (those with external dependencies)Ensure CMakeLists.txt and JSON file are consistent:
# Extract dependencies from CMakeLists.txt
grep "EXTENSION_DEPENDS" CMakeLists.txt
# Compare with JSON build_dependencies
cat ExtensionName.json | jq '.build_dependencies'
| CMakeLists.txt | JSON File |
|---|---|
| EXTENSION_DEPENDS "NA" | build_dependencies: [] |
| EXTENSION_DEPENDS "ExtA ExtB" | build_dependencies: ["ExtA", "ExtB"] |
# Test icon URL
curl -sI "ICON_URL" | grep -E "^HTTP|^Content-Type"
# Test screenshot URLs
curl -sI "SCREENSHOT_URL" | grep -E "^HTTP|^Content-Type"
# Test homepage URL
curl -sI "HOMEPAGE_URL" | grep -E "^HTTP"
Expected results:
HTTP/2 200 or HTTP/1.1 200 OKContent-Type: image/png for imagesFor this extension, use:
set(EXTENSION_HOMEPAGE "https://github.com/benzwick/SlicerAdaptiveBrush#readme")
set(EXTENSION_CONTRIBUTORS "Ben Zwick (contributor)")
set(EXTENSION_DESCRIPTION "Adaptive brush segment editor effect that automatically segments regions based on image intensity similarity, adapting to image features rather than using a fixed geometric shape.")
set(EXTENSION_ICONURL "https://raw.githubusercontent.com/benzwick/SlicerAdaptiveBrush/main/AdaptiveBrush.png")
set(EXTENSION_SCREENSHOTURLS "https://raw.githubusercontent.com/benzwick/SlicerAdaptiveBrush/main/Screenshots/screenshot1.png")
set(EXTENSION_DEPENDS "NA")
{
"$schema": "https://raw.githubusercontent.com/Slicer/Slicer/main/Schemas/slicer-extension-catalog-entry-schema-v1.0.1.json#",
"build_dependencies": [],
"build_subdirectory": ".",
"category": "Segmentation",
"scm_revision": "main",
"scm_url": "https://github.com/benzwick/SlicerAdaptiveBrush.git",
"tier": 1
}
Note: Verify the GitHub username and URLs match the actual repository before using.
After running this skill, you should have:
CMakeLists.txt - In extension repository with correct metadataSlicerAdaptiveBrush.json - Ready to submit to ExtensionsIndex repositoryAfter preparing metadata:
/validate-extension-submission to verify readiness/extension-submission-checklist to review all requirements