libgraph

Index RDF triples for fast pattern-based queries in knowledge graphs.

1|1|Updated Aug 7, 2025
One-click install
npx skills add https://github.com/copilot-ld/copilot-ld --skill libgraph
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: libgraph
Source: https://github.com/copilot-ld/copilot-ld/tree/main/packages/libgraph
Command: npx skills add https://github.com/copilot-ld/copilot-ld --skill libgraph

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Efficiently storing, indexing, and querying RDF triples for knowledge graphs, with automatic ontology-aware shape generation for validation and discovery.

Core Features & Use Cases

  • GraphIndex for RDF triple storage and fast pattern-based queries
  • OntologyProcessor and ShaclSerializer to derive SHACL shapes from observed data
  • Lazy-loading, storage-backed graphs suitable for large knowledge bases

Quick Start

Create a GraphIndex with a storage backend, load resources, and run a sample query to retrieve matching subjects.

Frequently Asked Questions about libgraph

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I index RDF triples for fast retrieval in a knowledge graph?

To index RDF triples for fast retrieval, you can use a GraphIndex backed by a storage backend. This enables efficient subject-predicate-object pattern queries across large ontology-rich datasets using the N3 library.

Can I automatically generate SHACL shapes from existing RDF data?

Yes, you can automatically generate SHACL shapes from existing RDF data using the OntologyProcessor and ShaclSerializer components. They derive validation shapes directly from observed data patterns within your knowledge graphs.

What is the best way to query large RDF datasets without loading everything into memory?

The best way to query large RDF datasets without loading everything into memory is using lazy-loading, storage-backed graphs. This approach indexes RDF triples on disk, enabling fast pattern-based queries on large knowledge bases.

Does this RDF indexing approach work with ontology-rich linked data?

Yes, this RDF indexing approach works effectively with ontology-rich linked data. It applies across datasets requiring complex subject-predicate-object pattern queries and maintains SHACL-based validation for data discovery.

Do I need a separate storage backend to query RDF graphs?

Yes, you need a separate storage backend to create a GraphIndex for RDF triple storage. The storage backend persists the indexed triples, enabling lazy-loading and fast pattern-based queries across your knowledge base.