juce-dsp-safety

juce-dsp-safety is a skill for Claude Code, Codex from sgm-audio/apc-mcp. It costs 57 tokens per session (403 once invoked), scanned A, original, MIT.

A checklist for making JUCE audio processing safe on the real-time audio thread. The audio thread must finish each block quickly and cannot safely wait for locks, allocate memory, access files, or use the network.

In plain words
What is it for?
Use it while writing or reviewing processBlock and prepareToPlay, especially when a plugin glitches under load. It covers allocations, locks, file access, logging, loops, buffers, and race testing.
Why use it?
Unsafe work in this thread can cause glitches, dropouts, missed deadlines, or crashes when the system is busy. The rules move setup work out of audio processing and help find accidental unsafe calls.

Skill for Claude CodeCodex

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

Good fit Use it while writing or reviewing processBlock and prepareToPlay, especially when a plugin glitches under load. It covers allocations, locks, file access, logging, loops, buffers, and race testing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sgm-audio/apc-mcp/juce-dsp-safety
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 sgm-audio/apc-mcp --skill juce-dsp-safety
Clone the repo
git clone --depth 1 https://github.com/sgm-audio/apc-mcp

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 juce-dsp-safety

README.md
[![agentmods](https://agentmods.dev/badge/skills/sgm-audio/apc-mcp/juce-dsp-safety/github.svg)](https://agentmods.dev/skills/sgm-audio/apc-mcp/juce-dsp-safety)
Your own site
<a href="https://agentmods.dev/skills/sgm-audio/apc-mcp/juce-dsp-safety"><img src="https://agentmods.dev/badge/skills/sgm-audio/apc-mcp/juce-dsp-safety/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 juce-dsp-safety

Your own site · 80×15
<a href="https://agentmods.dev/skills/sgm-audio/apc-mcp/juce-dsp-safety"><img src="https://agentmods.dev/badge/skills/sgm-audio/apc-mcp/juce-dsp-safety.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 403 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.00057 $0.00403
Opus 5.5 $0.00023 $0.00161
Sonnet 5.5 $0.00011 $0.00081
Haiku 4.5 $0.00006 $0.00040

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

Security

Grade A, and why

juce-dsp-safety 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 8d 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.

skills/juce-dsp-safety/SKILL.md · 34 lines

What it actually says

JUCE DSP Safety

When to use

  • Editing processBlock or prepareToPlay.
  • A plugin glitches, drops out, or crashes under load.
  • Reviewing generated or hand-written DSP.

Rules (audio thread)

  • No allocations (new, std::vector::resize, String construction that allocates).
  • No locks (CriticalSection, std::mutex, MessageManagerLock).
  • No file I/O, logging that allocates, or network.
  • No unbounded loops or heavy computation that can miss the deadline.
  • Prefer pre-allocated buffers and lock-free structures prepared in prepareToPlay.

Example

void processBlock(juce::AudioBuffer<float>& buffer, juce::MidiBuffer&) override
{
    // safe: read atomic parameters, process pre-allocated state
    // unsafe: buffer.setSize(...), new float[], file writes
}

Verification

  1. Grep processBlock and any helpers it calls for new , malloc, std::vector, CriticalSection, std::mutex, File::, DBG, and String constructions that can allocate — zero hits on the audio path.
  2. Build with ThreadSanitizer (-fsanitize=thread) and run a stress test (small buffers, high CPU load, rapid parameter changes) for ≥10 minutes with no races or dropouts.
  3. pluginval at strictness ≥5 completes without audio-thread violations or crashes.
  4. Manual review or static analysis confirms all buffers and state are sized in prepareToPlay only.
Files

What ships with it

3 files 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. 8d ago First seen · 34 lines · 57 tokens per session scan A eef000c3a582

Subscribe to this mod's changes

juce-dsp-safety is a skill published in the GitHub repository sgm-audio/apc-mcp (1 stars, last pushed 4d ago), licensed MIT. It adds 57 tokens to every session and 403 once invoked, about $0.0002 per session on Opus 5.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-11-21.

Related

juce-dsp-safety compared with skills from other repositories

juce-dsp-safety next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
juce-dsp-safetysgm-audio/apc-mcpSkill14d agoMITA57Claude Code, Codex
cppericrisco/rsc-harnessSkill6825d agoMITA81Claude Code, Codex
Multi-Language Project Analysis with PMATpaiml/paiml-mcp-agent-toolkitSkill171todayMITA147Claude Code
cppcrazyguitar/cppcheatsheetSkill2976d agoMITA0Claude Code
art-of-debuggingstas00/the-art-of-debuggingSkill1.7k9d agoCC-BY-SA-4.0B193Claude Code, Codex
embedded-debuggingptsilivis/autonomousguySkill424mo agoMITA208Claude Code, Codex
gdb-clisinhoneyy/master-skillsSkill193d agononeA29Claude Code