linked-data-fetch

Dereferences Linked Data URIs and follows owl:sameAs and rdfs:seeAlso links.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Resolving Linked Data URIs manually with curl requires handling content negotiation, RDF parsing, and graph storage yourself. This Skill directs the agent to use ld_fetch, which handles all of that automatically and tells you how to query the resulting graph. ## Core Features & Use Cases - URI Dereferencing: Fetches vocabulary terms, FOAF profiles, schema.org types, and Wikidata entities via ld_fetch with automatic content negotiation and parsing. - Hash URI Handling: Correctly resolves fragment URIs (e.g. skos/core#Concept) by fetching the document URI and storing the graph under it. - Link Following: Expands the graph by following owl:sameAs and rdfs:seeAlso links discovered in fetched data. - Use Case: A user asks to look up the FOAF Person term; the agent fetches the vocabulary, queries its graph with SPARQL, and follows seeAlso links to related resources. ## Quick Start Look up the URI http://xmlns.com/foaf/0.1/Person and follow any related links to expand the graph.

Frequently Asked Questions about linked-data-fetch

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

FAQPage Schema
How do I dereference a Linked Data URI?▼

Use ld_fetch instead of curl, since it handles content negotiation, RDF parsing, and graph storage automatically. The response also indicates how to query the resulting graph with SPARQL.

How do I follow owl:sameAs and rdfs:seeAlso links in RDF data?▼

Query the fetched graph with SPARQL to find owl:sameAs and rdfs:seeAlso values, then call ld_fetch again on those URIs. This expands the graph with related Linked Data resources.

Why does my SPARQL query return nothing for a hash URI?▼

For URIs with fragments like skos/core#Concept, ld_fetch stores the graph under the document URI before the hash, not the full URI. Use the document URI in the GRAPH clause of your query.

Can I save fetched RDF data to a local Turtle file?▼

Yes, use rdf_write after fetching to save the graph as a local .ttl file. This is useful when you need a persistent copy of the dereferenced Linked Data.

Should I use curl or ld_fetch for Linked Data requests?▼

Use ld_fetch rather than bash with curl. ld_fetch performs content negotiation and parsing automatically and stores the graph in a queryable form, which raw curl requests do not provide.