Token导航 LogoToken导航TokenDH.com
待分类操作浏览器github未标认证来源可访问许可证需确认审计通过

add-audio添加音频

Agent Skill

用于辅助音频、音乐、语音转写、语音合成或声音素材处理。它适合让 Agent 生成配乐说明、整理音频流程、调用语音工具或处理播客和视频配音素材。使用时需要确认输入音频来源、输出格式、时长和模型限制;涉及人声克隆、版权音乐或公开发布时,应先核对授权和合规边界。

总安装

7,886

周安装

319

GitHub Stars

109

下载量

2,475
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:add-audio(添加音频)
来源仓库:https://github.com/opusgamelabs/game-creator
仓库路径:skills/add-audio
安装命令:
npx skills add https://github.com/opusgamelabs/game-creator --skill add-audio
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/opusgamelabs/game-creator --skill add-audio

简介

add-audio 用于为游戏项目生成程序化背景音乐和音效,无需外部音频文件。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中需要快速实现游戏声音设计或音频逻辑时使用。
  • 通过 GitHub 安装,需确认项目基于 Phaser 引擎,并遵循 src/core/EventBus.js 中的事件系统。
  • 安装前建议检查项目结构是否符合预期,避免跳过验证步骤导致音频生成失败。
  • 注意所有音频均通过 Web Audio API 合成,支持循环播放和即时音效,适用于浏览器环境。

SKILL.md

Performance Notes

  • Take your time to do this thoroughly
  • Quality is more important than speed
  • Do not skip validation steps

Add Audio

Add procedural music and sound effects to an existing game. BGM uses a Web Audio API step sequencer for looping patterns. SFX use the Web Audio API directly for true one-shot playback. No audio files or npm packages needed — everything is synthesized in the browser.

Instructions

Analyze the game at $ARGUMENTS (or the current directory if no path given).

First, load the game-audio skill to get the full Web Audio patterns and integration guide.

Step 1: Audit

  • Read src/core/EventBus.js to see what game events exist (flap, score, death, etc.)
  • Read all scene files to understand the game flow (gameplay, game over)
  • Identify what music and SFX would fit the game's genre and mood

Step 2: Plan

Present a table of planned audio:

Event / SceneAudio TypeStyleDescription
GameSceneBGMChiptuneUpbeat square wave melody + bass + drums
GameOverSceneBGMSomberSlow descending melody
Player actionSFXRetroQuick pitch sweep
ScoreSFXRetroTwo-tone ding
DeathSFXRetroDescending crushed notes

Explain in plain English: "Background music will automatically loop during each scene. Sound effects will play when you do things like jump, score, or die. The first time you click/tap, the audio system will activate (browsers require a user interaction before playing sound)."

Step 3: Implement

  1. Create src/audio/AudioManager.js — AudioContext init, master gain node, BGM sequencer play/stop
  2. Create src/audio/AudioBridge.js — wires EventBus events to AudioManager for BGM, calls SFX functions directly
  3. Create src/audio/music.js with BGM patterns for each scene (Web Audio step sequencer — note arrays that loop continuously)
  4. Create src/audio/sfx.js with SFX for each event (Web Audio API — OscillatorNode + GainNode + BiquadFilterNode for true one-shot playback)
  5. Add audio events to EventBus.js if not present (AUDIO_INIT, MUSIC_GAMEPLAY, MUSIC_GAMEOVER, MUSIC_STOP, AUDIO_TOGGLE_MUTE)
  6. Wire initAudioBridge() in main.js
  7. Emit AUDIO_INIT on first user interaction (game starts immediately, no menu)
  8. Emit music events at scene transitions and SFX events at game actions
  9. Add mute toggle — AUDIO_TOGGLE_MUTE event, UI button, M key shortcut

Step 4: Verify

  • Run npm run build to confirm no errors
  • List all files created/modified
  • Remind the user: "Click/tap once to activate audio, then you'll hear the music"

Example Usage

Full audio pass

/add-audio examples/flappy-bird

Result: Creates src/audio/AudioManager.js, music.js (gameplay + game-over BGM patterns), sfx.js (flap, score, death, button SFX) → wires via AudioBridge → mute toggle on M key. First click activates audio.

Troubleshooting

No sound plays

Cause: AudioContext not resumed after user interaction (browser autoplay policy). Fix: Ensure AudioContext.resume() is called on first user input (click/tap/keydown). Check for AUDIO_INIT event wiring.

Audio causes lag spikes

Cause: Creating new OscillatorNodes every frame. Fix: SFX should be one-shot (create, connect, start, stop). BGM uses a single looping sequencer. Never create nodes in update().

Next Step

Tell the user:

Your game now has music and sound effects! Next, run /game-creator:qa-game to add automated tests that verify your game boots correctly, scenes transition properly, scoring works, and visuals haven't broken. Pipeline progress: /make-game → /design-game → /add-audio → /qa-game/review-game

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.72%
按下载量换算909

Claude

30.98%
按下载量换算767

Cursor

17.62%
按下载量换算436

Gemini CLI

9.55%
按下载量换算236

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills