Loading...
Loading...
Author and validate Neo4j Ontology Graph Specification (ontology graph spec) documents. Use when writing or editing an ontology, defining nodes and relationships with properties, Neo4jType data types, constraints (key/unique/must_exist), labels, and endpoint cardinality, in YAML or JSON, or validating an ontology document against the live-resolved spec schema. Does NOT handle Cypher or loading an ontology into a database — use neo4j-cypher-skill. Does NOT cover generic graph data modeling advice — use neo4j-modeling-skill.
npx skill4agent add neo4j-contrib/neo4j-skills neo4j-ontology-skillneo4j-cypher-skillneo4j-modeling-skilllabels# From the skill directory:
uv run scripts/validate.py <document.{yaml,yml,json}>
# From the repo root:
uv run neo4j-ontology-skill/scripts/validate.py <document.{yaml,yml,json}>uv--schema <path-or-url>schemacurrentschemaschemaidversionversion: "1"additionalProperties: falseschemahttps://neo4j.com/docs/ontology-graph-spec/1.0.0/schema.jsonschema$schemanodesrelationshipslabellabels.identifiertypefrom.nodeto.nodelabel: Xlabels: {identifier: X}labelsimpliedoptionalSTRINGINTEGERFLOATBOOLEANDATEDURATIONPOINTUUIDZONED DATETIMELOCAL TIMELIST<STRING>VECTOR<FLOAT32>UUIDVECTOR<...>dimensionkey: trueunique: truemust_exist: truemustExistkeyconstraints{type: EXISTS|KEY|PROPERTY_TYPE|UNIQUE, properties: [p1, ...], name: optional}propertiescountmin_countmax_countextensionsindexesdisplaycustomindexescustomtablesmappingscustomcustomcustomproperties: {}aliases: []custom: {}library.ontology.yamlschema: "https://neo4j.com/docs/ontology-graph-spec/1.0.0/schema.json"
id: library
version: "1"
name: Library
nodes:
author:
label: Author
properties:
id: { type: STRING, key: true }
name: { type: STRING, must_exist: true }
book:
label: Book
properties:
isbn: { type: STRING, key: true }
relationships:
wrote:
type: WROTE
from: { node: author, max_count: 1 }
to: { node: book }scripts/validate.pylabelshttps://neo4j.com/docs/ontology-graph-spec//<version>/schema.json/current/schema.jsonneo4j/ontology-graph-specschemaidversionversionschemaschema$schemanodesrelationshipsfromtolabellabels.identifierdimensiontypepropertiescustomuv run scripts/validate.py <file>