Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计未展示

ux%3aprototypeux%3a 原型

Agent Skill

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

总安装

282

周安装

12

GitHub Stars

公开资料未说明

下载量

99
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:ux%3aprototype(ux%3a 原型)
来源仓库:https://github.com/cloudvoyant/codevoyant
仓库路径:skills/ux%3Aprototype
安装命令:
npx skills add https://github.com/cloudvoyant/codevoyant --skill ux:prototype
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/cloudvoyant/codevoyant --skill ux:prototype

简介

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。

  • 使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。
  • 适用于原型设计与前端实现支持。
  • 需在实际环境中验证交互效果。
  • ux%3aprototype 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Compatibility: If AskUserQuestion is unavailable, present options as a numbered list and wait for the user's reply. If Task is unavailable, run parallel steps sequentially. The context: fork and agent: frontmatter fields are Claude Code-specific — on OpenCode and VS Code Copilot they are ignored and the skill runs inline using the current model.

Scaffold a production-quality SvelteKit prototype with feature-slice architecture, shadcn-svelte components, zod validation, fake auth, and a consistent factory pattern.

Critical Principles

  1. A prototype that only works with perfect data is a lie. Every component that receives data must render a loading skeleton, an error message, and an empty state — not just the list of items.
  2. If it's not in the README, the reviewer will guess. Each feature README must document the public API (props and events the feature exposes outward), not just the component tree.
  3. Fake data is still data. Hard-coded factories must use realistic names, plausible lengths, and diverse content — placeholder text trains reviewers to ignore details that matter.

Step 0: Parse Args

PROTOTYPE_NAME = first non-flag argument
PROTOTYPE_SLUG = slugified PROTOTYPE_NAME (lowercase, hyphens, no special chars)
BG_MODE        = true if --bg present
SILENT         = true if --silent present

If PROTOTYPE_NAME is absent, ask: "What are we prototyping?"

Slugify: lowercase, replace spaces/underscores with hyphens, strip non-alphanumeric-hyphen chars, collapse consecutive hyphens.

Step 1: Choose Location

Use AskUserQuestion:

question: "Where should the prototype live?"
header: "Location"
multiSelect: false
options:
  - label: "In-repo -- single package"
    description: "prototypes/{PROTOTYPE_SLUG}/ at project root -- works when there's one prototype"
  - label: "In-repo -- monorepo (pnpm workspaces)"
    description: "Add as a workspace package; all prototypes share root node_modules"
  - label: "Outside repo"
    description: ".codevoyant/[project]/prototypes/{PROTOTYPE_SLUG}/ -- isolated from main codebase"

