Knowledge Graph - Kg Schema From Text
/install kg-schema-from-text
Knowledge Graph Schema Generation from Text
Automatically derive structured graph schemas from natural language documentation and domain descriptions.
This skill converts textual descriptions into machine-readable graph models with entities, relationships, properties, and constraints.
Quick Start
Use When
- Converting domain documentation → ontology
- Bootstrapping a knowledge graph schema
- Designing initial RDF/OWL or Neo4j schemas
- Extracting schema from requirements or API docs
Inputs
- Natural language domain descriptions
- Technical documentation
- Example records or datasets
- JSON/CSV structures
Outputs
- Entity types (nodes/classes)
- Relationship types (edges/predicates)
- Properties & attributes
- Graph schema representation (Property Graph or RDF)
Example
Input:
A university contains students, professors, courses, and departments.
Students enroll in courses. Professors teach courses.
Departments manage both courses and professors.
Output:
Entities: Student, Professor, Course, Department
Relationships:
- Student -> ENROLLED_IN -> Course
- Professor -> TEACHES -> Course
- Department -> MANAGES -> Course
- Department -> MANAGES -> Professor
Properties:
- Student: id, name, email, enrollment_date
- Course: id, title, credits, department
- Professor: id, name, department, specialization
- Department: id, name, budget
Execution Steps
- Extract Entities – Identify nouns/concepts from text
- Extract Relationships – Identify verbs/connections
- Extract Properties – Identify attributes and constraints
- Infer Structure – Build graph patterns
- Generate Schema – Output in target format (Property Graph or RDF)
Schema Formats
Property Graph (Neo4j, TigerGraph)
Nodes: Student, Professor, Course, Department
Relationships: ENROLLED_IN, TEACHES, MANAGES
Properties: Names, IDs, dates, descriptions
RDF/OWL (Semantic Web)
Classes: Student, Professor, Course, Department
Properties: enrolledIn, teaches, manages
Attributes: name, id, description
Recommended Libraries
- NLP: spaCy, transformers, nltk
- Graph: networkx, rdflib, pyvis, owlready2
- Schema: pydantic, dataclasses, jsonschema
Best Practices
✓ Use clear, consistent entity names (PascalCase)
✓ Normalize relationship directions
✓ Extract domain-specific constraints
✓ Separate schema from instance data
✓ Follow knowledge graph modeling standards
References
See extraction-patterns.md for entity/relationship extraction guidelines and example-schemas.md for domain examples.
Version: 1.0.0
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install kg-schema-from-text - After installation, invoke the skill by name or use
/kg-schema-from-text - Provide required inputs per the skill's parameter spec and get structured output
What is Knowledge Graph - Kg Schema From Text?
Generate a structured knowledge graph ontology or schema from unstructured or semi-structured text sources. It is an AI Agent Skill for Claude Code / OpenClaw, with 39 downloads so far.
How do I install Knowledge Graph - Kg Schema From Text?
Run "/install kg-schema-from-text" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Knowledge Graph - Kg Schema From Text free?
Yes, Knowledge Graph - Kg Schema From Text is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Knowledge Graph - Kg Schema From Text support?
Knowledge Graph - Kg Schema From Text is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Knowledge Graph - Kg Schema From Text?
It is built and maintained by Muhammad Asif (@fisa712); the current version is v1.0.0.