robot-obo-tool
Skills for using ROBOT, the OBO ontology command-line toolkit for reasoning, template-based term creation, quality control, format conversion, and ontology manipulation. Use this when working with OWL/OBO ontologies that need automated processing.
What this skill does
# ROBOT Guide
## Overview
ROBOT (ROBOT is an OBO Tool) is the standard command-line tool for OBO ontology development. It handles reasoning, quality control, format conversion, module extraction, template-based term generation, and release automation. Almost every OBO Foundry ontology uses ROBOT in its build pipeline.
ROBOT is a Java application distributed as a JAR with a shell wrapper script.
Home page: <https://robot.obolibrary.org/>
## When to Use
Use ROBOT when you need to:
- **Reason over an ontology** - classify, check consistency, find unsatisfiable classes
- **Generate terms from templates** - create OWL from TSV/CSV spreadsheets
- **Run quality control** - check for missing labels, definitions, bad xrefs
- **Convert formats** - between OWL, OBO, Turtle, OFN, Manchester, JSON
- **Extract modules** - pull subsets from large ontologies
- **Diff ontologies** - compare two versions at the OWL level (consider OAK for higher level diffs)
- **Query with SPARQL** - run SELECT/CONSTRUCT/ASK queries
- **Build release pipelines** - chain commands for automated releases
Do NOT use ROBOT when:
- You want to search external ontologies interactively - use OAK or OLS MCP instead
- You want to edit individual OBO stanzas by hand - use obo-grep/obo-checkout tools instead
- You need programmatic ontology access from Python - use oaklib instead
## Installation & Setup
ROBOT requires Java 8+. Install via:
```bash
# Download latest
curl -L https://github.com/ontodev/robot/releases/latest/download/robot.jar -o robot.jar
curl -L https://raw.githubusercontent.com/ontodev/robot/master/bin/robot -o robot
chmod +x robot
```
For large ontologies, increase Java memory:
```bash
export ROBOT_JAVA_ARGS="-Xmx8G"
```
Verify installation:
```bash
robot --version
```
## Command Quick Reference
Every ROBOT command with a one-line description and key example. For full details on any command, read the corresponding file in `docs/` within this skill directory.
### Core Ontology Operations
| Command | Description | Key Example |
|---------|-------------|-------------|
| `merge` | Combine multiple ontologies | `robot merge --input a.owl --input b.owl --output merged.owl` |
| `reason` | Run reasoner, assert inferred axioms | `robot reason --reasoner ELK --input edit.owl --output reasoned.owl` |
| `relax` | Convert EquivalentClass to SubClassOf | `robot reason ... relax --output relaxed.owl` |
| `reduce` | Remove redundant SubClassOf axioms | `robot reason ... relax reduce --output reduced.owl` |
| `materialize` | Assert inferred superclass expressions | `robot materialize --reasoner ELK --input edit.owl --output mat.owl` |
| `unmerge` | Remove axioms of one ontology from another | `robot unmerge --input merged.owl --input remove.owl --output result.owl` |
### Extracting and Filtering
| Command | Description | Key Example |
|---------|-------------|-------------|
| `extract` | Extract module from ontology | `robot extract --method BOT --input ont.owl --term GO:0005634 --output module.owl` |
| `filter` | Keep only matching axioms | `robot filter --input ont.owl --term UBERON:0000955 --select "self ancestors" --output filtered.owl` |
| `remove` | Remove matching axioms | `robot remove --input ont.owl --select "imports" --output no-imports.owl` |
### Creating and Editing
| Command | Description | Key Example |
|---------|-------------|-------------|
| `template` | Generate OWL from TSV/CSV templates | `robot template --input ont.owl --template terms.tsv --output new-terms.owl` |
| `annotate` | Add ontology-level metadata | `robot annotate --input ont.owl --ontology-iri "http://purl.obolibrary.org/obo/my.owl" --output annotated.owl` |
| `rename` | Rename entity IRIs | `robot rename --input ont.owl --mappings mappings.tsv --output renamed.owl` |
| `expand` | Expand shortcut macros | `robot expand --input ont.owl --output expanded.owl` |
| `repair` | Fix deprecated class references | `robot repair --input ont.owl --output repaired.owl` |
| `collapse` | Collapse import hierarchy | `robot collapse --input ont.owl --output collapsed.owl` |
### Quality Control
| Command | Description | Key Example |
|---------|-------------|-------------|
| `report` | QC report with built-in checks | `robot report --input ont.owl --output report.tsv` |
| `verify` | Check SPARQL-based rules | `robot verify --input ont.owl --queries rules/*.sparql` |
| `validate-profile` | Validate OWL profile compliance | `robot validate-profile --input ont.owl --profile EL --output violations.tsv` |
### Querying and Exporting
| Command | Description | Key Example |
|---------|-------------|-------------|
| `query` | Run SPARQL queries | `robot query --input ont.owl --query q.sparql results.csv` |
| `export` | Export entities as table | `robot export --input ont.owl --header "ID\|LABEL\|SubClass Of" --export terms.csv` |
| `diff` | Compare two ontologies | `robot diff --left v1.owl --right v2.owl --output changes.md` |
| `measure` | Ontology metrics | `robot measure --input ont.owl --output metrics.tsv` |
### Debugging
| Command | Description | Key Example |
|---------|-------------|-------------|
| `explain` | Explain inferred axioms | `robot explain --input ont.owl --reasoner ELK --axiom "'eye' SubClassOf 'organ'" --explanation result.md` |
### Other
| Command | Description | Key Example |
|---------|-------------|-------------|
| `convert` | Convert between formats | `robot convert --input ont.owl --format obo --output ont.obo` |
| `mirror` | Download imported ontologies | `robot mirror --input ont.owl --directory mirror/ --output catalog.xml` |
## Deep Dive: Reasoning
Reasoning is the most critical ROBOT operation. It validates logical consistency and infers new axioms from existing definitions.
### Reasoner Choice
| Reasoner | Speed | Expressivity | When to Use |
|----------|-------|-------------|-------------|
| **ELK** | Fast | EL++ (no negation/disjunction) | Default for most OBO ontologies |
| **HermiT** | Slow | Full OWL DL | When ELK misses inferences or you need full DL |
| **Whelk** | Fast | EL++ | Alternative to ELK, Scala-based |
| **Structural** | Very fast | None (syntactic only) | Quick checks, no reasoning |
Most OBO ontologies use ELK. Only use HermiT when you specifically need full OWL DL reasoning.
### Key Options
```bash
robot reason \
--reasoner ELK \
--equivalent-classes-allowed asserted-only \
--exclude-tautologies structural \
--input edit.owl \
--output reasoned.owl
```
- `--equivalent-classes-allowed asserted-only` - Fail if reasoning produces unexpected equivalent class pairs (catches modeling errors)
- `--exclude-tautologies structural` - Skip trivially true axioms
- `--annotate-inferred-axioms true` - Mark inferred axioms with `is_inferred true` annotation
- `--exclude-duplicate-axioms true` - Skip axioms already in imports
- `--create-new-ontology true` - Put inferences in a separate ontology
### Debugging Unsatisfiable Classes with explain
When reasoning finds unsatisfiable classes (classes that cannot have any instances), use `explain` to generate human-readable markdown explanations:
```bash
robot merge --input ont.owl \
explain \
--reasoner ELK \
-M unsatisfiability \
--unsatisfiable all \
--explanation unsats.md
```
This generates a markdown file showing the chain of axioms that leads to each unsatisfiability. This is invaluable for debugging.
You can also explain specific entailments:
```bash
robot explain --input ont.owl \
--reasoner ELK \
--axiom "'retina' SubClassOf 'part of' some 'eye'" \
--explanation explanation.md
```
The `--axiom` uses Manchester OWL syntax. Use single quotes around class/property names that contain spaces.
## Deep Dive: Templates
ROBOT templates let you create OWL ontology content from TSV/CSV spreadsheets. This is the preferred way to manage large sets of terms that follow regular patterns, because domain experts can edit spreadsheets without learning OWL.
### Template File StruRelated in Ads & Marketing
ads
IncludedMulti-platform paid advertising audit and optimization skill. Analyzes Google, Meta, YouTube, LinkedIn, TikTok, Microsoft, and Apple Ads. 250+ checks with scoring, parallel agents, industry templates, and AI creative generation.
banana
IncludedAI image generation Creative Director powered by Google Gemini Nano Banana models. Use this skill for ANY request involving image creation, editing, visual asset production, or creative direction. Triggers on: generate an image, create a photo, edit this picture, design a logo, make a banner, visual for my anything, and all /banana commands. Handles text-to-image, image editing, multi-turn creative sessions, batch workflows, and brand presets.
rpg-migration-analyzer
IncludedAnalyzes legacy RPG (Report Program Generator) programs from AS/400 and IBM i systems for migration to modern Java applications. Extracts business logic from RPG III/IV/ILE source code, identifies data structures (D-specs), file operations (F-specs), program dependencies (CALLB/CALLP), and converts RPG constructs to Java equivalents. Generates migration reports, complexity estimates, and Java implementation strategies with POJO classes, JPA entities, and service methods. Use when modernizing AS/400 or IBM i legacy systems, analyzing RPG source files (.rpg, .rpgle, .RPGLE), converting RPG to Java, mapping data specifications to Java classes, planning legacy system migration, or when user mentions RPG analysis, Report Program Generator, RPG III/IV/ILE, AS/400 modernization, IBM i migration, packed decimal conversion, or mainframe application rewrite.
brand-library-architect
IncludedBuild a complete brand library for a product — visual asset render pipeline, brand documentation set (BRAND, COPY, MANIFESTO, BIOS, FAQ, GLOSSARY, TONE, PRICING), open-source convention files (README, CONTRIBUTING, SECURITY, CODE_OF_CONDUCT), and a self-contained press kit. This skill should be used when the user asks to "build a brand library / brand kit / press kit / brand assets" for a product, "set up a brand library workflow," "create a positioning manifesto plus visual identity," or any combination of brand documentation + visual asset pipeline. Apply phase-by-phase or run end-to-end. Templates are product-agnostic and use {{TOKEN}} placeholders the skill prompts the user to fill.
writing-tech-post
IncludedAuthors engineering blog posts end-to-end: launch deep-dives, incident postmortems, architecture migrations, performance case studies, tutorials, AI/agent system writeups, security disclosures, and research-to-product translations. Picks the correct archetype, plans the abstraction ladder, enforces an evidence cadence (diagrams, benchmarks, profiles, traces, code, ablations), tunes voice against publisher house styles (Datadog, Vercel, GitHub, AWS, Meta, Cloudflare, Jane Street), and runs a pre-publish gate for narrative momentum and disclosure ethics. Use when drafting a new engineering post, restructuring a draft that feels flat, deciding which evidence form belongs where, validating that depth and product context are balanced, or preparing a postmortem, migration, or performance narrative for external publication. Do not use for API reference documentation, README authoring, marketing copy, release notes, generic SEO content, ghost-written executive thought leadership, or non-engineering long-form essays.
blog-google
IncludedGoogle API integration for blog performance: PageSpeed Insights, CrUX Core Web Vitals with 25-week history, Search Console performance, URL Inspection, Indexing API, GA4 organic traffic, NLP entity analysis for E-E-A-T, YouTube video search for embedding, and Google Ads Keyword Planner. Progressive feature availability based on credential tier (API key, OAuth/service account, GA4, Ads). Shares config with claude-seo at ~/.config/claude-seo/google-api.json. Use when user says "google data", "page speed", "core web vitals", "search console", "indexation", "GA4", "keyword research", "nlp entities", "blog performance", "youtube search", "google api setup".