一键导入
svelte-frontend
Svelte coding guidelines for the Windmill frontend. MUST use when writing or modifying code in the frontend directory.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Svelte coding guidelines for the Windmill frontend. MUST use when writing or modifying code in the frontend directory.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
MUST use when writing Bun/TypeScript scripts.
MUST use when writing Bun Native scripts. The script must start with //native to run on the native worker.
MUST use when writing Deno/TypeScript scripts.
MUST use when writing Python scripts.
MUST use when writing Ansible playbooks.
MUST use when using the CLI, including debugging job failures and inspecting run history via `wmill job`.
| name | svelte-frontend |
| description | Svelte coding guidelines for the Windmill frontend. MUST use when writing or modifying code in the frontend directory. |
Apply these Windmill-specific patterns when writing Svelte code in frontend/. For general Svelte 5 syntax (runes, snippets, event handling), use the Svelte MCP server.
Always use Windmill's design-system components. Never use raw HTML elements.
<Button><script>
import { Button } from '$lib/components/common'
import { ChevronLeft } from 'lucide-svelte'
</script>
<Button variant="default" onclick={handleClick}>Label</Button>
<Button startIcon={{ icon: ChevronLeft }} iconOnly onclick={prev} />
Props: variant?: 'accent' | 'accent-secondary' | 'default' | 'subtle', unifiedSize?: 'sm' | 'md' | 'lg', startIcon?: { icon: SvelteComponent }, iconOnly?: boolean, disabled?: boolean
<TextInput><script>
import { TextInput } from '$lib/components/common'
</script>
<TextInput bind:value={val} placeholder="Enter value" />
Props: value?: string | number (bindable), placeholder?: string, disabled?: boolean, error?: string | boolean, size?: 'sm' | 'md' | 'lg'
<Select><script>
import Select from '$lib/components/select/Select.svelte'
</script>
<Select items={[{ label: 'Jan', value: 1 }]} bind:value={selected} />
Props: items?: Array<{ label?: string; value: any }>, value (bindable), placeholder?: string, clearable?: boolean, size?: 'sm' | 'md' | 'lg'
lucide-svelteNever write inline SVGs. Import from lucide-svelte:
<script>
import { ChevronLeft, X } from 'lucide-svelte'
</script>
<ChevronLeft size={16} />
Form components (TextInput, Toggle, Select, etc.) should use the unified size system when placed together.
frontend/brand-guidelines.md)Use the Svelte MCP tools when working on Svelte code: