sparq: Skill for Claude Code

.claude/skills/fused-decompress-parse/SKILL.md

fused-decompress-parse is a skill for Claude Code from sparq-org/sparq. It costs 128 tokens per session (1,659 once invoked), scanned A, original, MIT.

A guide to reading compressed RDF data in Rust by decompressing it while the parser is processing it, rather than first expanding the whole file in memory. RDF is a format for representing linked facts.

In plain words
What is it for?
Use it when building parallel ingestion for gzip, zstd, or bzip2 RDF files, choosing a compression format, or tuning parser buffering and pipelines.
Why use it?
It explains how small decoder reads and lack of overlapping work can make an apparently streaming design slower than expected.

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/fused-decompress-parse/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 fused-decompress-parse

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/sparq-org/sparq/fused-decompress-parse"><img src="https://agentmods.dev/badge/skills/sparq-org/sparq/fused-decompress-parse.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 128 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,659 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.
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.00128 $0.01659
Opus 5 $0.00064 $0.00830
Sonnet 5 $0.00026 $0.00332
Haiku 4.5 $0.00013 $0.00166

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

Security

Grade A, and why

fused-decompress-parse 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 10d 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/fused-decompress-parse/SKILL.md · 109 lines

How it starts

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

Fused decompress + parse for RDF ingest

[OPUS-4.8] Authored from measured research. Source of truth: research/custom-parsers-baseline.md (the "Compressed ingest" section + the post-fix measurements) and research/fast-ingestion.md. Verify before quoting.

The headline finding (and the bug it exposed)

A naïve streaming ingest (decoder → parser, one parse round per read()) was measured 3.5–5× SLOWER than just decompressing to RAM first — the opposite of what streaming should cost. Two compounding causes, both fixed by reusing code that already existed:

  1. Per-read() flush bug. Graph::load_reader_parallel flushed a parse+sharded-merge round on every read() call, and decompressors return small reads (gzip ~0.38 MB/read, zstd ~1.6 MB/read) into its 32 MiB buffer. The parallel parser+merge machinery is amortised for ~32 MiB blocks, not 0.4 MB ones. Fix: a producer thread that fills the full block across read() calls before handing it to the parser.
  2. No pipelining. Decode and parse ran additively. Fix: run decode on its own thread feeding a bounded channel, so it overlaps the rayon parse + dict merge — the exact 3-stage pipeline that already existed in build_external_ntriples_parallel (sparq-core lib.rs) and just wasn't used by the in-memory path.

After both fixes (same machine/harness), streaming ingest of the slice dropped by ~8–9× (gzip) and ~7× (zstd) and now matches or beats two-stage in every paired run while never materialising the decompressed copy. (Absolute figures drift with thermal state / machine — they live in research/custom-parsers-baseline.md and the bench/parse/ harness; cite that, not baked numbers. The load-bearing fact is the ratio + the "matches-or-beats two-stage" conclusion.)

The fusion bound — what "ideal" means

Ideal pipelined ingest = max(decode, parse+build), because a perfect pipeline hides the smaller stage under the larger:

  • gzip: max(0.396, 0.296) ≈ 0.40 s
  • zstd: max(0.140, 0.296) ≈ 0.30 s

Read the full file on GitHub · 109 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. 10d ago First seen · 109 lines · 128 tokens per session scan A 6aefa792843b

Subscribe to this mod's changes

fused-decompress-parse is a skill published in the GitHub repository sparq-org/sparq (12 stars, last pushed yesterday), licensed MIT. It adds 128 tokens to every session and 1,659 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-08-31.