← 返回 Skills 市场
fisa712

Knowledge Graph - Graph Schema Validation

作者 Muhammad Asif · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
39
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install graph-schema-validation
功能描述
Validate knowledge graph schemas and data against defined ontology, RDF/OWL, or property graph schema constraints.
使用说明 (SKILL.md)

Graph Schema Validation

Validate knowledge graph schemas and data against defined constraints.

This skill ensures graph data conforms to schema definitions, ontology rules, and consistency requirements.

Quick Start

Use When

  • Validating graph data before ingestion
  • Testing schema correctness
  • Enforcing ontology constraints
  • Checking graph consistency
  • Verifying RDF/OWL compliance
  • Validating property graph models

Inputs

  • RDF datasets (Turtle, RDF/XML)
  • OWL ontologies
  • Property graph schemas
  • Cypher structures
  • Graph data files
  • Graph exports

Outputs

  • Validation report
  • Detected violations
  • Suggested corrections
  • Conformance status
  • Constraint violations

Example

Input Schema:

Student: student_id (UNIQUE), name, email
Course: course_code (UNIQUE), title, credits
Relationship: (Student)-[:ENROLLED_IN]->(Course)

Input Data:

(Student {name: "Alice"})              # INVALID: missing student_id
(Student {student_id: "S001", name: "Bob"})-[:ENROLLED_IN]->(Course)  # OK

Validation Report:

Violations: 1
- Node S002: Missing required property student_id
- Suggestion: Add student_id to Student node

Validation Types

1. Schema Conformance

  • Node labels match schema classes
  • Relationships follow schema rules
  • Property types are valid

2. Property Validation

  • Required properties present
  • Data types correct
  • Property names consistent

3. Relationship Validation

  • Relationships follow schema rules
  • Direction correct
  • Source/target types valid

4. Cardinality Constraints

  • Minimum/maximum occurrences
  • Uniqueness constraints
  • Collection sizes

5. Graph Integrity

  • No orphan nodes
  • No broken references
  • No duplicate identifiers
  • Consistent relationships

Schema Formats

RDF/OWL (SHACL Shapes)

:StudentShape a sh:NodeShape ;
  sh:targetClass :Student ;
  sh:property [
    sh:path :student_id ;
    sh:datatype xsd:string ;
    sh:minCount 1
  ] .

Property Graph (Cypher Constraints)

CREATE CONSTRAINT student_id_unique ON (s:Student) REQUIRE s.student_id IS UNIQUE
CREATE INDEX ON (s:Student)(name)

Execution Steps

  1. Load Schema – Load ontology, SHACL shapes, or schema definition
  2. Load Data – Load graph data to validate
  3. Define Rules – Specify validation constraints
  4. Execute Validation – Check data against rules
  5. Generate Report – Produce validation results
  6. Suggest Fixes – Recommend corrections

Recommended Libraries

  • RDF/OWL: rdflib, pyshacl, owlready2
  • Property Graph: neo4j, py2neo, networkx
  • Data Validation: pydantic, jsonschema
  • Graph Analysis: networkx

Best Practices

✓ Validate before production deployment
✓ Enforce constraints at database level
✓ Use consistent property naming
✓ Define validation rules early
✓ Maintain validation tests
✓ Document constraint rules
✓ Review violation reports carefully

References

See validation-patterns.md for validation strategies and example-validations.md for domain validation examples.


Version: 1.0.0

安全使用建议
This appears safe to install for local graph-schema validation. Review any example remediation queries before applying them to a real database, because the skill can suggest fixes such as merging, removing, or updating graph records, but the package itself does not perform those actions automatically.
能力评估
Purpose & Capability
The stated purpose is validating knowledge graph schemas and data, and the artifacts match that purpose: markdown guidance plus a Python SchemaValidator that checks in-memory node dictionaries for required properties, uniqueness, enum values, cardinality, and reports violations.
Instruction Scope
Instructions are scoped to user-directed validation workflows and examples. Remediation language such as merging or deleting duplicate graph records is presented as validation guidance, not automatic execution.
Install Mechanism
No package manager hooks, install scripts, dependency declarations, or automatic setup behavior were present. Recommended third-party libraries are mentioned only as documentation.
Credentials
The included script imports only standard-library modules and has no file reads or writes, network calls, subprocess execution, environment access, credential use, or database connection logic.
Persistence & Privilege
No persistence, background workers, startup hooks, privilege escalation, profile/session access, or long-running agent behavior was found.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install graph-schema-validation
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /graph-schema-validation 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of Graph Schema Validation skill. - Validates knowledge graph schemas and data against ontology, RDF/OWL, and property graph schema constraints. - Supports input formats including RDF datasets, OWL ontologies, property graph schemas, and Cypher structures. - Outputs validation reports with detected violations, suggested corrections, and conformance status. - Provides validation of schema structure, property requirements, relationships, cardinality, and overall graph integrity. - Includes quick start guidance, example usage, and recommended libraries for common graph technologies.
元数据
Slug graph-schema-validation
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Knowledge Graph - Graph Schema Validation 是什么?

Validate knowledge graph schemas and data against defined ontology, RDF/OWL, or property graph schema constraints. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 39 次。

如何安装 Knowledge Graph - Graph Schema Validation?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install graph-schema-validation」即可一键安装,无需额外配置。

Knowledge Graph - Graph Schema Validation 是免费的吗?

是的,Knowledge Graph - Graph Schema Validation 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Knowledge Graph - Graph Schema Validation 支持哪些平台?

Knowledge Graph - Graph Schema Validation 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Knowledge Graph - Graph Schema Validation?

由 Muhammad Asif(@fisa712)开发并维护,当前版本 v1.0.0。

💬 留言讨论