Derive PROTOTYPE_DIR from the answer:

  • Single package: prototypes/{PROTOTYPE_SLUG}/
  • Monorepo: prototypes/{PROTOTYPE_SLUG}/ -- additionally, if pnpm-workspace.yaml does not already include prototypes/*, add it to the workspace packages list.
  • Outside repo: .codevoyant/{PROJECT_SLUG}/prototypes/{PROTOTYPE_SLUG}/ where PROJECT_SLUG is derived from the current project's directory name.

Record the prototype in codevoyant.json (create if it doesn't exist):

{
  "prototypes": [
    {
      "name": "PROTOTYPE_SLUG",
      "path": "PROTOTYPE_DIR",
      "location": "in-repo|out-of-repo",
      "created": "TIMESTAMP"
    }
  ]
}

See references/utils.md for the codevoyant.json read/write pattern.

Step 2: Gather Style Direction

If the user has not already described style inspiration, use AskUserQuestion:

question: "What's the visual style direction for this prototype?"
header: "Style"
multiSelect: false
options:
  - label: "Describe my own direction"
    description: "Free text -- I'll describe the aesthetic"
  - label: "Linear / Vercel"
    description: "Dark, minimal, sharp, monospace accents"
  - label: "Notion / Craft"
    description: "Clean, off-white, rounded, document-like"
  - label: "Stripe / Resend"
    description: "Light, professional, subtle gradients, trustworthy"
  - label: "Shadcn default"
    description: "Neutral, clean slate -- I'll customize later"

Store the result as STYLE_DIRECTION. This informs color palette, border-radius, and font choices in Step 6.

If user selects "Describe my own direction", ask them to describe the aesthetic in free text.

Step 3: Gather Feature List

Ask: "What features should this prototype include? List them (e.g. auth, dashboard, settings, blog)."

Parse the response into FEATURES[] -- slugify each feature name. These become the feature-slice directories.

Example: "auth, dashboard, settings" becomes ["auth", "dashboard", "settings"].

Step 4: Scaffold SvelteKit

Follow references/sveltekit-setup-guide.md for the complete setup procedure.

cd {parent of PROTOTYPE_DIR}
npx sv create {PROTOTYPE_SLUG} --template minimal --types ts --no-add-ons

Install dependencies:

cd {PROTOTYPE_DIR}
pnpm install

Install Tailwind:

pnpm dlx sv add tailwindcss

Install shadcn-svelte:

pnpm dlx shadcn-svelte@latest init

Accept defaults for shadcn-svelte init. This creates src/lib/components/ui/ and components.json.

Install zod:

pnpm add zod

Step 5: Set Up Feature-Slice Structure

Follow references/feature-slice-pattern.md for the full specification.

Create the directory structure:

mkdir -p src/app
mkdir -p src/libs/layout
mkdir -p src/libs/ui
mkdir -p src/libs/factories
mkdir -p src/libs/validators
for FEATURE in "${FEATURES[@]}"; do
  mkdir -p "src/libs/features/feature-${FEATURE}/{components,view-models,state,actions}"
done

Create barrel files (index.ts) for each feature and each shared lib directory. Each barrel file exports nothing initially -- it's a placeholder for the public API.

Update svelte.config.js to add path aliases:

alias: {
  '$app': './src/app',
  '$libs': './src/libs',
  '$features': './src/libs/features',
  '$ui': './src/libs/ui',
  '$layout': './src/libs/layout',
  '$factories': './src/libs/factories',
  '$validators': './src/libs/validators',
}

Create a README.md for each feature following the template in references/feature-slice-pattern.md.

Step 6: Configure Theme

Apply theme based on STYLE_DIRECTION. Edit src/app.css to set CSS custom properties:

  • --color-primary, --color-background, --color-foreground, --color-muted, --color-accent, --color-border
  • --radius (border-radius scale)
  • Font family (use a Google Font if appropriate; load via src/app.html <link> tag)

Configure Tailwind to reference CSS custom properties so utility classes use the theme.

Follow the theming approach in references/sveltekit-setup-guide.md.

Style presets

  • Linear / Vercel: Dark background (#0a0a0a), sharp corners (radius: 0.25rem), monospace accents (JetBrains Mono), high-contrast text
  • Notion / Craft: Off-white (#fafafa), generous radius (0.75rem), serif or clean sans-serif (Inter), muted borders
  • Stripe / Resend: Light (#ffffff), medium radius (0.5rem), professional sans-serif (Inter), subtle gradients and shadows
  • Shadcn default: Use shadcn-svelte's default theme as-is

Step 7: Implement Layout First

Before any feature, implement the responsive layout system:

  • src/libs/layout/Container.svelte -- max-width wrapper with responsive padding
  • src/libs/layout/Stack.svelte -- vertical flex with configurable gap
  • src/libs/layout/Grid.svelte -- responsive CSS grid
  • src/libs/layout/Sidebar.svelte -- collapsible sidebar (if appropriate for the prototype)
  • src/libs/layout/index.ts -- barrel file exporting all layout components

Then implement the root layout and error page:

  • src/app/+layout.svelte -- root layout using layout lib components
  • src/app/+error.svelte -- styled error page

Layout must be responsive from the start. Use Tailwind responsive prefixes (sm:, md:, lg:).

Follow references/feature-slice-pattern.md for layout lib conventions.

Step 8: Implement Features

For each feature in FEATURES[], in order:

  1. Scaffold feature skeleton -- ensure components/, view-models/, state/, actions/, index.ts, README.md all exist
  2. Write view-model factory in src/libs/factories/{feature}.ts following references/factory-patterns.md
  3. Write hard-coded data -- inline in the feature's state/ directory or as a mock data file. All mock data must be typed via the entity's zod schema -- no any.
  4. Implement routes:

- src/routes/{feature}/+page.server.ts -- loads data, runs through factory, returns view model - src/routes/{feature}/+page.svelte -- pure UI, receives view model as prop

  1. Use shadcn-svelte components for all UI elements. Install as needed: pnpm dlx shadcn-svelte@latest add {component}
  2. Fake auth (if auth is in FEATURES): accept any non-empty email + password; store session in a server-side Map; no JWT, no hashing, no database. Provide login/logout routes.

Use Svelte's built-in animation where appropriate (transition:, animate: directives). Do not add third-party animation libraries.

Three-state rule (required for every data-bound component): Every component that receives a list, async result, or fetchable resource must implement all three states using shadcn-svelte primitives:

  • Loading: <Skeleton> with the same layout as the loaded state
  • Error: <Alert variant="destructive"> with the error message and a retry action
  • Empty: purposeful empty state with a call to action (not a blank div)

No component that receives external data is complete until all three states render correctly.

Accessibility baseline (WCAG 2.1 AA — required):

  • Interactive elements: aria-label on icon-only buttons; role on custom interactive elements
  • Images: alt on every <img>; decorative images use alt=""
  • Forms: every <input> and <select> has an associated <label> (via for or wrapping)
  • Color: do not use color as the only indicator of state (add an icon or text label)
  • Focus: all interactive elements must be keyboard-reachable in logical tab order

After each feature: update the feature's README.md with component connections and public API.

Step 9: Validation Pass

cd {PROTOTYPE_DIR}
pnpm run check   # svelte-check
pnpm run build   # ensure no build errors

Fix any type errors or build failures before proceeding.

Before marking the prototype complete, run these checklists:

State audit — for each data-bound component:

  • Loading state renders without errors
  • Error state renders with a descriptive message and retry action
  • Empty state renders with a call to action (not blank)
  • Happy path renders with realistic (non-placeholder) data

Data realism audit:

  • No "Lorem ipsum" or "John Doe" in factory data
  • At least one factory item has a long string value (40+ chars for names, 200+ for descriptions)
  • At least one factory item has a short/minimal value
  • Lists have at least 5 items (enough to test overflow behavior)

Accessibility audit:

  • All icon-only buttons have aria-label
  • All <img> elements have alt
  • All form inputs have associated labels
  • Tab through the prototype — every interactive element is reachable

See references/prototype-quality.md for detailed guidance on each checklist item.

Start the dev server and report the URL:

pnpm run dev

Step 10: Report + Notify

Report to user:

Prototype scaffolded: {PROTOTYPE_DIR}
  Features: {FEATURES joined by ', '}
  Dev server: pnpm run dev (in {PROTOTYPE_DIR})
  Recorded in codevoyant.json

If BG_MODE=true and SILENT=false, send desktop notification:

npx @codevoyant/agent-kit notify --title "ux:prototype complete" --message "Prototype '{PROTOTYPE_SLUG}' ready at {PROTOTYPE_DIR}"

See references/utils.md for the notification pattern.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

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

平台分布

Codex

34.65%
按下载量换算34

Claude

29.43%
按下载量换算29

Cursor

20.33%
按下载量换算20

Gemini CLI

10.39%
按下载量换算10

安全审计

暂无安全审计结果可展示。

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

来源信息

继续浏览同类 Skills