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.
npx skills add RelationalAI/rai-agent-skills --skill rai-ontologygit clone --depth 1 https://github.com/RelationalAI/rai-agent-skillsWrote 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.
[](https://agentmods.dev/skills/relationalai/rai-agent-skills/rai-ontology)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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.
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 |
What ships with it
18 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- examples/auxiliary_schema_enrichment.py 2.2 KB runs code
- examples/cross_product_decision_concept.py 5.2 KB runs code
- examples/derived_concept_bridge_entity.py 4.9 KB runs code
- examples/geographic_hierarchy_compound_key.py 5.3 KB runs code
- examples/large_scale_bidirectional.py 8.2 KB runs code
- examples/multi_level_hierarchy_segmentation.py 4.5 KB runs code
- examples/multi_schema_cross_system.py 11 KB runs code
- examples/pairwise_property_ref.py 6.6 KB runs code
- examples/self_referential_bom.py 4.7 KB runs code
- examples/value_type_fk_resolution.py 4.6 KB runs code
- references/advanced-modeling.md 15 KB
- references/build-examples.md 41 KB
- references/categorization-and-advanced.md 19 KB
- references/constraint-patterns.md 22 KB
- references/discovery-queries.md 3.3 KB
- references/enrichment-patterns.md 15 KB
- references/examination-guidance.md 2.2 KB
- references/fact-decomposition-and-validation.md 12 KB
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.
- 12d ago First seen · 472 lines · 99 tokens per session scan A 52a3053c4652
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.
Other skills, from other repositories
pinecone
Managed vector DB for production RAG and search.
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.
data-engineer
Build scalable data pipelines, modern data warehouses, and real-time streaming architectures. Implements Apache Spark, dbt, Airflow, and cloud-native data platforms.
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.
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…
similarity-search-patterns
Implement efficient similarity search with vector databases. Use when building semantic search, implementing nearest neighbor queries, or optimizing retrieval performance.