重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
ui-sound-design by dannyjpwilliams/ui-sound-design-skill
npx skills add https://github.com/dannyjpwilliams/ui-sound-design-skill --skill ui-sound-design▁ ▃ ▅ ▇ ▅ ▃ ▁ ▁ ▃ ▅ ▇ ▅ ▃ ▁ ▁ ▃ ▅ ▇ ▅ ▃ ▁ ██╗ ██╗██╗ ███████╗ ██████╗ ██╗ ██╗███╗ ██╗██████╗ ██║ ██║██║ ██╔════╝██╔═══██╗██║ ██║████╗ ██║██╔══██╗ ██║ ██║██║ ███████╗██║ ██║██║ ██║██╔██╗ ██║██║ ██║ ██║ ██║██║ ╚════██║██║ ██║██║ ██║██║╚██╗██║██║ ██║ ╚██████╔╝██║ ███████║╚██████╔╝╚██████╔╝██║ ╚████║██████╔╝ ╚═════╝ ╚═╝ ╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝╚═════╝ ░ ▒ ▓ █ ▓ ▒ ░ ░ ▒ ▓ █ ▓ ▒ ░ ░ ▒ ▓ █ ▓ ▒ ░ ██████╗ ███████╗███████╗██╗ ██████╗ ███╗ ██╗ ██╔══██╗██╔════╝██╔════╝██║██╔════╝ ████╗ ██║ ██║ ██║█████╗ ███████╗██║██║ ███╗██╔██╗ ██║ ██║ ██║██╔══╝ ╚════██║██║██║ ██║██║╚██╗██║ ██████╔╝███████╗███████║██║╚██████╔╝██║ ╚████║ ╚═════╝ ╚══════╝╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ▇ ▅ ▃ ▁ ▃ ▅ ▇ ▇ ▅ ▃ ▁ ▃ ▅ ▇ ▇ ▅ ▃ ▁ ▃ ▅ ▇
描述你的用户界面应有的声音效果。在浏览器中预览、调整并下载它。
将通俗易懂的声音描述转化为可运行的 Web Audio API 代码。无需音频工程背景——描述你想听到的声音,本技能提供合成知识使其成为现实。
每个声音都遵循这个循环:描述 → 生成 → 聆听 → 优化(可选审查步骤用于审计现有代码)
用户用通俗语言描述声音。使用以下框架提出澄清性问题:
生成任何声音前的四个问题:
如果用户给出模糊的请求,例如“制作一个点击声”,请使用配方中的合理默认值并立即生成——不要过度询问。
references/sound-recipes.md 加载配方广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
references/web-audio-api.md 中的构建块进行组合assets/sound-preview.html),或根据请求输出 ES 模块 / React Hook / 类提供 HTML 预览文件,以便用户可以在浏览器中打开并立即听到声音。每个声音都包含一个下载按钮,可导出 .wav 文件用于生产代码或交付给开发人员。为每个声音变体包含带标签的按钮。预览必须:
当用户给出反馈时,使用词汇桥接进行翻译并调整参数。常见的优化模式:
当用户说“审查”、“审计”或“检查我的声音代码”,或粘贴现有 Web Audio 代码进行评估时,进入审查模式。
步骤:
references/audio-rules.md 加载规则audio-rules.md 中的格式报告发现的问题——每个违规占一行,格式为 文件:行号 — [规则ID] 描述何时保持在生成模式: 如果用户的请求是模糊的(例如,“这是我的点击声”但没有要求审查),则默认使用生成工作流程。只有当审计意图明确时才进入审查模式。
这是核心的翻译层。当用户使用主观语言时,将其映射到合成参数:
| 用户表述 | 参数调整 | 示例 |
|---|---|---|
| "更明亮" | 提高频率或滤波器截止频率 | 滤波器截止频率 1500 → 3000 Hz |
| "更温暖" | 降低滤波器截止频率,使用正弦/三角波 | 锯齿波 → 正弦波,截止频率 3000 → 1200 |
| "更暗沉" | 降低频率,减少高次谐波 | 在 800 Hz 处添加低通滤波器 |
| "更干脆" | 缩短起音和衰减时间 | 衰减 0.15 → 0.05s |
| "更柔和" | 降低音量,延长起音时间,平缓包络 | 音量 0.3 → 0.15,起音 0 → 0.01s |
| "更响亮" / "更突出" | 提高音量(最大 0.8) | 音量 0.2 → 0.4 |
| "更饱满" / "更丰富" | 叠加振荡器,添加失谐 | 添加第二个振荡器,失谐 +7 音分 |
| "更单薄" | 移除叠加层,使用正弦波,提高高通滤波器 | 单一正弦波,高通 500 Hz |
| "更具金属感" | FM 合成,非谐波比率 | 调制比率 1.4,增加调制深度 |
| "更具有机感" / "更自然" | 使用噪声成分,微妙的随机性 | 混入滤波后的噪声脉冲 |
| "更短促" / "更清脆" | 减少总持续时间 | 持续时间 0.15 → 0.06s |
| "更持久" / "更持续" | 增加持续时间和延音 | 持续时间 0.1 → 0.3s,添加延音阶段 |
| "更俏皮" | 提高音高,添加弹跳/过冲 | 频率 +200 Hz,添加音高过冲 |
| "更专业" | 微妙、干净、极简 | 降低音量,正弦波,短持续时间 |
| "复古" / "8-bit" | 方波,量化音高 | 切换到方波,使用音符频率 |
| "气泡感" | 快速音高下降,正弦波 | 起始频率 2000,快速指数下降 |
| 类别 | 持续时间 | 配方 | 触发条件 | 关键特征 |
|---|---|---|---|---|
| 点击声 | 10–80ms | references/sound-recipes.md#click | 按钮按下、轻触 | 噪声脉冲,带通滤波 |
| 切换声 | 80–200ms | references/sound-recipes.md#toggle | 开关开/关 | 上升/下降的音高扫频 |
| 悬停声 | 30–80ms | references/sound-recipes.md#hover | 鼠标进入 | 柔和,近乎潜意识 |
| 成功声 | 200–500ms | references/sound-recipes.md#success | 任务完成、保存 | 上升的大三度 |
| 错误声 | 150–400ms | references/sound-recipes.md#error | 验证失败、被拒绝 | 下降的、嗡嗡声 |
| 警告声 | 150–350ms | references/sound-recipes.md#warning | 警告状态 | 双脉冲,中频范围 |
| 通知声 | 200–800ms | references/sound-recipes.md#notification | 新消息、警报 | 钟声般的 FM 合成 |
| 嗖嗖声 | 100–400ms | references/sound-recipes.md#whoosh | 页面过渡、滑动 | 滤波后的噪声扫频 |
| 噗噗声 | 30–80ms | references/sound-recipes.md#pop | 添加项目、气泡、出现 | 正弦波伴随音高下降 |
| 自定义 | 可变 | references/web-audio-api.md | 其他任何情况 | 由构建块组合而成 |
浏览器在用户交互(点击、轻触、按键)之前会阻止音频播放。始终在事件处理程序内部初始化或恢复 AudioContext。references/web-audio-api.md 中的单例模式处理此问题。
exponentialRampToValueAtTime(0, ...) 会抛出错误。始终渐变到 0.001 —— 它听不见但在数学上是有效的。这适用于每个声音。没有例外。
stop() 后自动断开连接——无需手动清理disconnect()0.3(增益值)0.8——切勿超过此值0.03–0.08(几乎察觉不到)在每个声音函数的开头捕获一次 const now = ctx.currentTime。所有调度时间都从 now 派生。切勿多次读取 currentTime。
exponentialRampToValueAtTime 对于音量和频率听起来都很自然。linearRampToValueAtTime 听起来很机械。仅对 50 毫秒以下的过渡使用线性渐变。
适配 assets/sound-preview.html。自包含,无依赖,可在任何浏览器中打开。最适合迭代式的聆听-优化循环。包含 WAV 下载——点击任何声音上的下载按钮即可获取 .wav 文件。声音函数必须使用 (ctx, dest) 参数并带有回退默认值以支持下载,并且每个声音都需要在 durations 映射中有匹配的条目。
// ui-sounds.js
export function playClick(options) { /* ... */ }
export function playSuccess(options) { /* ... */ }
// useUISound.js
export function useUISound() {
const ctxRef = useRef(null);
const getCtx = useCallback(() => { /* singleton */ }, []);
return { playClick, playSuccess, /* ... */ };
}
使用 references/sound-recipes.md 中的 UISoundLibrary 类。捆绑所有声音,包含启用/禁用和主音量控制功能。
web-audio-api.md — 核心 Web Audio API 构建块:振荡器、包络、滤波器、噪声、FM 合成、工厂模式、常见错误。在构建自定义声音或理解底层机制时加载。sound-recipes.md — 所有 9 种声音类别的完整工作实现,外加一个捆绑的 UISoundLibrary 类。每个配方都包含参数、代码、调谐指南和变体。对于大多数请求,请从这里开始。audio-rules.md — 带有 ID、优先级和通过/失败示例的正式验证规则。在审查现有代码或需要根据最佳实践验证生成输出时加载。tone-js.md — 用于快速原型制作的 Tone.js 抽象。简化的合成器类型、等效配方、效果以及到原生 Web Audio 的转换指南。当用户偏好 Tone.js 或希望快速迭代时加载。sound-preview.html — 自包含的 HTML 模板,包含所有 10 种默认声音、视觉反馈和 AudioContext 处理。为每个预览输出适配此模板。每周安装数
70
代码仓库
GitHub 星标数
28
首次出现
2026年2月22日
安全审计
安装于
codex69
kimi-cli69
gemini-cli69
cursor69
opencode69
amp69
▁ ▃ ▅ ▇ ▅ ▃ ▁ ▁ ▃ ▅ ▇ ▅ ▃ ▁ ▁ ▃ ▅ ▇ ▅ ▃ ▁ ██╗ ██╗██╗ ███████╗ ██████╗ ██╗ ██╗███╗ ██╗██████╗ ██║ ██║██║ ██╔════╝██╔═══██╗██║ ██║████╗ ██║██╔══██╗ ██║ ██║██║ ███████╗██║ ██║██║ ██║██╔██╗ ██║██║ ██║ ██║ ██║██║ ╚════██║██║ ██║██║ ██║██║╚██╗██║██║ ██║ ╚██████╔╝██║ ███████║╚██████╔╝╚██████╔╝██║ ╚████║██████╔╝ ╚═════╝ ╚═╝ ╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝╚═════╝ ░ ▒ ▓ █ ▓ ▒ ░ ░ ▒ ▓ █ ▓ ▒ ░ ░ ▒ ▓ █ ▓ ▒ ░ ██████╗ ███████╗███████╗██╗ ██████╗ ███╗ ██╗ ██╔══██╗██╔════╝██╔════╝██║██╔════╝ ████╗ ██║ ██║ ██║█████╗ ███████╗██║██║ ███╗██╔██╗ ██║ ██║ ██║██╔══╝ ╚════██║██║██║ ██║██║╚██╗██║ ██████╔╝███████╗███████║██║╚██████╔╝██║ ╚████║ ╚═════╝ ╚══════╝╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ▇ ▅ ▃ ▁ ▃ ▅ ▇ ▇ ▅ ▃ ▁ ▃ ▅ ▇ ▇ ▅ ▃ ▁ ▃ ▅ ▇
Describe what your UI should sound like. Preview it, tweak it, and download it from the browser.
Translate plain-English sound descriptions into working Web Audio API code. No audio engineering background needed — describe what you want to hear, and this skill provides the synthesis knowledge to make it real.
Every sound follows this loop: Describe → Generate → Listen → Refine (with optional Review for auditing existing code)
The user describes the sound in plain language. Ask clarifying questions using this framework:
Four questions before generating any sound:
If the user gives a vague request like "make a click sound", use sensible defaults from the recipes and generate immediately — don't over-ask.
references/sound-recipes.mdreferences/web-audio-api.mdassets/sound-preview.html), or ES module / React hook / class if requestedProvide the HTML preview file so the user can open it in a browser and hear the sound immediately. Each sound includes a download button that exports a .wav file for use in production code or handoff to developers. Include labeled buttons for each sound variation. The preview must:
When the user gives feedback, translate it using the vocabulary bridge and adjust parameters. Common refinement patterns:
Enter review mode when the user says "review", "audit", or "check my sound code", or pastes existing Web Audio code for evaluation.
Steps:
references/audio-rules.mdaudio-rules.md — one line per violation with file:line — [rule-id] descriptionWhen to stay in generate mode: If the user's request is ambiguous (e.g., "here's my click sound" without asking for review), default to the generative workflow. Only enter review mode when the intent to audit is clear.
This is the core translation layer. When the user uses subjective language, map it to synthesis parameters:
| User Says | Parameter Change | Example |
|---|---|---|
| "Brighter" | Raise frequency or filter cutoff | Filter cutoff 1500 → 3000 Hz |
| "Warmer" | Lower filter cutoff, use sine/triangle wave | Switch sawtooth → sine, cutoff 3000 → 1200 |
| "Darker" | Lower frequency, reduce high harmonics | Add lowpass filter at 800 Hz |
| "Snappier" | Shorter attack and decay | Decay 0.15 → 0.05s |
| "Softer" | Lower volume, longer attack, gentle envelope | Volume 0.3 → 0.15, attack 0 → 0.01s |
| "Louder" / "More prominent" | Raise volume (max 0.8) | Volume 0.2 → 0.4 |
| "Fuller" / "Richer" | Layer oscillators, add detune | Add second osc detuned +7 cents |
| "Thinner" | Remove layers, use sine wave, raise highpass | Single sine, highpass at 500 Hz |
| "More metallic" |
| Category | Duration | Recipe | Trigger | Key Character |
|---|---|---|---|---|
| Click | 10–80ms | references/sound-recipes.md#click | Button press, tap | Noise burst, bandpass filtered |
| Toggle | 80–200ms | references/sound-recipes.md#toggle | Switch on/off | Rising/falling pitch sweep |
| Hover | 30–80ms | references/sound-recipes.md#hover | Mouse enter | Gentle, nearly subliminal |
| Success | 200–500ms |
Browsers block audio until a user interaction (click, tap, keydown). Always initialize or resume the AudioContext inside an event handler. The singleton pattern in references/web-audio-api.md handles this.
exponentialRampToValueAtTime(0, ...) throws an error. Always ramp to 0.001 — it's inaudible but mathematically valid. This applies to every sound. No exceptions.
stop() — no manual cleanup neededdisconnect() when done0.3 (gain value)0.8 — never exceed this0.03–0.08 (barely perceptible)Capture const now = ctx.currentTime once at the start of each sound function. Derive all scheduling times from now. Never read currentTime multiple times.
exponentialRampToValueAtTime sounds natural for both volume and frequency. linearRampToValueAtTime sounds mechanical. Only use linear for sub-50ms transitions.
Adapt assets/sound-preview.html. Self-contained, no dependencies, opens in any browser. Best for the iterative listen-refine loop. Includes WAV download — click the download button on any sound to get a .wav file. Sound functions must use (ctx, dest) parameters with fallback defaults for download support, and each sound needs a matching entry in the durations map.
// ui-sounds.js
export function playClick(options) { /* ... */ }
export function playSuccess(options) { /* ... */ }
// useUISound.js
export function useUISound() {
const ctxRef = useRef(null);
const getCtx = useCallback(() => { /* singleton */ }, []);
return { playClick, playSuccess, /* ... */ };
}
Use the UISoundLibrary class from references/sound-recipes.md. Bundles all sounds with enable/disable and master volume control.
web-audio-api.md — Core Web Audio API building blocks: oscillators, envelopes, filters, noise, FM synthesis, factory patterns, common mistakes. Load when building custom sounds or understanding low-level mechanics.sound-recipes.md — Complete working implementations for all 9 sound categories plus a bundled UISoundLibrary class. Each recipe includes parameters, code, tuning guide, and variations. Start here for most requests.audio-rules.md — Formal validation rules with IDs, priorities, and pass/fail examples. Load when reviewing existing code or when you need to verify generated output against best practices.tone-js.md — Tone.js abstractions for faster prototyping. Simplified synth types, recipe equivalents, effects, and a conversion guide to vanilla Web Audio. Load when the user prefers Tone.js or wants rapid iteration.sound-preview.html — Self-contained HTML template with all 10 default sounds, visual feedback, and AudioContext handling. Adapt this for every preview output.Weekly Installs
70
Repository
GitHub Stars
28
First Seen
Feb 22, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex69
kimi-cli69
gemini-cli69
cursor69
opencode69
amp69
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
123,700 周安装
前端设计技能:创建独特、生产级UI界面,告别AI生成美学,实现创意前端开发
103 周安装
Swift Testing 框架指南:现代测试、迁移、F.I.R.S.T.原则与 Arrange-Act-Assert 模式
101 周安装
统一项目脚手架工具:AI优先开发、NestJS后端、NextJS前端、Expo移动端、Plasmo扩展
103 周安装
多智能体架构模式详解:解决AI上下文限制,提升复杂任务处理能力
102 周安装
Play.fun 游戏集成技能 - 官方API、SDK与部署指南 | OpusGameLabs
102 周安装
Inertia Rails 控制器使用指南:服务器端模式与属性优化技巧
102 周安装
| FM synthesis, inharmonic ratios |
| Mod ratio 1.4, increase mod depth |
| "More organic" / "Natural" | Use noise components, subtle randomness | Mix in filtered noise burst |
| "Shorter" / "Crisper" | Reduce total duration | Duration 0.15 → 0.06s |
| "Longer" / "More sustained" | Increase duration and sustain | Duration 0.1 → 0.3s, add sustain phase |
| "More playful" | Higher pitch, bounce/overshoot | Frequency +200 Hz, add pitch overshoot |
| "More professional" | Subtle, clean, minimal | Lower volume, sine wave, short duration |
| "Retro" / "8-bit" | Square wave, quantized pitch | Switch to square, use note frequencies |
| "Bubbly" | Rapid pitch drop, sine wave | startFreq 2000, quick exponential drop |
references/sound-recipes.md#success |
| Task complete, save |
| Ascending major third |
| Error | 150–400ms | references/sound-recipes.md#error | Validation fail, rejected | Descending, buzzy |
| Warning | 150–350ms | references/sound-recipes.md#warning | Caution state | Double pulse, mid-range |
| Notification | 200–800ms | references/sound-recipes.md#notification | New message, alert | Bell-like FM synthesis |
| Whoosh | 100–400ms | references/sound-recipes.md#whoosh | Page transition, slide | Filtered noise sweep |
| Pop | 30–80ms | references/sound-recipes.md#pop | Add item, bubble, appear | Sine with pitch drop |
| Custom | varies | references/web-audio-api.md | Anything else | Compose from building blocks |