perf-check

perf-check is a command for Claude Code from jamditis/audiobash. It costs 0 tokens per session (1,714 once invoked), scanned A, original, MIT.

A performance review command for the AudioBash desktop app. It checks build size, possible memory leaks, React screen updates, and terminal-process cleanup.

In plain words
What is it for?
Use it to inspect production build size, review dependencies, look for common React memory-leak patterns, and verify that terminal processes are cleaned up.
Why use it?
It helps find code and dependencies that make the app larger, slower, or likely to keep using memory after they are no longer needed.

Command for Claude Code

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.

agentmods
npx agentmods add commands/jamditis/audiobash/perf-check
Clone the repo
git clone --depth 1 https://github.com/jamditis/audiobash

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 perf-check

README.md
[![agentmods](https://agentmods.dev/badge/commands/jamditis/audiobash/perf-check.svg)](https://agentmods.dev/commands/jamditis/audiobash/perf-check)
Your own site
<a href="https://agentmods.dev/commands/jamditis/audiobash/perf-check"><img src="https://agentmods.dev/badge/commands/jamditis/audiobash/perf-check.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,714 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.01714
Opus 5 $0.00000 $0.00857
Sonnet 5 $0.00000 $0.00343
Haiku 4.5 $0.00000 $0.00171

Measured 3d ago against content hash 079f90efb59f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

perf-check 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 3d 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/commands/perf-check.md · 278 lines

How it starts

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

Performance Check

Analyze AudioBash performance including bundle size, memory leak patterns, React re-render triggers, and PTY cleanup verification.

Your Role

You are a performance engineer analyzing AudioBash for optimization opportunities and potential issues.

Analysis Categories

1. Bundle Size Analysis

Analyze the production build to identify large dependencies:

# Build the app
npm run electron:build:linux

# Analyze bundle contents
ls -lh dist/linux-unpacked/resources/app.asar

# Check total app size
du -sh dist/linux-unpacked/

Review package.json dependencies:

# List all dependencies with their sizes
npm list --depth=0

# Check for unnecessary dependencies
cat package.json | grep -A 50 '"dependencies"'

Common bloat sources:

  • electron - Expected (100+ MB)
  • node-pty - Required for terminal
  • xterm and @xterm/addon-* - Required for terminal UI
  • Unused packages - Remove if found

Calculate bundle breakdown:

  • Electron framework: ~120 MB
  • Node modules: Check actual size
  • Application code: Should be < 5 MB
  • Assets: Icons, fonts, etc.

2. Memory Leak Patterns

Search for common memory leak patterns in React components:

# Check for missing cleanup in useEffect
grep -rn "useEffect" src/ --include="*.tsx" -A 10 | grep -v "return"

# Check for event listeners without cleanup
grep -rn "addEventListener" src/ --include="*.tsx" --include="*.ts" -B 2 -A 8

# Check for intervals/timeouts without cleanup
grep -rn "setInterval\|setTimeout" src/ --include="*.tsx" --include="*.ts" -B 2 -A 8

Expected patterns:

// GOOD: Cleanup in useEffect
useEffect(() => {
  const handler = () => { /* ... */ };
  window.addEventListener('resize', handler);

  return () => {
    window.removeEventListener('resize', handler);
  };
}, []);

// BAD: No cleanup
useEffect(() => {
  window.addEventListener('resize', handler);
  // ⚠️ Missing cleanup - memory leak!
}, []);

Files to review:

  • /home/user/audiobash/src/components/Terminal.tsx - Check PTY data listener cleanup
  • /home/user/audiobash/src/components/VoicePanel.tsx - Check MediaRecorder cleanup
  • /home/user/audiobash/src/App.tsx - Check IPC listener cleanup

Read the full file on GitHub · 278 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. 3d ago First seen · 278 lines · 0 tokens per session scan A 079f90efb59f

Subscribe to this mod's changes

perf-check is a command published in the GitHub repository jamditis/audiobash (5 stars, last pushed 5d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,714 tokens. 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.