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.
git clone --depth 1 https://github.com/bullish0x/GameStudionpx agentmods add skills/bullish0x/gamestudio/audio-systemWrote 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.
[](https://agentmods.dev/skills/bullish0x/gamestudio/audio-system)<a href="https://agentmods.dev/skills/bullish0x/gamestudio/audio-system"><img src="https://agentmods.dev/badge/skills/bullish0x/gamestudio/audio-system/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.
<a href="https://agentmods.dev/skills/bullish0x/gamestudio/audio-system"><img src="https://agentmods.dev/badge/skills/bullish0x/gamestudio/audio-system.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00023 | $0.04923 |
| Opus 5.5 | $0.00009 | $0.01969 |
| Sonnet 5.5 | $0.00005 | $0.00985 |
| Haiku 4.5 | $0.00002 | $0.00492 |
Grade A, and why
audio-system scanned grade A with 1 finding 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
const response = await fetch(url); How it starts
The opening of the file, as written. The whole thing — 750 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Audio System
When to Use
Use this skill when:
- Playing sound effects
- Managing background music
- Implementing spatial 3D audio
- Creating audio feedback for actions
- Building audio mixing system
- Handling audio asset loading
Core Principles
- Web Audio API: Use modern audio capabilities
- Spatial Audio: 3D positioned sounds
- Audio Pooling: Reuse audio sources
- Volume Control: Master, music, and SFX volumes
- Performance-Aware: Limit concurrent sounds
- Mobile-Friendly: Handle autoplay restrictions
Audio System Implementation
1. Audio Manager
// audio/AudioManager.ts
export interface AudioConfig {
masterVolume?: number;
musicVolume?: number;
sfxVolume?: number;
maxConcurrentSounds?: number;
}
export class AudioManager {
private context: AudioContext;
private masterGain: GainNode;
private musicGain: GainNode;
private sfxGain: GainNode;
private sounds = new Map<string, AudioBuffer>();
private activeSounds: AudioBufferSourceNode[] = [];
private maxConcurrentSounds: number;
private listener: AudioListener | null = null;
constructor(config: AudioConfig = {}) {
this.context = new AudioContext();
// Create gain nodes
this.masterGain = this.context.createGain();
this.musicGain = this.context.createGain();
this.sfxGain = this.context.createGain();
// Connect gain hierarchy
this.musicGain.connect(this.masterGain);
this.sfxGain.connect(this.masterGain);
this.masterGain.connect(this.context.destination);
// Set volumes
this.masterGain.gain.value = config.masterVolume ?? 1;
this.musicGain.gain.value = config.musicVolume ?? 0.7;
this.sfxGain.gain.value = config.sfxVolume ?? 1;
this.maxConcurrentSounds = config.maxConcurrentSounds ?? 32;
}
async loadSound(name: string, url: string): Promise<void> {
try {
const response = await fetch(url);
const arrayBuffer = await response.arrayBuffer();
const audioBuffer = await this.context.decodeAudioData(arrayBuffer);
this.sounds.set(name, audioBuffer);
} catch (error) {
console.error(`Failed to load sound: ${name}`, error);
}
}
async loadSounds(sounds: Record<string, string>): Promise<void> {
const promises = Object.entries(sounds).map(([name, url]) =>
this.loadSound(name, url)
);
await Promise.all(promises);
}
playSound(
name: string,
options: {
volume?: number;
loop?: boolean;
playbackRate?: number;
destination?: GainNode;
} = {}
): AudioBufferSourceNode | null {
const buffer = this.sounds.get(name);
if (!buffer) {
console.warn(`Sound not found: ${name}`);
return null;
}
// Limit concurrent sounds
if (this.activeSounds.length >= this.maxConcurrentSounds) {
this.stopOldestSound();
}
// Resume audio context (required after user interaction)
if (this.context.state === 'suspended') {
this.context.resume();
}
// Create source
const source = this.context.createBufferSource();
source.buffer = buffer;
source.loop = options.loop ?? false;
source.playbackRate.value = options.playbackRate ?? 1;
// Create gain node for individual sound volume
const gainNode = this.context.createGain();
gainNode.gain.value = options.volume ?? 1;
// Connect to destination (music or sfx)
source.connect(gainNode);
gainNode.connect(options.destination ?? this.sfxGain);
// Track active sound
this.activeSounds.push(source);
source.onended = () => {
const index = this.activeSounds.indexOf(source);
if (index !== -1) {
this.activeSounds.splice(index, 1);
}
};
source.start(0);
return source;
}
playSoundAt(
name: string,
position: Vector3,
options: {
volume?: number;
loop?: boolean;
refDistance?: number;
maxDistance?: number;
rolloffFactor?: number;
} = {}
): AudioBufferSourceNode | null {
const buffer = this.sounds.get(name);
if (!buffer) {
console.warn(`Sound not found: ${name}`);
return null;
}
if (this.activeSounds.length >= this.maxConcurrentSounds) {
this.stopOldestSound();
}
if (this.context.state === 'suspended') {
this.context.resume();
}
// Create source
const source = this.context.createBufferSource();
source.buffer = buffer;
source.loop = options.loop ?? false;
// Create panner for 3D positioning
const panner = this.context.createPanner();
panner.panningModel = 'HRTF';
panner.distanceModel = 'inverse';
panner.refDistance = options.refDistance ?? 1;
panner.maxDistance = options.maxDistance ?? 10000;
panner.rolloffFactor = options.rolloffFactor ?? 1;
panner.coneInnerAngle = 360;
panner.coneOuterAngle = 0;
panner.coneOuterGain = 0;
// Set position
panner.positionX.value = position.x;
panner.positionY.value = position.y;
panner.positionZ.value = position.z;
// Create gain node
const gainNode = this.context.createGain();
gainNode.gain.value = options.volume ?? 1;
// Connect: source -> panner -> gain -> destination
source.connect(panner);
panner.connect(gainNode);
gainNode.connect(this.sfxGain);
this.activeSounds.push(source);
source.onended = () => {
const index = this.activeSounds.indexOf(source);
if (index !== -1) {
this.activeSounds.splice(index, 1);
}
};
source.start(0);
return source;
}
stopSound(source: AudioBufferSourceNode): void {
try {
source.stop();
} catch (error) {
// Already stopped
}
}
stopAllSounds(): void {
for (const source of this.activeSounds) {
this.stopSound(source);
}
this.activeSounds = [];
}
private stopOldestSound(): void {
if (this.activeSounds.length > 0) {
const oldest = this.activeSounds.shift()!;
this.stopSound(oldest);
}
}
setMasterVolume(volume: number): void {
this.masterGain.gain.value = Math.max(0, Math.min(1, volume));
}
setMusicVolume(volume: number): void {
this.musicGain.gain.value = Math.max(0, Math.min(1, volume));
}
setSFXVolume(volume: number): void {
this.sfxGain.gain.value = Math.max(0, Math.min(1, volume));
}
getMasterVolume(): number {
return this.masterGain.gain.value;
}
getMusicVolume(): number {
return this.musicGain.gain.value;
}
getSFXVolume(): number {
return this.sfxGain.gain.value;
}
setListener(position: Vector3, forward: Vector3, up: Vector3): void {
if (!this.context.listener) return;
this.context.listener.positionX.value = position.x;
this.context.listener.positionY.value = position.y;
this.context.listener.positionZ.value = position.z;
this.context.listener.forwardX.value = forward.x;
this.context.listener.forwardY.value = forward.y;
this.context.listener.forwardZ.value = forward.z;
this.context.listener.upX.value = up.x;
this.context.listener.upY.value = up.y;
this.context.listener.upZ.value = up.z;
}
dispose(): void {
this.stopAllSounds();
this.context.close();
}
}
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.
- 2mo ago First seen · 750 lines · 23 tokens per session scan A 036f30f26e33
audio-system is a skill published in the GitHub repository bullish0x/GameStudio (29 stars, last pushed 5mo ago), licensed MIT. It adds 23 tokens to every session and 4,923 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
audio-system compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| audio-systembullish0x/GameStudio | Skill | 29 | 5mo ago | MIT | A | 23 | Claude Code |
| ar-vr-xrtravisjneuman/.claude | Skill | 115 | yesterday | MIT | A | 50 | Claude Code |
| game-developmenttravisjneuman/.claude | Skill | 115 | yesterday | MIT | A | 34 | Claude Code |
| agent-game-developertravisjneuman/.claude | Skill | 115 | yesterday | MIT | A | 24 | Claude Code |
| unity-agent-workflowshashgraph-online/awesome-codex-plugins | Skill | 1.6k | today | Apache-2.0 | A | 158 | Codex |
| using-bgs-archivehashgraph-online/awesome-codex-plugins | Skill | 1.6k | today | Apache-2.0 | A | 75 | Claude Code, Codex |
| leadershiptravisjneuman/.claude | Skill | 115 | yesterday | MIT | A | 42 | Claude Code |