Agent设计
- 作者仓库星标 263
- 作者更新于 实时读取
- 作者仓库 audio-plugin-coder
- 领域
- 设计与多媒体
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @Noizefield · 未声明 license
- Token 消耗评级
- 中等消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- Windows
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: skill_design
description: Create the Visual Interface for audio plugins. Use when user mentions UI design, mockup, WebView…
category: 设计与多媒体
runtime: 无特殊运行时
---
# skill_design 输出预览
## PART A: 任务判断
- 适用问题:视觉内容、演示材料、信息图或设计交付。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“🎨 PHASE 0: DESIGN LIBRARY CHECK / 📋 PHASE 1: REQUIREMENTS GATHERING / Tier 1 - Critical (always ask if missing):”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于视觉内容、演示材料、信息图或设计交付,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“🎨 PHASE 0: DESIGN LIBRARY CHECK / 📋 PHASE 1: REQUIREMENTS GATHERING / Tier 1 - Critical (always ask if missing):”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文出现了 `/impl` 这类斜杠命令;如果你的 Agent 支持命令触发,优先用命令开场,再补充目标和边界。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令。
先用一个小任务确认它会围绕“🎨 PHASE 0: DESIGN LIBRARY CHECK / 📋 PHASE 1: REQUIREMENTS GATHERING / Tier 1 - Critical (always ask if missing):”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: skill_design
description: Create the Visual Interface for audio plugins. Use when user mentions UI design, mockup, WebView…
category: 设计与多媒体
source: Noizefield/audio-plugin-coder
---
# skill_design
## 什么时候使用
- 把设计与视觉方向的常用动作沉淀成 Agent 可调用的技能 适合处理界面、视觉、封面、信息图或演示材料交付,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的步骤…
- 面向视觉内容、演示材料、信息图或设计交付,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「🎨 PHASE 0: DESIGN LIBRARY CHECK / 📋 PHASE 1: REQUIREMENTS GATHERING / Tier 1 - Critical (always ask if missing):」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "skill_design" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> 🎨 PHASE 0: DESIGN LIBRARY CHECK / 📋 PHASE 1: REQUIREMENTS GATHERING / Tier 1 - Critical (always ask if missing):
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件、执行终端命令 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} SKILL: GUI DESIGN
Goal: Create the Visual Interface for audio plugins.
Output Location: plugins/[Name]/Design/ and Source/
🎨 PHASE 0: DESIGN LIBRARY CHECK
Check if design_library/manifest.json exists and count available designs.
Import state management:
# Import state management module
. "$PSScriptRoot\..\scripts\state-management.ps1"
Validate prerequisites:
# Check that planning phase is complete and framework is selected
if (-not (Test-PluginState -PluginPath "plugins\[Name]" -RequiredPhase "plan_complete" -RequiredFiles @(".ideas/architecture.md", ".ideas/plan.md"))) {
Write-Error "Prerequisites not met. Complete planning phase first with framework selection."
exit 1
}
# Get current state to check framework
$state = Get-PluginState -PluginPath "plugins\[Name]"
if ($state.ui_framework -eq "pending") {
Write-Error "UI framework not selected. Complete planning phase first."
exit 1
}
If designs exist, present menu:
Found {N} saved designs in library.
How would you like to start?
1. Use existing design - Apply saved visual style
2. Start from scratch - Create custom design
3. Browse library - View all designs first
Choose (1-3): _
Routing:
- Option 1: Show designs with previews, let user pick, skip to Phase 2 with applied style
- Option 2: Continue to Phase 1 (requirements gathering)
- Option 3: List all designs with metadata, return to menu
If no designs: Skip to Phase 1.
🎨 PHASE 0: DESIGN LIBRARY CHECK
Check for existing designs first:
# Check if design library exists
$manifestPath = "design_library/manifest.json"
if (Test-Path $manifestPath) {
$manifest = Get-Content $manifestPath | ConvertFrom-Json
$designCount = $manifest.totalDesigns
Write-Host "Found $designCount saved designs in library." -ForegroundColor Cyan
Write-Host ""
# Present menu
Write-Host "How would you like to start?" -ForegroundColor Yellow
Write-Host "1. Use existing design - Apply saved visual style"
Write-Host "2. Start from scratch - Create custom design"
Write-Host "3. Browse library - View all designs first"
Write-Host ""
$choice = Read-Host "Choose (1-3)"
switch ($choice) {
"1" {
# Show available designs and let user pick
Show-DesignLibrary -Manifest $manifest
$selectedDesign = Read-Host "Enter design ID to use"
# Apply selected design as v1
Apply-DesignFromLibrary -DesignId $selectedDesign
# Skip to Phase 2 with applied design
}
"2" {
# Continue to Phase 1 (requirements gathering)
}
"3" {
# List all designs with details
Show-DesignLibrary -Manifest $manifest -Detailed
# Return to menu
# (Loop back to choice prompt)
}
}
} else {
Write-Host "No design library found. Starting from scratch." -ForegroundColor Yellow
# Continue to Phase 1
}
Design Library Integration:
- If user chooses existing design: Apply it as the starting point, still allow iteration
- If user chooses from scratch: Continue to Phase 1
- Browse option: Show metadata without committing to use
📋 PHASE 1: REQUIREMENTS GATHERING
Do NOT write code yet. Gather requirements through focused questions.
Exception: For Visage only, a preview scaffold may be generated after Phase 2 if the user approves.
Tier 1 - Critical (always ask if missing):
- Style Direction: Cyberpunk? Analog hardware? Minimal modern? Skeuomorphic?
- Primary Layout: Big central knob? Horizontal strip? Vertical rack? Multi-section?
- Control Count: How many knobs/sliders/buttons? (affects spacing)
- Window Size: Compact (400x300)? Standard (600x400)? Large (800x600)?
Tier 2 - Visual (ask if Tier 1 complete):
- Color Palette: Primary accent color? Dark/light theme?
- Control Style: Rotary knobs? Linear sliders? Toggles? Mix?
- Metering: VU meters? LED indicators? Waveform display?
Tier 3 - Polish (ask last):
- Branding: Logo placement? Plugin name display?
- Special Features: Preset browser? Analyzer? Custom graphics?
Helper Functions for Design Library:
function Show-DesignLibrary {
param($Manifest, [switch]$Detailed)
Write-Host "Available Designs:" -ForegroundColor Cyan
Write-Host ("=" * 50) -ForegroundColor Cyan
foreach ($design in $Manifest.designs) {
Write-Host "$($design.id)" -ForegroundColor Green
Write-Host " Name: $($design.name)"
Write-Host " Style: $($design.vibe)"
Write-Host " Best for: $($design.bestFor -join ', ')"
if ($Detailed) {
Write-Host " Colors: $($design.colors.primary) (primary), $($design.colors.accent) (accent)"
Write-Host " Supports: $($design.supports.webview ? 'WebView' : ''), $($design.supports.visage ? 'Visage' : '')"
Write-Host " Usage: $($design.usageCount) times"
Write-Host ""
}
}
}
function Apply-DesignFromLibrary {
param($DesignId)
$manifest = Get-Content "design_library/manifest.json" | ConvertFrom-Json
$design = $manifest.designs | Where-Object { $_.id -eq $DesignId }
if ($design) {
Write-Host "Applying design: $($design.name)" -ForegroundColor Green
# Copy design files as v1 starting point
$designPath = "design_library/$($design.path)"
# Copy preview.html as v1-test.html (WebView only)
$state = Get-PluginState -PluginPath "plugins/[$PluginName]"
if ($state.ui_framework -eq "webview") {
Copy-Item "$designPath/preview.html" "plugins/[$PluginName]/Design/v1-test.html"
}
# Generate v1-ui-spec.md based on design metadata
$specContent = @"
# UI Specification v1 (Based on $($design.name))
## Design Source
- **Library Design:** $($design.name)
- **ID:** $($design.id)
- **Style:** $($design.vibe)
## Layout
[Layout details from design]
## Colors
- Primary: $($design.colors.primary)
- Accent: $($design.colors.accent)
- Background: $($design.colors.background)
## Controls
[Control specifications based on design]
"@
$specContent | Out-File "plugins/[$PluginName]/Design/v1-ui-spec.md"
# Generate v1-style-guide.md
$styleContent = @"
# Style Guide v1 (Based on $($design.name))
## Color Palette
- **Primary:** $($design.colors.primary)
- **Accent:** $($design.colors.accent)
- **Background:** $($design.colors.background)
## Typography
[Typography details]
## Visual Style
- **Theme:** $($design.vibe)
- **Best for:** $($design.bestFor -join ', ')
"@
$styleContent | Out-File "plugins/[$PluginName]/Design/v1-style-guide.md"
Write-Host "Design applied as v1. You can now iterate on this foundation." -ForegroundColor Green
} else {
Write-Error "Design '$DesignId' not found in library."
}
}
Rules:
- Ask max 4 questions at once using
AskUserQuestiontool - Check creative brief first (if exists) - extract known requirements
- Calculate recommended window size before asking (based on control count)
- Present decision gate after each batch: Finalize / Ask more / Add context
🎨 PHASE 2: MOCKUP GENERATION
Create design specification files (all frameworks):
plugins/[Name]/Design/v1-ui-spec.md- Structured design plan:
# UI Specification v1
## Layout
- Window: [width]x[height]px
- Sections: [list sections]
- Grid: [describe layout structure]
## Controls
| Parameter | Type | Position | Range | Default |
|-----------|------|----------|-------|---------|
| ... | ... | ... | ... | ... |
## Color Palette
- Background: #______
- Primary: #______
- Accent: #______
- Text: #______
## Style Notes
[Key visual decisions, inspirations, constraints]
plugins/[Name]/Design/v1-style-guide.md- Visual reference:- Hex codes for all colors
- Font choices and sizes
- Spacing/padding rules
- Control visual styles
- Example UI state descriptions
Framework-specific preview artifacts:
If ui_framework == webview
Generate plugins/[Name]/Design/v1-test.html - WORKING HTML PREVIEW:
CRITICAL: For WebView framework, this HTML MUST be production-ready with proper JUCE integration.
Required structure:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>[Name] Plugin</title>
<script type="module" src="js/index.js"></script>
<style>
/* Complete CSS based on style guide */
:root {
--primary: [color from style guide];
--accent: [color from style guide];
--background: [color from style guide];
}
body {
background: var(--background);
color: var(--primary);
font-family: [font from style guide];
margin: 0;
padding: [padding from style guide];
width: [width]px;
height: [height]px;
overflow: hidden;
}
/* All UI component styles */
</style>
</head>
<body>
<!-- Complete HTML structure matching UI spec -->
<div id="plugin-ui">
<!-- Controls with proper IDs matching parameter IDs -->
<div class="control" id="[PARAMETER_ID]-control">
<div class="knob" id="[PARAMETER_ID]-knob"></div>
<div class="label">[Parameter Name]</div>
<div class="value" id="[PARAMETER_ID]-value">[Default Value]</div>
</div>
<!-- Repeat for all controls -->
</div>
</body>
</html>
JavaScript placeholder (for preview only):
// This is a placeholder for preview - actual implementation goes in Source/ui/public/js/index.js
document.addEventListener("DOMContentLoaded", () => {
console.log("Preview mode - UI structure loaded");
// Preview-only code here
});
For WebView plugins: The HTML in v1-test.html should be identical to what will be in Source/ui/public/index.html (minus the preview JavaScript).
CRITICAL WebView Requirements:
- HTML must use
<script type="module">for JavaScript imports - All element IDs must match parameter IDs from
parameter-spec.md - CSS must be complete and production-ready (embedded in
<style>tag) - HTML structure must match the approved design exactly
- No external dependencies (all assets embedded or served via resource provider)
If ui_framework == visage
Do NOT generate HTML. Instead, offer a Visage preview scaffold (default Yes):
Ask:
Generate a Visage preview scaffold now? (Y/n)
Default: Yes (generate unless user explicitly says no).
If yes, generate:
plugins/[Name]/Source/VisageControls.husingtemplates/visage/VisageControls.h.templateplugins/[Name]/Source/PluginEditor.handPluginEditor.cppusingtemplates/visage/
These files are preview-only and will be refined during /impl.
Present decision menu:
🎨 Design specification v1 created
Files:
- plugins/[Name]/Design/v1-ui-spec.md
- plugins/[Name]/Design/v1-style-guide.md
- WebView: plugins/[Name]/Design/v1-test.html (preview in browser)
- Visage: Source/VisageControls.h + PluginEditor.* (preview via preview-design.ps1)
⚠️ STOP HERE - Do NOT create Source/ files yet!
What would you like to do?
1. Iterate - Refine layout or style (creates v2)
2 Implement - Generate production code in Source/
3. Save as template - Add to design library
4. Preview - WebView: open v1-test.html in browser; Visage: run preview-design.ps1
Choose (1-4): _
Routing:
- Option 1: Collect feedback, create v2 specs and v2-test.html, return to this menu
- Option 2: Mark design as approved and complete Design phase, suggest starting Implementation phase
- Option 3: Save to design_library/, return to menu
- Option 4: Open v1-test.html or run Visage preview, return to menu
After design approval (Option 2):
# Mark design phase complete
Complete-Phase -PluginPath "plugins\[Name]" -Phase "design" -Updates @{
"validation.design_complete" = $true
}
Write-Host "Design phase complete! Ready for implementation."
Write-Host "Run /impl [Name] to start building the plugin."
✅ PHASE 4: COMPLETION
- Commit files to git
- Update
plugins/[Name]/.ideas/todo.md- Check off GUI tasks - Update
PLUGINS.md- Mark design stage complete
Present instructions:
GUI files generated and committed!
Next steps:
- Preview Visage: powershell -ExecutionPolicy Bypass -File .\scripts\preview-design.ps1 -PluginName [Name]
- Preview WebView: Open plugins/[Name]/Design/index.html in browser
- Build: Follow standard build process
Files created:
[list generated files]
STOP HERE. Let user test before proceeding.
🔄 VERSIONING SYSTEM
- Each iteration creates new version: v1, v2, v3...
- All files prefixed with version:
v2-ui-spec.md,v2-PluginEditor.h - Keep all versions for comparison
- Latest version used for build unless specified
📚 INTEGRATION
Invoked by:
- Natural language: "Design UI for [Name]", "Create GUI mockup"
- After creative brief in plugin workflow
- During plugin redesign
Creates:
- Design specs:
plugins/[Name]/Design/v[N]-*.md - Source code:
Source/PluginEditor.{h,cpp} - Optional:
Source/VisageControls.h,v[N]-ui.html
Updates:
PLUGINS.md- Design statusplugins/[Name]/.ideas/todo.md- Task completion
⚠️ CRITICAL RULES
- Never write code before gathering requirements - Always complete Phase 1 first
- Respect the decision gates - Wait for user approval at each menu
- One phase at a time - Don't skip ahead
- Version everything - Never overwrite previous iterations
- Check design library first - Reuse before creating
- Commit after each phase - Preserve progress
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核