open-ontologies: Instructions file for Claude Code

CLAUDE.md

open-ontologies CLAUDE.md is an instructions file for Claude Code from fabio-rovai/open-ontologies. It costs 9,916 tokens per session, scanned A, original, MIT.

A set of instructions for creating and checking ontologies—structured descriptions of concepts and their relationships. It covers writing OWL or Turtle data, loading it into a triple store, and checking inferred relationships.

In plain words
What is it for?
Use it when building or changing ontologies, validating Turtle files, loading data, generating inferred facts, and checking results with SPARQL queries.
Why use it?
It provides a repeatable way to validate ontology data and catch missing labels, properties, or design-rule violations before relying on it.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md.

This is fabio-rovai/open-ontologies's own configuration. It tells Claude Code how to work on open-ontologies itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything open-ontologies configures →

About the project

Open Ontologies is a Rust tool for planning, checking, applying, and rolling back changes to production ontologies, which are formal descriptions of concepts and their relationships. It helps ontology maintainers and reviewers inspect the consequences of edits and verify the resulting evidence with a Lean 4 checker. The catalogue includes add-ons such as skills, an instruction, a plugin, and an MCP integration for working with it.

fabio-rovai/open-ontologies · 1,383 stars · on GitHub · tesseractsemantics.com

Reuse

Borrowing it

Nothing to install: this file belongs to fabio-rovai/open-ontologies. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/fabio-rovai/open-ontologies/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/fabio-rovai/open-ontologies

Made for: Claude Code.

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 open-ontologies CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/fabio-rovai/open-ontologies/claude-md/github.svg)](https://agentmods.dev/instructions/fabio-rovai/open-ontologies/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/fabio-rovai/open-ontologies/claude-md"><img src="https://agentmods.dev/badge/instructions/fabio-rovai/open-ontologies/claude-md/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 open-ontologies CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/fabio-rovai/open-ontologies/claude-md"><img src="https://agentmods.dev/badge/instructions/fabio-rovai/open-ontologies/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 9,916 This file is loaded in full into every session.
When invoked 9,916 The same file — it is already loaded in full.
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.09916 $0.09916
Opus 5.5 $0.03966 $0.03966
Sonnet 5.5 $0.01983 $0.01983
Haiku 4.5 $0.00992 $0.00992

Measured 9d ago against content hash 1b2c5708cba3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

open-ontologies CLAUDE.md 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 9d 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.

CLAUDE.md · 285 lines

How it starts

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

Open Ontologies

Ontology Engineering Workflow

When building or modifying ontologies, follow this workflow. Claude decides which tools to call and in what order based on results — this is not a fixed pipeline.

Generate

  1. Understand the domain requirements (natural language, competency questions, methodology constraints)
  2. Generate Turtle/OWL directly — Claude knows OWL, RDF, BORO, 4D modeling natively

Validate and Load

  1. Call onto_validate on the generated Turtle — if it fails, fix the syntax errors and re-validate
  2. Call onto_load to load into the Oxigraph triple store
  3. Call onto_stats to verify class count, property count, triple count match expectations

Reason

  1. Call onto_defects FIRST. A reasoner amplifies whatever the declarations say, so a self-contradicting ontology makes every inference suspect. Fix what it reports before materializing anything
  2. Call onto_dlp_boundary SECOND, and read it before trusting anything onto_reason returns. onto_defects asks whether the declarations contradict each other; this asks a different question the rest of the pipeline never answers: which of your axioms the rule table can actually see. A certificate from onto_reason is a sound proof about the axioms the rules read and says nothing at all about the ones no rule fires on, so a green certificate over an ontology whose TBox is half invisible is true and misleading at once. The report keeps three failures apart and you act on each differently, because they are fixed in three different places. An axiom outside_the_fragment (a disjunction in the consequent, an existential in the head, a cardinality restriction, a negation in the antecedent) is not Horn, and only a rewrite of the ontology helps. An axiom inside_the_fragment_but_a_rule_is_not_implemented (owl:hasKey, owl:propertyChainAxiom, owl:FunctionalProperty) is Horn, has an OWL 2 RL rule, and is invisible only because this engine does not run it, so nothing about the ontology is wrong. And an axiom partially_inside_the_fragment is half seen, and the question is which half you needed. not_fully_seen_by_the_rule_table carries all three counts and never adds them 7a. onto_dlp_boundary answers that question for the ONTOLOGY. onto_trace_label answers it for one TRACE: hand it a reasoning trace that claims inference steps and each step comes back entailed, not_entailed or outside_the_fragment, with the same two dimensions kept apart, so a step nobody could ever derive is never reported as a step this graph happens not to support. It also reports the LOCAL answer separately, over the premises the step itself cited, so a step whose reasoning is valid over triples the graph does not hold is visible as exactly that rather than as sound. Over a rule table YOU supply, a checked step earns entailed_under_supplied_rules_checked and the family word carries the same qualification, never the bare word, and the report carries the table digest
  3. Call onto_reason with profile rdfs or owl-rl to materialize inferred triples (transitive subclass chains, domain/range propagation, equivalentClass expansion). The profile decides how much of the rule table runs: rdfs evaluates 6 of the 29 rules, owl-rl 17 and owl-rl-ext all 29, and onto_dlp_boundary reports which
  4. Call onto_stats again to verify inferred triple counts are reasonable

Read the full file on GitHub · 285 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. 9d ago Changed · +142 tokens per session 1b2c5708cba3
  2. 12d ago Changed · +16 tokens per session bc7a28936ac7
  3. 26d ago Changed · +96 tokens per session 68551de756fe
  4. 27d ago Changed · +2 lines · +897 tokens per session 39e140f6099a
  5. 28d ago Changed · +60 tokens per session feeee9335461
  6. 1mo ago Changed · +6 lines · +2,134 tokens per session 073dc46e36a7
  7. 1mo ago Changed · +3 lines · +1,223 tokens per session 39138c51c375
  8. 1mo ago Changed · +2 lines · +250 tokens per session fe8de375bfc1
  9. 1mo ago First seen · 272 lines · 5,098 tokens per session scan A 4b976d23a0fa

Subscribe to this mod's changes

open-ontologies CLAUDE.md is an instructions file published in the GitHub repository fabio-rovai/open-ontologies (1,383 stars, last pushed 2d ago), licensed MIT. It adds 9,916 tokens to every session, about $0.0397 per session on Opus 5.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-30.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,581 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 4,261 tokens