← Catalog

@aveltens/pi-kit-linked-data

Pi Coding Agent skills and extensions to work with RDF, SPARQL and other Linked Data technologies

Package

Install

Install with PiG

pig install npm:@aveltens/pi-kit-linked-data

Install with Pi

pi install npm:@aveltens/pi-kit-linked-data
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "skills": [
    "skills/"
  ],
  "extensions": [
    "extensions/"
  ]
}

README

Written by the package's publisher, shown as published in version 0.10.3 (README.md). PiG does not review it.

@aveltens/pi-kit-linked-data

Pi Coding Agent skills and extensions to work with RDF, SPARQL, and other Linked Data technologies.

Adds tools and matching skills to the Pi Coding Agent:

ToolWhat it does
sparql_query_filesRun SPARQL 1.1 queries against local RDF/Turtle files
sparql_query_endpointQuery any remote SPARQL endpoint by URL
sparql_query_wikidataQuery the Wikidata Knowledge Graph for real-world facts

Two discovery tools are also included: discover_rdf_files and discover_sparql_queries.

Quick Start

Install

pi install npm:@aveltens/pi-kit-linked-data

To try the package without installing it permanently:

pi -e npm:@aveltens/pi-kit-linked-data

To install per-project (shared with your team via .pi/settings.json):

pi install -l npm:@aveltens/pi-kit-linked-data

Query local RDF files

Put some Turtle files in your workspace, then ask Pi in plain English:

"What classes are defined in my ontology?" "List all SKOS concepts with their labels." "Find all resources of type schema:Person."

Pi will run discover_rdf_files to locate the files and sparql_query_files to query them.

Query a remote SPARQL endpoint

"Query DBpedia for population of Germany." "List the classes available at https://example.org/sparql."

Pi uses sparql_query_endpoint and handles PREFIX declarations automatically.

Query Wikidata

"Who were the presidents of France in the 20th century?" "What is the capital of Japan?" "List all Nobel Prize winners in Physics since 2010."

Pi uses sparql_query_wikidata, which pre-injects all standard Wikidata prefixes (wd:, wdt:, wikibase:, etc.) — no declarations needed.

What's Included

Tools

ToolDescription
sparql_query_filesExecutes SPARQL 1.1 (SELECT/ASK/CONSTRUCT/DESCRIBE) against local .ttl, .rdf, .n3, .jsonld, .trig, .nq, .nt files using Comunica
sparql_query_endpointExecutes SPARQL 1.1 against any remote endpoint over HTTP
sparql_query_wikidataExecutes SPARQL 1.1 against the Wikidata Query Service with standard prefixes pre-injected
discover_rdf_filesFinds all RDF data files in the workspace
discover_sparql_queriesFinds all .rq / .sparql query files in the workspace

Commands

CommandDescription
/rdf-memory-explorerStarts a local HTTP server and prints the URL in the chat — open it in any browser to browse stores and run SPARQL queries visually. Works in containers and remote environments.

Skills

Skills guide Pi on when and how to use the tools:

  • sparql-query-files — semantic graph traversal, class/property discovery, reusing existing .rq files
  • sparql-query-endpoint — endpoint exploration, output format selection, PREFIX declarations
  • sparql-query-wikidata — entity/property model, label service patterns, multi-hop traversal

CLI Tools

The package ships two command-line tools you can run directly from your project.

Add convenience scripts to your package.json:

{
  "query": "cd .pi/npm && npx pi-kit-query",
  "validate": "cd .pi/npm && npx pi-kit-validate"
}

Then use them like:

npm run query
npm run validate

Requirements