sparq: Skill for Claude Code

.claude/skills/unsafe-rust-attestation/SKILL.md

unsafe-rust-attestation is a skill for Claude Code from sparq-org/sparq. It costs 170 tokens per session (2,452 once invoked), scanned A, original, MIT.

A guide for documenting and checking where Rust’s unsafe memory operations are allowed in the sparq project. It covers compiler restrictions, the concentrated unsafe parts of the core store, and checks such as Miri, fuzzing, and cargo-geiger.

In plain words
What is it for?
Use it when adding or reviewing unsafe Rust, updating the unsafe-code register, running memory-safety checks, or preparing evidence for the project’s memory-safety certification.
Why use it?
It gives maintainers a consistent way to review unsafe code and record why each use is needed. This makes the project’s memory-safety claims easier to verify honestly.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is sparq-org/sparq's own configuration. It tells Claude Code how to work on sparq itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything sparq configures →

Part of the sparq plugin — 55 skills, 20 agents, 2 hooks shipped together

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/sparq-org/sparq/main/.claude/skills/unsafe-rust-attestation/SKILL.md
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 unsafe-rust-attestation

README.md
[![agentmods](https://agentmods.dev/badge/skills/sparq-org/sparq/unsafe-rust-attestation/github.svg)](https://agentmods.dev/skills/sparq-org/sparq/unsafe-rust-attestation)
Your own site
<a href="https://agentmods.dev/skills/sparq-org/sparq/unsafe-rust-attestation"><img src="https://agentmods.dev/badge/skills/sparq-org/sparq/unsafe-rust-attestation/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 unsafe-rust-attestation

Your own site · 80×15
<a href="https://agentmods.dev/skills/sparq-org/sparq/unsafe-rust-attestation"><img src="https://agentmods.dev/badge/skills/sparq-org/sparq/unsafe-rust-attestation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 170 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,452 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 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.00170 $0.02452
Opus 5 $0.00085 $0.01226
Sonnet 5 $0.00034 $0.00490
Haiku 4.5 $0.00017 $0.00245

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

Security

Grade A, and why

unsafe-rust-attestation 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.

.claude/skills/unsafe-rust-attestation/SKILL.md · 132 lines

How it starts

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

Unsafe-Rust attestation (sparq)

sparq's headline safety claim is memory safety. This skill is how to attest it honestly for the memsafety certification worktree — the forbid(unsafe_code) posture, the concentrated sparq-core unsafe surface (threat-model boundary B5), and the verification estate (Miri + fuzz + the deterministic oracle).

NON-CANONICAL timing. No measured numbers belong in this file.

The posture: forbid where you can, concentrate + justify where you can't

  • #![forbid(unsafe_code)] is declared in the large majority of workspace crates (sparq-serve, sparq-reason, sparq-zk, sparq-nlq, sparq-shacl, and most others — grep -rl "forbid(unsafe_code)" crates/). forbid (not deny) means the lint can't even be locally #[allow]-ed away — a hard compile error if any unsafe is introduced. This is the strongest attestable claim and it's free.
  • sparq-core carries the vast majority of the unsafe, and all of the B5 (untrusted-input) risk. A few other crates have small, non-B5 unsafe surfaces (e.g. sparq-vectors mmap/raw-slice casts, sparq-cli's loader mmap in main.rs, sparq-zk-compose's libc::flock FFI in verifier.rs, one sparq-bench block) — these do not carry forbid(unsafe_code), so the audit surface is "the crates without forbid " not "one crate". Verify the live set with grep -rL "forbid(unsafe_code)" $(git ls-files 'crates/*/src/lib.rs'). Attestation stays tractable because the dangerous (hostile-input → unsafe) risk is still concentrated in sparq-core's B5 boundary, enumerated below.

When scoring, the honest statement is: "N of M crates forbid unsafe; the residual unsafe is concentrated in sparq-core's B5 boundary, enumerated and verified below." Verify the live count with grep before quoting it — don't hard-code it.

The B5 unsafe surface (research/threat-model.md §B5)

B5 = hostile on-disk index file → mmap loader → unsafe code — an untrusted-input → unsafe-code boundary, the most dangerous class in the system. grep -rn "unsafe" crates/sparq-core/src enumerates the sites — concentrated across five files (run it for the live count; don't hard-code one here):

Read the full file on GitHub · 132 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. 12d ago First seen · 132 lines · 170 tokens per session scan A 227c947c3388

Subscribe to this mod's changes

unsafe-rust-attestation is a skill published in the GitHub repository sparq-org/sparq (12 stars, last pushed today), licensed MIT. It adds 170 tokens to every session and 2,452 once invoked, about $0.0009 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.