audiobash: Command for Claude Code

.claude/commands/test-suite.md

test-suite is a command for Claude Code from jamditis/audiobash. It costs 0 tokens per session (967 once invoked), scanned A, original, MIT.

A test-suite generator for AudioBash using Vitest, a JavaScript and TypeScript testing framework. It creates tests for normal inputs, invalid inputs, edge cases, configuration, Electron communication, and different operating systems.

In plain words
What is it for?
Use it to generate unit or integration tests, clear and restore mocks, test error handling, mock Electron IPC, and cover Windows, macOS, and Linux behavior.
Why use it?
It provides repeatable checks for expected behavior and helps reveal failures before code is released.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is jamditis/audiobash's own configuration. It tells Claude Code how to work on audiobash 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 audiobash configures →

Reuse

Borrowing it

Nothing to install: this file belongs to jamditis/audiobash. 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/jamditis/audiobash/master/.claude/commands/test-suite.md
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 test-suite

README.md
[![agentmods](https://agentmods.dev/badge/commands/jamditis/audiobash/test-suite/github.svg)](https://agentmods.dev/commands/jamditis/audiobash/test-suite)
Your own site
<a href="https://agentmods.dev/commands/jamditis/audiobash/test-suite"><img src="https://agentmods.dev/badge/commands/jamditis/audiobash/test-suite/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 test-suite

Your own site · 80×15
<a href="https://agentmods.dev/commands/jamditis/audiobash/test-suite"><img src="https://agentmods.dev/badge/commands/jamditis/audiobash/test-suite.svg" alt="Reviewed on agentmods" width="80" 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 967 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.00000 $0.00967
Opus 5.5 $0.00000 $0.00387
Sonnet 5.5 $0.00000 $0.00193
Haiku 4.5 $0.00000 $0.00097

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

Security

Grade A, and why

test-suite 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 2mo 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/test-suite.md · 172 lines

How it starts

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

Test Suite Generator

You are a QA engineer writing tests for AudioBash. Generate Vitest test suites that cover functionality thoroughly.

Your Expertise

You know AudioBash's testing patterns:

  • Vitest with globals (describe, it, expect, vi)
  • Node environment (not jsdom)
  • Cross-platform considerations (Windows, macOS, Linux)
  • Mocking Electron IPC for renderer tests
  • Configuration validation tests

Test File Structure

import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';

describe('ModuleName', () => {
  beforeEach(() => {
    vi.clearAllMocks();
  });

  afterEach(() => {
    vi.restoreAllMocks();
  });

  describe('functionName', () => {
    it('should handle the normal case', () => {
      // Arrange
      const input = 'test';

      // Act
      const result = functionName(input);

      // Assert
      expect(result).toBe('expected');
    });

    it('should handle edge case: empty input', () => {
      expect(functionName('')).toBe('');
    });

    it('should throw on invalid input', () => {
      expect(() => functionName(null)).toThrow('Invalid input');
    });
  });
});

Mocking Patterns

Mock Electron IPC

const mockElectron = {
  getApiKey: vi.fn().mockResolvedValue('test-key'),
  setApiKey: vi.fn().mockResolvedValue({ success: true }),
  sendToTerminal: vi.fn(),
  getTerminalContext: vi.fn().mockResolvedValue({
    cwd: '/home/user',
    os: 'linux',
    shell: 'bash',
    recentOutput: 'test output',
  }),
};

// In test:
vi.stubGlobal('window', { electron: mockElectron });

Mock fetch

vi.stubGlobal('fetch', vi.fn().mockResolvedValue({
  ok: true,
  json: () => Promise.resolve({ text: 'transcribed text' }),
}));

Mock fs (for main process tests)

vi.mock('fs', () => ({
  existsSync: vi.fn().mockReturnValue(true),
  readFileSync: vi.fn().mockReturnValue('file content'),
  writeFileSync: vi.fn(),
}));

Cross-Platform Testing

describe('cross-platform behavior', () => {
  const originalPlatform = process.platform;

  afterEach(() => {
    Object.defineProperty(process, 'platform', { value: originalPlatform });
  });

  it('should use PowerShell on Windows', () => {
    Object.defineProperty(process, 'platform', { value: 'win32' });
    expect(getShell()).toBe('powershell.exe');
  });

  it('should use $SHELL on Unix', () => {
    Object.defineProperty(process, 'platform', { value: 'darwin' });
    process.env.SHELL = '/bin/zsh';
    expect(getShell()).toBe('/bin/zsh');
  });
});

Read the full file on GitHub · 172 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. 2mo ago First seen · 172 lines · 0 tokens per session scan A e46526d0e134

Subscribe to this mod's changes

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