kg-modality-sparql

kg-modality-sparql is a skill for Claude Code, Codex from Knuckles-Team/epistemic-graph. It costs 114 tokens per session (843 once invoked), scanned A, original, MIT.

A SPARQL 1.1 connection layer for the engine’s RDF/OWL store. SPARQL is a query language and web protocol for linked facts, and RDF represents information as connected subject–predicate–object statements.

In plain words
What is it for?
It helps select, check, construct, and describe graph data; update triples and named graphs; follow property paths; validate data; and connect queries to other services.
Why use it?
It lets existing RDF tools and libraries query or update the engine through a standard HTTP endpoint instead of requiring a custom interface.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It helps select, check, construct, and describe graph data; update triples and named graphs; follow property paths; validate data; and connect queries to other services.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/knuckles-team/epistemic-graph/kg-modality-sparql
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 Knuckles-Team/epistemic-graph --skill kg-modality-sparql
Clone the repo
git clone --depth 1 https://github.com/Knuckles-Team/epistemic-graph

Made for: Claude Code, Codex.

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 kg-modality-sparql

README.md
[![agentmods](https://agentmods.dev/badge/skills/knuckles-team/epistemic-graph/kg-modality-sparql/github.svg)](https://agentmods.dev/skills/knuckles-team/epistemic-graph/kg-modality-sparql)
Your own site
<a href="https://agentmods.dev/skills/knuckles-team/epistemic-graph/kg-modality-sparql"><img src="https://agentmods.dev/badge/skills/knuckles-team/epistemic-graph/kg-modality-sparql/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 kg-modality-sparql

Your own site · 80×15
<a href="https://agentmods.dev/skills/knuckles-team/epistemic-graph/kg-modality-sparql"><img src="https://agentmods.dev/badge/skills/knuckles-team/epistemic-graph/kg-modality-sparql.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 114 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 843 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
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.00114 $0.00843
Opus 5 $0.00057 $0.00421
Sonnet 5 $0.00023 $0.00169
Haiku 4.5 $0.00011 $0.00084

Measured 11d ago against content hash 2ad4e4063fd3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

kg-modality-sparql scanned grade A with 1 finding 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 11d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s 'http://127.0.0.1:7878/sparql' \
epistemic_graph/skills/kg-modality-sparql/SKILL.md · 61 lines

How it starts

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

kg-modality-sparql — RDF/SPARQL over the engine wire

The engine is a first-class SPARQL 1.1 endpoint (eg-rdf crate). It serves the full query matrix — SELECT/ASK/CONSTRUCT/DESCRIBE, BGP + property paths, OPTIONAL/UNION/MINUS, aggregates, sub-SELECT, VALUES, true named graphs (FROM/FROM NAMED/GRAPH ?g), SPARQL 1.1 UPDATE (INSERT/DELETE DATA, DELETE/INSERT WHERE, CREATE/DROP GRAPH), SHACL/ShEx validation and SERVICE federation. RDF-star and the JSON-LD/TriG/N-Quads/RDF-XML serialization matrix are supported. See docs/capabilities.mdSPARQL (eg-rdf).

The wire way (epistemic-graph owns it)

The /sparql HTTP listener (feature sparql-http) is opt-in: build with sparql-http and set EPISTEMIC_GRAPH_SPARQL_ADDR (--sparql-addr, default 127.0.0.1:7878). Any existing SPARQL client then works unchanged (W3C SPARQL 1.1 Protocol, GET + POST):

# query
curl -s 'http://127.0.0.1:7878/sparql' \
  --data-urlencode 'query=SELECT ?s ?p ?o WHERE { ?s ?p ?o } LIMIT 5'
# update
curl -s 'http://127.0.0.1:7878/sparql' \
  --data-urlencode 'update=INSERT DATA { <urn:a> <urn:knows> <urn:b> }'

Content negotiation returns SPARQL-results JSON/XML/CSV/TSV (or Turtle/N-Triples for CONSTRUCT/DESCRIBE). Full recipe + env table: docs/interfaces/connecting.mdSPARQL 1.1.

The MCP way (through graph-os)

load_tools(tools=["engine_rdf"])   # then call engine_rdf with a SPARQL query/update

or the REST twin exposed by graph-os for the RDF modality.

Cross-modal seam

The triplestore is not a silo: RDF triples live in the same store as the SQL nodes table, vectors, and time-series, so a SPARQL write participates in the engine's unified cross-modal ACID transaction (graph + RDF + vector + blob in one WriteTransaction), and OWL reasoning (kg-modality-reasoning) materializes inferences over the same triples.

  • kg-modality-reasoning — OWL-RL/DL inference + materialization over these triples.
  • kg-modality-sql — the SQL wire onto the same nodes; JOINable across modalities.

Read the full file on GitHub · 61 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. 11d ago First seen · 61 lines · 114 tokens per session scan A 2ad4e4063fd3

Subscribe to this mod's changes

kg-modality-sparql is a skill published in the GitHub repository Knuckles-Team/epistemic-graph (10 stars, last pushed 13d ago), licensed MIT. It adds 114 tokens to every session and 843 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.