I asked Claude to read everyting in OBO Academy:
Read everything related to the ODK in @docs/ and write a perfectly formatted Claude SKILL file for "setting up" and ODK repo
And it came up with this. Maybe we can use this as a starting point for a claude skill moving forward.
---
name: odk-repo-setup
description: Assists users in setting up a new Ontology Development Kit (ODK) repository from scratch. Use this Skill when users need to create a new ODK-managed ontology project, seed an ODK repository, configure project.yaml files, or migrate an existing ontology to the ODK framework. Handles Docker setup verification, project configuration, repository seeding, import module setup, and GitHub/GitLab publishing.
---
This Skill helps users set up and configure an Ontology Development Kit (ODK) repository for managing OBO-style ontologies. The ODK is a comprehensive system that bundles essential ontology development tools (ROBOT, OWLTools, DOSDP-tools, etc.) and provides standardized workflows for ontology lifecycle management.
Before starting ODK repository setup, verify the following prerequisites are met:
Docker Installation
docker ps to confirm Docker is installed and runningDocker Memory Configuration
ODK Docker Image
docker pull obolibrary/odkfulldocker run --rm obolibrary/odkfull robot --versionGit Configuration
.gitconfig exists with user name and email configured:
~/.gitconfig%userprofile%/.gitconfiggit config --global user.name "Your Name"
git config --global user.email "your.email@example.org"
GitHub/GitLab Account
The ODK project configuration file (typically named {ontology-id}-odk.yaml) is the central configuration that defines how the ODK manages your ontology. Guide users through creating this file with the following structure:
1. Ontology Metadata
id: myonto # Lowercase, 4-5 characters, determines file naming
title: "My Ontology" # Full ontology title
description: "Description of the ontology purpose and scope"
contact: maintainer@example.org # Primary contact email
creators: # List of creators/maintainers
- Organization or Person Name
license: https://creativecommons.org/licenses/by/4.0/
2. Git Repository Configuration
github_org: myusername # GitHub username or organization
git_main_branch: main # Use "main" for new repos, "master" for legacy
repo: my-ontology # Repository name (lowercase with hyphens)
3. CI/CD Configuration
ci:
- github_actions # Enable GitHub Actions for automated QC
4. Release Artifacts Configuration
release_artefacts:
- base # Contains only ontology-native axioms (unclassified)
- full # Includes imports and inferred axioms
- simple # Simplified version for basic use
primary_release: full # The main release file users will access
export_formats:
- owl # OWL format (always include)
- obo # OBO format (optional, for OBO Foundry)
- json # OBOGraphs JSON (optional)
5. Import Configuration
import_group:
products:
- id: ro # Relation Ontology (relations/properties)
- id: pato # Phenotype And Trait Ontology
- id: omo # OBO Metadata Ontology
module_type: mirror # Import entire ontology (for metadata)
- id: chebi # Chemical Entities of Biological Interest
is_large: true # Mark large ontologies
use_gzipped: true # Use compressed version
make_base: true # Create base import without imports
6. Memory and Resource Configuration
robot_java_args: '-Xmx8G' # Max RAM for ROBOT (should be ~20% less than Docker limit)
7. ROBOT Report Configuration
robot_report:
use_labels: TRUE # Use labels in report for readability
fail_on: ERROR # Fail build if ERROR-level violations found
custom_profile: TRUE # Use custom quality control profile
report_on:
- edit # Run report on edit file
When configuring imports, explain these key parameters:
module_type: Controls how the import is created
slme (default): SLME-BOT extraction (recommended for most cases)mirror: Import entire ontology as-iscustom: Use custom ROBOT commands in Makefilemodule_type_slme: Refinement of SLME extraction method
BOT (default): Bottom module (includes subclasses)TOP: Top module (includes superclasses)STAR: Star module (includes related terms)is_large: Boolean flag for ontologies that require special handling (NCBITaxon, ChEBI)
use_gzipped: Boolean to use gzipped versions of large ontologies
make_base: Boolean to create base import without nested imports
use_base: Boolean to import from base file instead of full release
Once the project configuration file is created, seed the repository:
For Unix/Mac:
# Download seed script (or use existing one)
wget https://raw.githubusercontent.com/INCATools/ontology-development-kit/master/seed-via-docker.sh
# Make executable
chmod +x seed-via-docker.sh
# Seed repository with config file
./seed-via-docker.sh -c -C myonto-odk.yaml
For Windows:
# Download seed-via-docker.bat
# Ensure seed-via-docker.bat is in working directory
# Seed repository with config file
seed-via-docker.bat -c -C myonto-odk.yaml
Important flags:
-C <config-file>: Specifies the project configuration file-c: Clean flag - removes any previous seeding attempt before creating new oneSet user expectations about the seeding process:
target/{ontology-id}/ directory1. No Git Configuration
.gitconfig file exists with user.name and user.emailODK_GITNAME="Your Name" ODK_GITEMAIL="your@email.org" ./seed-via-docker.sh -C config.yaml
2. Spaces in User Path
3. Wrong File Extensions (Windows)
project.yaml.txt or seed-via-docker.bat.txt.txt extension4. Permission Issues with target/ directory
target/ directorysudo rm -rf target/After successful seeding, explain the generated repository structure:
myonto/
├── src/
│ ├── ontology/ # Main ontology development directory
│ │ ├── myonto-edit.owl # Editor file (edit this in Protégé)
│ │ ├── myonto-odk.yaml # ODK configuration (for updates)
│ │ ├── run.sh # ODK wrapper script (Unix/Mac)
│ │ ├── run.bat # ODK wrapper script (Windows)
│ │ ├── Makefile # Generated build rules
│ │ ├── catalog-v001.xml # XML Catalog for import resolution
│ │ ├── imports/ # Import modules directory
│ │ │ ├── ro_terms.txt # List of RO terms to import
│ │ │ ├── ro_import.owl # Generated RO import module
│ │ │ └── ... # Other imports
│ │ └── mirror/ # Cached copies of source ontologies
│ └── metadata/ # OBO Foundry metadata files
├── .github/
│ └── workflows/
│ └── qc.yml # GitHub Actions QC workflow
├── README.md # General README
└── README-editors.md # Editor-specific instructions
Guide users through publishing their seeded repository:
target/{ontology-id} directoryNote: GitHub may request additional permissions to push workflow files (.github/workflows/*)
Create new repository on GitHub/GitLab:
Push to remote from command line:
cd target/myonto
git remote add origin https://github.com/username/myonto.git
git branch -M main
git push -u origin main
Enable GitHub Actions (if using GitHub)
Move Repository (optional)
target/myonto to preferred location~/git/ or ~/workspace/)Review README-editors.md
After repository setup, configure ID ranges for term creation:
Locate ID ranges file: src/ontology/{ontology-id}-idranges.owl
Edit file to assign ID ranges to curators:
Datatype: idrange:1
Annotations: allocatedto: "Curator Name"
EquivalentTo: xsd:integer[>= 0000001, <= 0010000]
Protégé 5.6+ Configuration (automatic):
Protégé 5.5 and below (manual):
After seeding, import modules need to be built:
For each import configured in project.yaml, populate the term list file:
Example: src/ontology/imports/iao_terms.txt
http://purl.obolibrary.org/obo/IAO_0000115 # definition
http://purl.obolibrary.org/obo/IAO_0000136 # is about
http://purl.obolibrary.org/obo/IAO_0000118 # alternative term
Format Rules:
# for human readabilityNavigate to src/ontology/ directory and use one of these commands:
Refresh all imports:
sh run.sh make refresh-imports
Refresh single import:
sh run.sh make refresh-ro # Replace 'ro' with import ID
Refresh without re-downloading mirrors:
sh run.sh make no-mirror-refresh-imports # All imports
sh run.sh make no-mirror-refresh-ro # Single import
For large ontologies only (excluding large imports):
sh run.sh make refresh-imports-excluding-large
If import module contains unwanted terms or missing necessary terms:
Try different module_type_slme values in project.yaml:
BOT to TOP or STARsh run.sh make update_repo to regenerate Makefilesh run.sh make refresh-{import-id}Use module_type: custom for full control:
{ontology-id}.MakefileVerify in Protégé:
Guide users through their first editing session:
Open Editor File in Protégé
# Start Protégé (version 5.6.0+ recommended)
# Open: src/ontology/{ontology-id}-edit.owl
Verify Imports Loaded
Configure Protégé Settings
Make Initial Edits
Run Local QC Checks
cd src/ontology
sh run.sh make test # Run all QC checks
When ready to create the first release:
cd src/ontology
sh run.sh make prepare_release
This command:
Explain to users what each artifact is:
base (myonto-base.owl): Only native ontology axioms, no imports, unclassified
full (myonto.owl): Includes imports and inferred axioms from reasoner
simple (myonto-simple.owl): Simplified version with reduced complexity
After successful prepare_release:
v{YYYY-MM-DD} (e.g., v2024-01-15)src/ontology/ directorysrc/metadata/ directoryProvide users with this command reference:
# Navigate to ontology directory first
cd src/ontology
# Update ODK to latest version
sh run.sh make update_repo # Run twice (first may fail)
# Refresh imports
sh run.sh make refresh-imports # All imports
sh run.sh make refresh-{id} # Single import (e.g., refresh-ro)
# Prepare release
sh run.sh make prepare_release
# Run QC checks
sh run.sh make test
# Check ODK version
sh run.sh make odkversion
# Update documentation
sh run.sh make update_docs
# Validate OWL profile
sh run.sh make validate_profile_myonto-edit.owl
If users encounter memory issues (Error 137, OutOfMemory):
1. Increase Docker Memory
robot_java_args setting2. Adjust ROBOT Java Memory
src/ontology/{ontology-id}-odk.yaml:
robot_java_args: '-Xmx10G' # Increase from 8G to 10G
sh run.sh make update_repo to apply changes3. Optimize Pipeline Design
robot query commands (loads ontology twice in memory)robot reason only at end of pipelinereduce and materialise on large ontologies when possibleIf user has existing ontology to migrate:
Convert to OFN format (recommended):
# Using ODK Docker directly
docker run --rm -v $PWD:/work -w /work obolibrary/odkfull \
robot convert --input myonto.owl --format ofn --output myonto.ofn
Analyze external dependencies:
obo:RO_, obo:BFO_)import_group configuration{ontology-id}-edit.owl
sh run.sh make refresh-importssh run.sh make prepare_releaseIf user needs to add import dependency later:
import_group in src/ontology/{ontology-id}-odk.yamlsh run.sh make update_repo to regenerate Makefilecatalog-v001.xmlimports/{new-import}_terms.txtsh run.sh make refresh-{new-import}When new ODK version is released:
Pull latest ODK image:
docker pull obolibrary/odkfull
Update repository (run twice):
cd src/ontology
sh run.sh make update_repo
sh run.sh make update_repo # Yes, twice - first may fail
Update GitHub Actions workflow:
.github/workflows/qc.ymlcontainer: obolibrary/odkfull:v{version}Review and test changes:
sh run.sh make test to verify QC passesNotify other developers to pull latest ODK image
Point users to these resources:
sh run.sh make test before committing changes{ontology-id}-edit.owl, never release filesProvide this concise workflow checklist:
docker pull obolibrary/odkfull./seed-via-docker.sh -c -C config.yamlsh run.sh make refresh-importssh run.sh make testsh run.sh make prepare_releaseUser wants to create minimal ontology for tracking research protocols:
id: repo
title: "Research Protocol Ontology"
github_org: myusername
git_main_branch: main
repo: research-protocol-ontology
release_artefacts:
- base
- full
primary_release: full
export_formats:
- owl
import_group:
products:
- id: omo
module_type: mirror
- id: obi
robot_java_args: '-Xmx8G'
Minimal configuration imports only metadata ontology (OMO) and biomedical investigations ontology (OBI).
User migrating chemistry ontology with many dependencies:
id: chemonto
title: "Chemistry Ontology"
github_org: chemistry-ontologies
git_main_branch: main
repo: chemistry-ontology
release_artefacts:
- base
- full
- simple
primary_release: full
export_formats:
- owl
- obo
- json
import_group:
products:
- id: bfo
module_type: mirror
- id: ro
use_base: true
- id: omo
module_type: mirror
- id: chebi
is_large: true
use_gzipped: true
make_base: true
- id: pato
- id: iao
robot_java_args: '-Xmx12G'
robot_report:
use_labels: TRUE
fail_on: ERROR
report_on:
- edit
Configuration includes large ontology (ChEBI) with compression, higher memory allocation, and comprehensive QC.
seed-via-docker.bat instead of seed-via-docker.shrun.bat instead of run.sh for ODK commands%userprofile%/.gitconfigseed-via-docker.sh and run.sh scriptschmod +x to make scripts executable~/.gitconfigWhen helping users set up ODK repositories: