ontology

GitHub

用于管理本体模式、概念、对齐及SHACL/OWL验证的技能,支持从文本或数据构建本体、一致性检查和质量评估。

plugins/skills/ontology/SKILL.md semantica-agi/semantica

Trigger Scenarios

本体定义和验证 SKOS概念列表查询 本体一致性检查 从文本生成本体

Install

npx skills add semantica-agi/semantica --skill ontology -g -y
More Options

Non-standard path

npx skills add https://github.com/semantica-agi/semantica/tree/main/plugins/skills/ontology -g -y

Use without installing

npx skills use semantica-agi/semantica@ontology

指定 Agent (Claude Code)

npx skills add semantica-agi/semantica --skill ontology -a claude-code -g -y

安装 repo 全部 skill

npx skills add semantica-agi/semantica --all -g -y

预览 repo 内 skill

npx skills add semantica-agi/semantica --list

SKILL.md

Frontmatter
{
    "name": "ontology",
    "description": "Manage ontology schemas, concepts, alignments, and SHACL\/OWL validation for Semantica knowledge graphs. Uses OntologyEngine and OntologyValidator."
}

/semantica:ontology

Manage ontology definitions and validation. Usage: /semantica:ontology <task> [args]

Entry points: OntologyEngine (authoring, export, alignments) and OntologyValidator (consistency checking).


concepts <scheme_uri>

List SKOS concepts in a vocabulary scheme.

from semantica.ontology import OntologyEngine
from semantica.triplet_store import TripletStore

store = TripletStore(backend="oxigraph")   # needs semantica[tripletstore-oxigraph]
engine = OntologyEngine(store=store)       # list_concepts/list_vocabularies need a
                                            # configured store — raises ProcessingError without one
concepts = engine.list_concepts(scheme_uri)
vocabs = engine.list_vocabularies()

validate <ontology>

Check an ontology for consistency and satisfiability.

from semantica.ontology import OntologyValidator

validator = OntologyValidator(check_consistency=True, check_satisfiability=True)
result = validator.validate(ontology)   # dict or path to an ontology file
# result.valid, result.errors, result.warnings

For SHACL shape validation of instance data use SHACLGenerator / SHACLValidationReport:

from semantica.ontology import SHACLGenerator

build <text|data>

Generate an ontology from unstructured text or structured records.

engine = OntologyEngine()
onto = engine.from_text(text)          # LLM-assisted (needs an llm-* extra + API key)
onto = engine.from_data(records)       # deterministic, from structured data

export <ontology> <path> [--format turtle]

engine.export_owl(onto, path, format="turtle")
engine.export_shacl(onto, path, format="turtle")

align <source_uri> <target_uri> <predicate>

engine.create_alignment(source_uri, target_uri, predicate)
engine.get_alignments(entity_uri)
engine.list_alignments()

evaluate <ontology>

Quality-gate an ontology (OntologyEvaluator / OntologyQualityReport under the hood).

report = engine.evaluate(onto)

Version History

  • fdf3fd8 Current 2026-09-22 03:21

    修复了API调用错误:修正了OntologyEngine需配置TripletStore、ValidationResult字段名变更、路径展开问题及QueryEngine适配等7处由自动化审查发现的Bug。

  • 9094f1e 2026-07-05 09:26

Same Skill Collection

.claude/skills/semantica/SKILL.md
plugins/skills/causal/SKILL.md
plugins/skills/change/SKILL.md
plugins/skills/decision/SKILL.md
plugins/skills/deduplicate/SKILL.md
plugins/skills/explain/SKILL.md
plugins/skills/export/SKILL.md
plugins/skills/extract/SKILL.md
plugins/skills/ingest/SKILL.md
plugins/skills/policy/SKILL.md
plugins/skills/provenance/SKILL.md
plugins/skills/query/SKILL.md

Metadata

Files
0
Version
7918f71
Hash
b6dceddb
Indexed
2026-07-05 09:26

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-28 01:06
浙ICP备14020137号-1