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 5,348 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 →

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 5,348 This file is loaded in full into every session.
When invoked 5,348 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.05348 $0.05348
Opus 5 $0.02674 $0.02674
Sonnet 5 $0.01070 $0.01070
Haiku 4.5 $0.00535 $0.00535

Measured 4d ago against content hash fe8de375bfc1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 4d 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 · 274 lines

How it starts

The opening of the file, as written. The whole thing — 274 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_reason with profile rdfs or owl-rl to materialize inferred triples (transitive subclass chains, domain/range propagation, equivalentClass expansion)
  3. Call onto_stats again to verify inferred triple counts are reasonable

Verify

  1. Call onto_lint to check for missing labels, comments, domains, ranges — fix any issues found
  2. Call onto_enforce with rule pack generic to check design pattern compliance — fix any violations
  3. Call onto_query with SPARQL to verify structure:
    • Are all expected classes present?
    • Do subclass hierarchies match the spec?
    • Can competency questions be answered?
  4. If a reference ontology exists, call onto_diff to compare

Iterate

  1. If any step above reveals problems, fix the Turtle and restart from step 3
  2. This loop continues until validation passes, stats match, lint is clean, enforce has no violations, and SPARQL queries return expected results

Persist

  1. Call onto_save to write the final ontology to a .ttl file
  2. Call onto_version to save a named snapshot for rollback — always version after save

Read the full file on GitHub · 274 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. 4d ago Changed · +2 lines · +250 tokens per session fe8de375bfc1
  2. 10d 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 (489 stars, last pushed 4d ago), licensed MIT. It adds 5,348 tokens to every session, about $0.0267 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-30.

Related

Other instructions, from other repositories

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,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

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 · 6,785 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, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 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,469 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 · 3,735 tokens