cargo-bench-rt

cargo-bench-rt is a skill for Claude Code from gertsylvest/meta-team. It costs 53 tokens per session (909 once invoked), scanned A, original, MIT.

A Rust audio-performance benchmark that measures a DSP routine and compares it with a saved baseline, using Criterion, a Rust benchmarking library.

In plain words
What is it for?
Use it to establish or check the runtime cost of a Rust DSP crate against its real-time audio budget.
Why use it?
It shows whether audio processing fits within the time available for each audio block and catches performance regressions.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: positional $N argument.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is bash bench.sh ./rust/audio-dsp process_128 --save-baseline.

Good fit Use it to establish or check the runtime cost of a Rust DSP crate against its real-time audio budget.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/gertsylvest/meta-team
agentmods
npx agentmods add skills/gertsylvest/meta-team/cargo-bench-rt

Made for: Claude Code.

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 cargo-bench-rt

README.md
[![agentmods](https://agentmods.dev/badge/skills/gertsylvest/meta-team/cargo-bench-rt/github.svg)](https://agentmods.dev/skills/gertsylvest/meta-team/cargo-bench-rt)
Your own site
<a href="https://agentmods.dev/skills/gertsylvest/meta-team/cargo-bench-rt"><img src="https://agentmods.dev/badge/skills/gertsylvest/meta-team/cargo-bench-rt/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 cargo-bench-rt

Your own site · 80×15
<a href="https://agentmods.dev/skills/gertsylvest/meta-team/cargo-bench-rt"><img src="https://agentmods.dev/badge/skills/gertsylvest/meta-team/cargo-bench-rt.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 909 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.00053 $0.00909
Opus 5 $0.00026 $0.00454
Sonnet 5 $0.00011 $0.00182
Haiku 4.5 $0.00005 $0.00091

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

Security

Grade A, and why

cargo-bench-rt 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.

The scan reads SKILL.md. This mod also ships 1 executable file (bench.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

library/skills/cargo-bench-rt/SKILL.md · 83 lines

How it starts

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

Cargo Bench RT

Audio DSP correctness is not enough — the implementation must also fit within the real-time buffer budget. At 48 kHz with a 128-sample block (the AudioWorklet quantum), a process() call has roughly 2.67 ms to complete; on a typical native build with 256-sample blocks at 48 kHz the budget is ~5.33 ms.

This skill wraps Criterion in two modes:

  1. First run / baseline mode — establishes a baseline measurement of a named bench and commits it.
  2. Regression mode — compares the current measurement against the committed baseline and fails if the regression exceeds a configurable percentage.

The intent mirrors the c-audio-engineer's "profile the callback against the real-time budget" rule, applied to Rust DSP crates.

Requirements

  • A [[bench]] entry in the crate's Cargo.toml for the named benchmark.
  • The criterion crate as a dev-dependency.
  • A bench source file at benches/<bench-name>.rs using the Criterion harness.

Typical Criterion bench skeleton:

use criterion::{black_box, criterion_group, criterion_main, Criterion};

fn bench_process(c: &mut Criterion) {
    let mut state = my_dsp::Processor::new(48_000.0);
    let mut buf = [0.0_f32; 128];
    c.bench_function("process_128", |b| {
        b.iter(|| state.process(black_box(&mut buf)));
    });
}

criterion_group!(benches, bench_process);
criterion_main!(benches);

Instructions

The arguments are in $ARGUMENTS. Pass them directly to the bench script:

bash "$(dirname "$0")/bench.sh" $ARGUMENTS
  • Argument 1: crate directory.
  • Argument 2: bench name (matches the [[bench]] name = "..." in Cargo.toml).
  • Optional --save-baseline: overwrite the baseline with the current measurement. Use after a deliberate performance change.
  • Optional --budget-pct N (default 5): regression budget in percent. The bench fails if the new measurement is more than N% slower than the baseline.

Output sections

Section What it reports
BENCH Criterion run summary (mean, std dev, throughput)
BUDGET Pass/fail vs the baseline, with the actual delta

Read the full file on GitHub · 83 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 83 lines · 53 tokens per session scan A 58ff49381aa4

Subscribe to this mod's changes

cargo-bench-rt is a skill published in the GitHub repository gertsylvest/meta-team (5 stars, last pushed 1mo ago), licensed MIT. It adds 53 tokens to every session and 909 once invoked, about $0.0003 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.