rdf-wrapper

rdf-wrapper is a skill for Claude Code from sparq-org/sparq. It costs 130 tokens per session (5,579 once invoked), scanned A, original, MIT.

A Rust wrapper that lets programs navigate RDF graphs as typed objects and iterators. It can follow outgoing or incoming relationships and convert literal values such as numbers and booleans.

In plain words
What is it for?
Use it to follow predicates, read related nodes and values, access datasets, and mutate owned RDF stores.
Why use it?
It provides a more object-like way to traverse graph data than manually handling every RDF term and relationship. Owned stores can also be changed through the wrapper.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the sparq plugin — 54 skills, 11 agents, 2 hooks shipped together

Good fit Use it to follow predicates, read related nodes and values, access datasets, and mutate owned RDF stores.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sparq-org/sparq/rdf-wrapper
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add sparq-org/sparq --skill rdf-wrapper
Clone the repo
git clone --depth 1 https://github.com/sparq-org/sparq

Made for: Claude Code.

Or install sparq, the plugin that ships this one along with the rest of its 54 skills, 11 agents, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rdf-wrapper

README.md
[![agentmods](https://agentmods.dev/badge/skills/sparq-org/sparq/rdf-wrapper/github.svg)](https://agentmods.dev/skills/sparq-org/sparq/rdf-wrapper)
Your own site
<a href="https://agentmods.dev/skills/sparq-org/sparq/rdf-wrapper"><img src="https://agentmods.dev/badge/skills/sparq-org/sparq/rdf-wrapper/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rdf-wrapper

Your own site · 80×15
<a href="https://agentmods.dev/skills/sparq-org/sparq/rdf-wrapper"><img src="https://agentmods.dev/badge/skills/sparq-org/sparq/rdf-wrapper.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 130 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,579 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Prompt Injection · line 90
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00130 $0.05579
Opus 5.5 $0.00052 $0.02232
Sonnet 5.5 $0.00026 $0.01116
Haiku 4.5 $0.00013 $0.00558

Measured 18d ago against content hash 12e96053fe36, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rdf-wrapper scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 18d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/rdf-wrapper/SKILL.md · 457 lines

How it starts

The opening of the file, as written. The whole thing — 457 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Use sparq-wrapper

Add the opt-in crate explicitly. It is publish = false (not on crates.io), so take it and sparq-core from the same git source to share one Graph type:

[dependencies]
sparq-core = { git = "https://github.com/sparq-org/sparq" }
sparq-wrapper = { git = "https://github.com/sparq-org/sparq" }
oxrdf = "0.3"

Load a graph, borrow it, and traverse with typed predicates:

use oxrdf::NamedNode;
use sparq_core::Graph;
use sparq_wrapper::Store;

let graph = Graph::load_str(
    "@prefix ex: <http://example.org/> . ex:alice ex:knows ex:bob . ex:bob ex:age 42 .",
    "turtle",
)?;
let store = Store::borrowed(&graph);
let alice = NamedNode::new("http://example.org/alice")?;
let knows = NamedNode::new("http://example.org/knows")?;
let age = NamedNode::new("http://example.org/age")?;

let bob = store.node(alice).out(&knows).next().expect("friend");
assert_eq!(bob.out(&age).next().expect("age").as_i64()?, 42);
# Ok::<(), Box<dyn std::error::Error>>(())

.out() and .r#in() return NodeSet, an ExactSizeIterator<Item = Node>; the raw identifier is Rust's required spelling for a method named in. Call .values() on a traversal to yield owned oxrdf::Terms. An absent focus or predicate is valid and yields an empty iterator. Node::dataset() exposes a borrowed dataset wrapper; .graph() is the raw sparq_core::Graph escape hatch.

Choose ownership deliberately:

  • Store::borrowed(&graph) is read-only and tied to the graph's lifetime.
  • Store::owned(graph) and Store::new() own the graph and allow insert/remove. Nodes borrow the store, so stop using them before a write and reacquire them afterwards.
  • Traversal addresses the default graph in M1. Reach named graphs through the opt-in proposed-graph-scope GraphScope (below) or the raw graph.

Typed accessors are strict:

  • as_str() accepts xsd:string and rdf:langString.
  • as_i64() accepts the XML Schema integer family, enforces every derived datatype's exact bounds (byte through unsignedLong), then checks that the value is representable as i64.
  • as_bool() accepts only xsd:boolean, including true/false/1/0.
  • as_typed_literal() returns lexical form, datatype, and language.

All return Result<_, AccessError>; do not silently coerce a mismatched RDF datatype.

Eleven explicitly experimental, default-off features track proposals that remain unlanded in rdfjs/wrapper:

sparq-wrapper = { git = "https://github.com/sparq-org/sparq", features = [
  "proposed-async-events",
  "proposed-async-node",
  "proposed-async-store",
  "proposed-cardinality",
  "proposed-codecs",
  "proposed-distinct",
  "proposed-graph-scope",
  "proposed-graph-scope-events",
  "proposed-json",
  "proposed-observe",
  "proposed-typed-focus",
] }

Every proposal feature is implemented. proposed-distinct is exposed as inherent Dataset methods in the crate root rather than through a proposed:: module. The async node and async events features imply proposed-async-store; graph-scope events implies proposed-graph-scope; the event features reuse proposed-observe's ChangeEvent / SubscriptionId. See the per-feature proposal status pages for the feature inventory.

proposed-async-store adds sparq_wrapper::proposed::async_store — the wrapper shape over a store whose reads are not synchronous (an HTTP endpoint, a Solid pod, an out-of-core on-disk index), based on rdfjs/wrapper issue #10 and draft PR #97. Implement AsyncStoreBackend for the backend, then use AsyncStore exactly like Store.

AsyncNode::out / AsyncNode::r#in return a NodeStream that wraps each term into an AsyncNode as it arrives: the first node is observable before the backend finishes producing, and there is deliberately no collect. Building a stream polls nothing; dropping one drops the backend stream, so the wrapper never polls or drains it again. NodeStream::next is cancellation-safe — the wrapper buffers nothing of its own.

Read the full file on GitHub · 457 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 18d ago Changed · +2 lines 12e96053fe36
  2. 21d ago Changed · +83 lines · +14 tokens per session e532ebdacb3a
  3. 1mo ago First seen · 372 lines · 116 tokens per session scan A f2fa21b72455

Subscribe to this mod's changes

rdf-wrapper is a skill published in the GitHub repository sparq-org/sparq (13 stars, last pushed today), licensed MIT. It adds 130 tokens to every session and 5,579 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.