rai-ontology

rai-ontology is a skill for Claude Code from RelationalAI/rai-agent-skills. It costs 99 tokens per session (8,355 once invoked), scanned A, original, Apache-2.0.

A skill for building an ontology, a structured map of concepts, properties, identities, and relationships in data, for RelationalAI. It can start from Snowflake tables or local CSV files.

In plain words
What is it for?
Starting or evolving RelationalAI models, mapping data, designing relationships and subtypes, enriching an existing model, and reviewing modeling gaps.
Why use it?
It helps turn raw data into a model that can answer domain questions and exposes whether problems come from the model or the source data.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the rai plugin — 12 skills shipped together

Good fit Starting or evolving RelationalAI models, mapping data, designing relationships and subtypes, enriching an existing model, and reviewing modeling gaps.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/relationalai/rai-agent-skills/rai-ontology
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add RelationalAI/rai-agent-skills --skill rai-ontology
Clone the repo
git clone --depth 1 https://github.com/RelationalAI/rai-agent-skills

Made for: Claude Code.

Or install rai, the plugin that ships this one along with the rest of its 12 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rai-ontology

README.md
[![agentmods](https://agentmods.dev/badge/skills/relationalai/rai-agent-skills/rai-ontology/github.svg)](https://agentmods.dev/skills/relationalai/rai-agent-skills/rai-ontology)
Your own site
<a href="https://agentmods.dev/skills/relationalai/rai-agent-skills/rai-ontology"><img src="https://agentmods.dev/badge/skills/relationalai/rai-agent-skills/rai-ontology/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rai-ontology

Your own site · 80×15
<a href="https://agentmods.dev/skills/relationalai/rai-agent-skills/rai-ontology"><img src="https://agentmods.dev/badge/skills/relationalai/rai-agent-skills/rai-ontology.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,355 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00099 $0.08355
Opus 5 $0.00049 $0.04177
Sonnet 5 $0.00020 $0.01671
Haiku 4.5 $0.00010 $0.00835

Measured 12d ago against content hash 52a3053c4652, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

rai-ontology scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

The scan reads SKILL.md. This mod also ships 10 executable files (examples/auxiliary_schema_enrichment.py, examples/cross_product_decision_concept.py, examples/derived_concept_bridge_entity.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/rai/skills/rai-ontology/SKILL.md · 472 lines

How it starts

The opening of the file, as written. The whole thing — 472 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Ontology

Summary

What: Building a working RAI ontology from raw data, and the design decisions that shape it — concepts, relationships, properties, identity, data mapping, layering, and enrichment.

When to use:

  • Starting a new RAI project from Snowflake tables or local CSV files (the Greenfield Build Workflow)
  • Enriching an existing model — adding properties, relationships, or subtypes to a model that already loads and queries
  • Reviewing or evolving a model — assessing gaps (READY / MODEL_GAP / DATA_GAP), examining inventories, applying advanced patterns
  • Any concept / relationship / property design decision, including cross-product decision concepts for optimization

When NOT to use:

  • PyRel authoring of any kind — syntax, data loading, queries, derived-property rules — see rai-pyrel
  • Optimization formulation (variables, constraints, objectives) — see rai-prescriptive-problem

Overview: Scope the questions → discover and analyze source data → identify concepts with identities → identify relationships and properties → validate the design against the schema → generate code → validate with queries. The Design Principles sections are the authority the workflow steps apply; enrichment and gap classification extend an already-working model.


Quick Reference

Decision Choose Pattern
Has own PK / identity? Concept model.Concept("Name", identify_by={"id": Type})
Scalar value on entity? Property model.Property(f"{Concept} has {Type:name}")
Functional FK (each A → one B)? Property model.Property(f"{Order} placed by {Customer:customer}")
Many-to-many link? Relationship model.Relationship(f"{A} links to {B}")
Boolean flag? Unary Relationship model.Relationship(f"{Concept} is active")
Fundamental category of a concept? Subtype model.Concept("Supplier", extends=[Business])
Recurring .where() filter? Subtype model.Concept("Sub", extends=[Parent])
Many-to-many with data? Junction concept Concept with compound identity

Read the full file on GitHub · 472 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 472 lines · 99 tokens per session scan A 52a3053c4652

Subscribe to this mod's changes

rai-ontology is a skill published in the GitHub repository RelationalAI/rai-agent-skills (4 stars, last pushed 2d ago), licensed Apache-2.0. It adds 99 tokens to every session and 8,355 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

pinecone

Managed vector DB for production RAG and search.

NousResearch/hermes-agent · 13 tokens

embeddings

Vector embeddings with HNSW indexing, sql.js persistence, and hyperbolic support. 75x faster with agentic-flow integration. Use when: semantic search, pattern matching, similarity queries, knowledge retrieval. Skip when: exact text matching, simple lookups, no semantic understanding needed.

ruvnet/ruflo · 62 tokens

data-engineer

Build scalable data pipelines, modern data warehouses, and real-time streaming architectures. Implements Apache Spark, dbt, Airflow, and cloud-native data platforms.

davila7/claude-code-templates · 35 tokens

graphjin-env

Use when setting up a training or evaluation loop against a GraphJin agent environment — running the container, reading /health, driving episodes hosted or step-by-step or with your own agent over MCP, splitting train from eval, exporting trajectories, and deciding whether two rewards can be compared.

dosco/graphjin · 61 tokens

ingesting-into-data-lake

Import data into the AWS data lake from S3 files, local uploads, JDBC databases (Oracle, SQL Server, PostgreSQL, MySQL, RDS, Aurora), Amazon Redshift, Snowflake, BigQuery, DynamoDB, or existing Glue catalog tables (migration). Default target is S3 Tables; standard Iceberg on a general purpose bucket is supported where…

aws/agent-toolkit-for-aws · 228 tokens

similarity-search-patterns

Implement efficient similarity search with vector databases. Use when building semantic search, implementing nearest neighbor queries, or optimizing retrieval performance.

foryourhealth111-pixel/Vibe-Skills · 30 tokens