Borrowing it
Nothing to install: this file belongs to sparq-org/sparq. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/sparq-org/sparq/main/.claude/skills/sparql-formal-semantics/SKILL.mdgit clone --depth 1 https://github.com/sparq-org/sparqWrote 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.
[](https://agentmods.dev/skills/sparq-org/sparq/sparql-formal-semantics)<a href="https://agentmods.dev/skills/sparq-org/sparq/sparql-formal-semantics"><img src="https://agentmods.dev/badge/skills/sparq-org/sparq/sparql-formal-semantics/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.
<a href="https://agentmods.dev/skills/sparq-org/sparq/sparql-formal-semantics"><img src="https://agentmods.dev/badge/skills/sparq-org/sparq/sparql-formal-semantics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00104 | $0.01098 |
| Opus 5 | $0.00052 | $0.00549 |
| Sonnet 5 | $0.00021 | $0.00220 |
| Haiku 4.5 | $0.00010 | $0.00110 |
Grade A, and why
sparql-formal-semantics 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 12d 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.
How it starts
The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SPARQL formal semantics cheat-sheet
A working reference for the formal semantics layer Jesse's paper sits on. Citations matter — every claim here should be traceable to either the W3C SPARQL 1.1 rec or to the Pérez–Arenas–Gutiérrez (PAG) paper.
Algebra at a glance
PAG models a SPARQL graph pattern as expressions built from:
- Triple patterns
(s, p, o)where each position is a term or variable. - Basic graph patterns (BGPs) as sets of triple patterns.
- AndP1, P2 — join (compatibility on shared variables).
- OptP1, P2 — left outer join (
OPTIONAL). - UnionP1, P2 — set union of solution mappings.
- FilterP, R — selection by a built-in expression.
Solutions are partial functions μ : V → Term (called solution
mappings). The semantics eval(G, P) of pattern P over graph G
is a multiset of solution mappings.
Compatibility
Two solution mappings μ1, μ2 are compatible iff they agree on
every variable in dom(μ1) ∩ dom(μ2). The join μ1 ⨝ μ2 is
defined when they're compatible and equals μ1 ∪ μ2.
This single notion unifies BGP joining, AND, and the inner part of
OPTIONAL.
Standard equivalences
Useful when re-shaping queries before circuit compilation:
(P1 AND P2) AND P3 ≡ P1 AND (P2 AND P3)(associativity).P1 AND P2 ≡ P2 AND P1(commutativity, multiset).(P1 UNION P2) AND P3 ≡ (P1 AND P3) UNION (P2 AND P3)(distributivity).OPTIONALis not associative or commutative — be careful.
RDF graph model
For the paper's purposes, an RDF graph is a finite multiset of triples. Triples have:
- IRIs, literals (with optional language tag, optional datatype IRI), and blank nodes.
- Blank nodes are existential — they have local scope.
Blank-node canonicalisation
Two living standards:
- URDNA2015 — the original RDF Dataset Canonicalisation algorithm; widely deployed.
- URDNA2024 — the W3C-track successor; addresses some hash collisions and edge cases.
For the paper, pick one and document it. The choice flows through to circuit-side encoding, signature schemes that sign canonical N-Quads, and the Lean model.
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.
- 12d ago First seen · 110 lines · 104 tokens per session scan A 7ceaaec34531
sparql-formal-semantics is a skill published in the GitHub repository sparq-org/sparq (12 stars, last pushed today), licensed MIT. It adds 104 tokens to every session and 1,098 once invoked, about $0.0005 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-08-31.
Other skills, from other repositories
arboreto
Infer gene regulatory networks (GRNs) from gene expression data using scalable algorithms (GRNBoost2, GENIE3). Use when analyzing transcriptomics data (bulk RNA-seq, single-cell RNA-seq) to identify transcription factor-target gene relationships and regulatory interactions. Supports distributed computation for…
pyhealth
Build clinical/healthcare deep-learning pipelines with PyHealth — loading EHR/signal/imaging datasets (MIMIC-III/IV, eICU, OMOP, SleepEDF, ChestXray14, EHRShot), defining tasks (mortality, readmission, length-of-stay, drug recommendation, sleep staging, ICD coding, EEG events), instantiating models (Transformer…
torchdrug
Build and troubleshoot TorchDrug 0.2.1 workflows for molecular graphs, property prediction, self-supervised pretraining, molecule generation, retrosynthesis, protein representation learning, and knowledge graph reasoning. Use when code imports torchdrug or needs its datasets, models, tasks, or Engine.
deepspot-m
Generate transcriptome-wide virtual spatial transcriptomics from H&E histology with DeepSpot-M. Use when you need spatial gene expression in log1p-CPM for 224x224 tiles at about 20x, want to query protein-coding genes by symbol instead of a fixed panel, or want to run prediction across a whole slide after tiling with…
nemo-mbridge-perf-expert-parallel-overlap
Validate and use MoE expert-parallel communication overlap in Megatron-Bridge, including overlapmoeexpertparallelcomm, delaywgradcompute, and flex dispatcher backends such as DeepEP and HybridEP.
pick-a-pii-model
Select an on-device OpenMed PII model from the committed registry by language, runtime format, and size budget, then require recall validation before deployment. Use when an agent must choose a local PII detector for CPU, Apple Silicon, or a mobile export without relying on live model discovery.