rdf-wrapper

rdf-wrapper is a skill for Claude Code from sparq-org/sparq. It costs 116 tokens per session (4,367 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 — 55 skills, 20 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 55 skills, 20 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 116 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,367 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.00116 $0.04367
Opus 5 $0.00058 $0.02184
Sonnet 5 $0.00023 $0.00873
Haiku 4.5 $0.00012 $0.00437

Measured 8d ago against content hash f2fa21b72455, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, 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 8d 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 · 372 lines

How it starts

The opening of the file, as written. The whole thing — 372 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:

[dependencies]
sparq-core = "0.1"
sparq-wrapper = "0.1"
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 raw graph until a scoped-dataset surface lands.

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 = { version = "0.1", 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",
] }

The async events, async node, and graph-scope events features currently expose reserved, empty modules; enabling them adds no API. Every other proposal feature is implemented. proposed-distinct is exposed as inherent Dataset methods in the crate root rather than through a proposed:: module. See the per-feature proposal status pages for the implemented and reserved 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.

Whether a dropped traversal also stops in-flight remote work is the backend's half of the contract: AsyncStoreBackend requires an implementation to start no I/O before the stream or future it returned is first polled, and to abandon that work on drop. Honour it and a partially consumed remote result set is abandoned rather than drained; a backend that instead spawns the request eagerly keeps it running, because the wrapper holds no handle to it.

Read the full file on GitHub · 372 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. 8d 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 (12 stars, last pushed today), licensed MIT. It adds 116 tokens to every session and 4,367 once invoked, about $0.0006 per session on Opus 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.

Related

Other skills, from other repositories