clean-code-audio

clean-code-audio is a skill for Claude Code from CassetteTapeCrackle/claude-starters. It costs 52 tokens per session (441 once invoked), scanned A, original, MIT.

A coding guide for JUCE audio plug-ins and digital signal processing, including safe communication between the audio and user-interface threads.

In plain words
What is it for?
Use it when writing or reviewing real-time audio code involving parameter smoothing, block processing, lock-free data transfer, denormal handling, and signal-based tests.
Why use it?
It helps avoid audio glitches, timing problems, zipper noise, slow real-time code, and DSP that is difficult to test.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the claude-starters plugin — 9 skills, 1 command, 8 agents, 2 hooks shipped together

Good fit Use it when writing or reviewing real-time audio code involving parameter smoothing, block processing, lock-free data transfer, denormal handling, and signal-based tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cassettetapecrackle/claude-starters/clean-code-audio
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 CassetteTapeCrackle/claude-starters --skill clean-code-audio
Clone the repo
git clone --depth 1 https://github.com/CassetteTapeCrackle/claude-starters

Made for: Claude Code.

Or install claude-starters, the plugin that ships this one along with the rest of its 9 skills, 1 command, 8 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 clean-code-audio

README.md
[![agentmods](https://agentmods.dev/badge/skills/cassettetapecrackle/claude-starters/clean-code-audio/github.svg)](https://agentmods.dev/skills/cassettetapecrackle/claude-starters/clean-code-audio)
Your own site
<a href="https://agentmods.dev/skills/cassettetapecrackle/claude-starters/clean-code-audio"><img src="https://agentmods.dev/badge/skills/cassettetapecrackle/claude-starters/clean-code-audio/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 clean-code-audio

Your own site · 80×15
<a href="https://agentmods.dev/skills/cassettetapecrackle/claude-starters/clean-code-audio"><img src="https://agentmods.dev/badge/skills/cassettetapecrackle/claude-starters/clean-code-audio.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 441 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.00052 $0.00441
Opus 5 $0.00026 $0.00220
Sonnet 5 $0.00010 $0.00088
Haiku 4.5 $0.00005 $0.00044

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

Security

Grade A, and why

clean-code-audio 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 9d 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/clean-code-audio/SKILL.md · 30 lines

What it actually says

Clean-code audio / DSP (depth)

Apply on top of the audio-plugin base rules (RT-audio non-negotiables, DSP-is-sacred, golden-buffer tests, pluginval). Also use clean-code-cpp.

The two-thread model

  • The audio thread (processBlock) and the message thread (UI, params) never share mutable state via locks.
  • Pass parameters across with std::atomic or a lock-free FIFO; the audio thread only reads smoothed snapshots.

Parameter smoothing

  • Never apply a raw parameter jump in the audio path — zipper noise. Smooth it (juce::SmoothedValue or a one-pole) and read per-sample or per-block.

The inner loop

  • Process in blocks; hoist invariants out of the per-sample loop.
  • Prefer branch-free math in the hot loop (select/min/max over if); branches stall the pipeline and hurt determinism.
  • Prefer float unless precision demands double. Flush denormals (ScopedNoDenormals), and design filters/feedback so denormals don't accumulate.

Testability & sacredness

  • Keep DSP as pure functions/classes over buffers in Source/dsp/, decoupled from JUCE UI, so it's unit-testable with signal fixtures and golden buffers (impulse, sine sweep).
  • DSP is sacred: a golden-buffer test failing on a non-DSP change means something leaked into the algorithm — stop and fix the boundary, don't update the golden file.

Signals it's going wrong

  • Allocation/lock/log inside processBlock → move it to the message thread or preallocate.
  • A parameter read directly in the loop without smoothing → audible artifacts.
  • DSP logic reaching into UI/JUCE component state → break the coupling.
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. 9d ago First seen · 30 lines · 52 tokens per session scan A 12429024e270

Subscribe to this mod's changes

clean-code-audio is a skill published in the GitHub repository CassetteTapeCrackle/claude-starters (1 stars, last pushed 21d ago), licensed MIT. It adds 52 tokens to every session and 441 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.

Related

Other skills, from other repositories

cpp-reinforcement-learning

C++ Reinforcement Learning best practices using libtorch (PyTorch C++ frontend) and modern C++17/20. Use when: Implementing RL algorithms in C++ for performance-critical applications Building production RL systems with libtorch Creating replay buffers and experience storage Optimizing RL training with GPU acceleration…

Aznatkoiny/zAI-Skills · 83 tokens

bun-ffi

This skill should be used when the user asks about "bun:ffi", "foreign function interface", "calling C from Bun", "native libraries", "dlopen", "shared libraries", "calling native code", or integrating C/C++ libraries with Bun.

secondsky/claude-skills · 56 tokens

cpp-rules

C++ coding rules: style, patterns, security, testing. Triggers: .cpp, .cc, .cxx, .hpp, .h, CMakeLists.txt, Makefile, GoogleTest, clang-tidy.

softspark/ai-toolkit · 51 tokens

implementing-jsc-classes-cpp

Implements JavaScript classes in C++ using JavaScriptCore. Use when creating new JS classes with C++ bindings, prototypes, or constructors.

twaldin/hone · 38 tokens

symfony:daily-workflow

Daily development workflow for Symfony projects including common tasks, debugging, and productivity tips.

dev-toolings/superpowers-symfony · 22 tokens

cpp-expert

Expert-level C++ development with modern C++20/23, STL, memory management, and performance. Use when the user mentions C++, C++20, C++23, the STL, templates, or performance, or when the task involves Modern C++ Features, Memory Management, Ranges and Views, or Coroutines.

personamanagmentlayer/pcl · 70 tokens