Neo4j Ontology Skillのロゴ

Neo4j Ontology Skill

組織
neo4j
neo4j-ontology-skill

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.

概要

公開者neo4j
リポジトリagent-skills
スキル名neo4j-ontology-skill
スター
127
フォーク
44
同梱ファイル
2
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 2個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    neo4jがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Neo4j Ontology Skill」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/neo4j/agent-skills/tree/main/neo4j-ontology-skill
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/neo4j/agent-skills.git /tmp/agent-skills
mkdir -p .claude/skills
cp -r /tmp/agent-skills/neo4j-ontology-skill .claude/skills/neo4j-ontology-skill
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでNeo4j Ontology Skillを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にNeo4j Ontology Skillを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Neo4j Ontology Skillは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

When to Use

  • Authoring an ontology document (Neo4j Ontology Graph Specification) from a domain description
  • Editing existing ontology YAML/JSON: nodes, relationships, properties, types, constraints, cardinality, extensions
  • Validating an ontology document against the spec schema

When NOT to Use

  • Cypher queries, or loading/applying an ontology into a database → neo4j-cypher-skill (ontology Cypher procedures do not exist yet — later work there)
  • Generic graph modeling advice (node vs property vs label, anti-patterns, supernodes) → neo4j-modeling-skill

Authoring Workflow

Step 1 — Gather domain intent

Identify what is being modeled: entity types (nodes), connections (relationships + direction), properties per element, identifying keys, mandatory fields, cardinality. If the domain or required shape is unclear, ask the user what is being modeled and which questions the ontology must answer. Do NOT guess a domain.

Step 2 — Draft the document

YAML or JSON per user preference; default YAML (more readable). Apply the Core Facts below. Load references/format-reference.md when anything beyond the minimal example is needed (full labels object, constraint objects, extensions, full data-type grammar).

Step 3 — Validate

bash
# 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}>

Exit 0 = valid · exit 1 = schema violations (one line per field path) · exit 2 = parse/read/fetch error. PEP 723 script — uv resolves deps (jsonschema, pyyaml) itself.

The validator fetches the schema live — nothing is vendored. Resolution order: --schema <path-or-url> (explicit, no fallback) → the document's own schema field when it is a URL → the published current alias → repo raw fallback (only when the published host is unreachable). The document's schema URL decides which version it validates against: set it to the published versioned URL of the version being authored (older versions validate against their published schema).

Step 4 — Fix and re-validate

Fix every reported error; re-run Step 3. Repeat until exit 0. Validation is MANDATORY — never present an ontology as done with a non-zero exit.


Core Facts

  • Required root fields: schema, id (unique ontology id string), version (STRING — user-defined revision label; quote it in YAML: version: "1"). Root rejects unknown fields (additionalProperties: false).
  • schema value: a published versioned URL. Root key is plain schema, NOT $schema.
    • New document: fetch https://neo4j.com/docs/ontology-graph-spec/current/schema.json, read its $id, write that versioned URL. Never write the /current/ alias (it moves).
    • Existing document: keep its schema URL; change only when the user asks to upgrade, then re-validate.
    • Version tagged on GitHub but /<version>/schema.json not 200 → unpublished; don't use it.
  • nodes / relationships are maps keyed by LOCAL IDS, not labels/types. Label lives in label or labels.identifier; relationship type lives in type. Endpoints reference node ids (from.node / to.node) — label renames never break references.
  • label: X is shorthand for labels: {identifier: X}. Use the full labels object only when implied or optional labels exist.
  • Type tokens come from the Neo4jType enum exactly — case-sensitive. Tokens incl. STRING, INTEGER, FLOAT, BOOLEAN, DATE, DURATION, POINT, UUID; temporal tokens contain a space (ZONED DATETIME, LOCAL TIME); parameterized tokens use angle brackets (LIST<STRING>, VECTOR<FLOAT32>). UUID and VECTOR<...> have no LIST arm. No unions, no nested lists. dimension (integer|null) sits on the property, paired with VECTOR types.
  • Constraints — two forms:
    • Flags on a property: key: true, unique: true, must_exist: true (snake_case — NOT mustExist). Single-property shorthands; key = unique + exists per Neo4j key-constraint semantics.
    • Object form: constraints is a MAP id → constraint object {type: EXISTS|KEY|PROPERTY_TYPE|UNIQUE, properties: [p1, ...], name: optional} — required for composites (≥ 2 properties) and nameable constraints. properties must name properties declared on the SAME element.
  • Endpoint cardinality: count exact, or min_count/max_count ranged; absent = unconstrained (0..*).
  • Extensions: fixed extensions shape per element — node: indexes/display/custom; relationship: indexes/custom; root: data_source_tables/data_source_mappings/custom; labels/property/constraint/index: custom only. Unknown extension keys rejected. custom is free-form — arbitrary owner data, never validated by the spec schema.
  • Absent means none — never write empty maps/lists (properties: {}, aliases: [], custom: {}); omit them.

Minimal Example

library.ontology.yaml — 2 nodes, 1 relationship:

yaml
schema: "https://neo4j.com/docs/ontology-graph-spec/1.1.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 }

Validates exit 0 via scripts/validate.py. schema URL = newest published on 2026-11-02; apply the schema rule above rather than copying it. Full YAML+JSON worked examples in references/format-reference.md.


References

Load on demand:

  • references/format-reference.md — full field reference: every node/relationship/property/endpoint field, labels object, constraint objects, extension shapes, data-type grammar, gotchas, YAML+JSON examples
  • Published schema base: https://neo4j.com/docs/ontology-graph-spec/ — immutable /<version>/schema.json per spec version, moving alias /current/schema.json

Spec Status

Published: the ONT-31 URLs above are live and are the canonical schema source. If the published host is unreachable, the validator falls back to the raw schema from neo4j/ontology-graph-spec main (moving). Ontology Cypher procedures do not exist yet; applying an ontology to a database is out of scope here.


Checklist

  • Root fields schema, id, version present; version a quoted string; schema = published versioned URL (new document: $id of /current/schema.json; never /current/) under plain schema key
  • No unknown root fields; no $schema
  • nodes/relationships keyed by local ids; relationship from/to reference node ids
  • Every node has label or labels.identifier
  • Type tokens exact from the Neo4jType enum (case-sensitive; spaced temporal tokens); dimension on the property with VECTOR types
  • Flags only for single-property constraints; object form (type ∈ EXISTS/KEY/PROPERTY_TYPE/UNIQUE) for composites/named; constraint properties exist on the same element
  • Extension keys match the element's fixed shape; arbitrary data only under custom
  • No empty maps/lists written
  • uv run scripts/validate.py <file> exits 0 (every reported error fixed and re-validated)

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Neo4j Ontology Skill」では何ができますか?

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.

TypingMindでNeo4j Ontology Skillを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Neo4j Ontology Skillはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにNeo4j Ontology Skillをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/neo4j/agent-skills/tree/main/neo4j-ontology-skillを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Neo4j Ontology Skillを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Neo4j Ontology Skillで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもNeo4j Ontology Skillを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Neo4j Ontology Skill」は無料ですか?

はい。neo4jがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