sparql-query-endpoint

Executes SPARQL 1.1 queries against remote endpoints using Comunica.

Updated May 12, 2026
One-click install
npx skills add https://github.com/angelo-v/pi-kit --skill sparql-query-endpoint-angelo-v
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: sparql-query-endpoint
Source: https://github.com/angelo-v/pi-kit/tree/main/packages/linked-data/skills/sparql-query-endpoint
Command: npx skills add https://github.com/angelo-v/pi-kit --skill sparql-query-endpoint-angelo-v

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Querying live knowledge graphs and triple-stores over HTTP requires correct SPARQL syntax, proper PREFIX declarations, and knowledge of the endpoint's structure. This Skill guides the AI through discovering, writing, and executing SPARQL 1.1 queries against any remote endpoint without manual tooling setup. ## Core Features & Use Cases - Remote Query Execution: Runs SELECT, ASK, CONSTRUCT, and DESCRIBE queries against any SPARQL protocol endpoint such as DBpedia or a corporate triple-store via Comunica. - Endpoint Exploration: Provides ready-made query patterns to discover classes, properties, and sample triples before writing deeper queries. - Flexible Output Formats: Returns results as tables, SPARQL JSON, CSV, or Turtle depending on the query type and downstream need. - Use Case: Ask the AI to list all classes used in DBpedia, then retrieve all properties of a specific resource, and export the results as CSV for analysis. ## Quick Start Query the DBpedia SPARQL endpoint to list all distinct classes and show the results as a table.

Frequently Asked Questions about sparql-query-endpoint

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

FAQPage Schema
How do I query a SPARQL endpoint like DBpedia?▼

Provide the endpoint URL (e.g. https://dbpedia.org/sparql) and a SPARQL query with all required PREFIX declarations. The sparql_query_endpoint tool executes the query via Comunica and returns results in your chosen format.

How to discover classes and properties in a knowledge graph?▼

Run SELECT DISTINCT ?class WHERE { ?s a ?class } to list classes, or SELECT ?p ?o WHERE { <resource> ?p ?o } for a resource's properties. These exploration patterns help you understand the endpoint structure before writing deeper queries.

What SPARQL query types does Comunica support?▼

Comunica supports all SPARQL 1.1 query forms: SELECT, ASK, CONSTRUCT, and DESCRIBE. SELECT and ASK return tabular or boolean results, while CONSTRUCT and DESCRIBE return RDF graphs typically serialized as Turtle.

What output formats are available for SPARQL query results?▼

Results can be returned as a human-readable table (default), machine-readable SPARQL JSON, CSV for spreadsheet export, or Turtle for CONSTRUCT and DESCRIBE graph output. Choose the format based on whether you need readability or downstream processing.

Why does my SPARQL query fail against a remote endpoint?▼

Common causes include missing PREFIX declarations, incorrect endpoint URLs, or endpoints that do not support certain query features. Always include all PREFIX declarations in the query string and confirm the endpoint URL before executing.