图像设计
- 作者仓库星标 68,946
- 作者更新于 实时读取
- 作者仓库 paperclip
- 领域
- 设计与多媒体
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @paperclipai · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: design-guide
description: > Paperclip's UI is a professional-grade control plane — dense, keyboard-driven, dark-themed by…
category: 设计与多媒体
runtime: 无特殊运行时
---
# design-guide 输出预览
## PART A: 任务判断
- 适用问题:视觉内容、演示材料、信息图或设计交付。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“1. Design Principles / 2. Tech Stack / 3. Design Tokens”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于视觉内容、演示材料、信息图或设计交付,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“1. Design Principles / 2. Tech Stack / 3. Design Tokens”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文出现了 `/design-guide` 这类斜杠命令;如果你的 Agent 支持命令触发,优先用命令开场,再补充目标和边界。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件。
先用一个小任务确认它会围绕“1. Design Principles / 2. Tech Stack / 3. Design Tokens”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: design-guide
description: > Paperclip's UI is a professional-grade control plane — dense, keyboard-driven, dark-themed by…
category: 设计与多媒体
source: paperclipai/paperclip
---
# design-guide
## 什么时候使用
- 把设计与视觉方向的常用动作沉淀成 Agent 可调用的技能 适合处理界面、视觉、封面、信息图或演示材料交付,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的步骤…
- 面向视觉内容、演示材料、信息图或设计交付,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「1. Design Principles / 2. Tech Stack / 3. Design Tokens」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "design-guide" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> 1. Design Principles / 2. Tech Stack / 3. Design Tokens
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Paperclip Design Guide
Paperclip's UI is a professional-grade control plane — dense, keyboard-driven, dark-themed by default. Every pixel earns its place.
Always use with: frontend-design (visual polish) and web-design-guidelines (web best practices).
1. Design Principles
- Dense but scannable. Maximum information without clicks to reveal. Whitespace separates, not pads.
- Keyboard-first. Global shortcuts (Cmd+K, C, [, ]). Power users rarely touch the mouse.
- Contextual, not modal. Inline editing over dialog boxes. Dropdowns over page navigations.
- Dark theme default. Neutral grays (OKLCH), not pure black. Accent colors for status/priority only. Text is the primary visual element.
- Component-driven. Prefer reusable components that capture style conventions. Build at the right abstraction — not too granular, not too monolithic.
2. Tech Stack
- React 19 + TypeScript + Vite
- Tailwind CSS v4 with CSS variables (OKLCH color space)
- shadcn/ui (new-york style, neutral base, CSS variables enabled)
- Radix UI primitives (accessibility, focus management)
- Lucide React icons (16px nav, 14px inline)
- class-variance-authority (CVA) for component variants
- clsx + tailwind-merge via
cn()utility
Config: ui/components.json (aliases: @/components, @/components/ui, @/lib, @/hooks)
3. Design Tokens
All tokens defined as CSS variables in ui/src/index.css. Both light and dark themes use OKLCH.
Colors
Use semantic token names, never raw color values:
| Token | Usage |
|---|---|
--background / --foreground |
Page background and primary text |
--card / --card-foreground |
Card surfaces |
--primary / --primary-foreground |
Primary actions, emphasis |
--secondary / --secondary-foreground |
Secondary surfaces |
--muted / --muted-foreground |
Subdued text, labels |
--accent / --accent-foreground |
Hover states, active nav items |
--destructive |
Destructive actions |
--border |
All borders |
--ring |
Focus rings |
--sidebar-* |
Sidebar-specific variants |
--chart-1 through --chart-5 |
Data visualization |
Radius
Single --radius variable (0.625rem) with derived sizes:
rounded-sm— small inputs, pillsrounded-md— buttons, inputs, small componentsrounded-lg— cards, dialogsrounded-xl— card containers, large componentsrounded-full— badges, avatars, status dots
Shadows
Minimal shadows: shadow-xs (outline buttons), shadow-sm (cards). No heavy shadows.
4. Typography Scale
Use these exact patterns — do not invent new ones:
| Pattern | Classes | Usage |
|---|---|---|
| Page title | text-xl font-bold |
Top of pages |
| Section title | text-lg font-semibold |
Major sections |
| Section heading | text-sm font-semibold text-muted-foreground uppercase tracking-wide |
Section headers in design guide, sidebar |
| Card title | text-sm font-medium or text-sm font-semibold |
Card headers, list item titles |
| Body | text-sm |
Default body text |
| Muted | text-sm text-muted-foreground |
Descriptions, secondary text |
| Tiny label | text-xs text-muted-foreground |
Metadata, timestamps, property labels |
| Mono identifier | text-xs font-mono text-muted-foreground |
Issue keys (PAP-001), CSS vars |
| Large stat | text-2xl font-bold |
Dashboard metric values |
| Code/log | font-mono text-xs |
Log output, code snippets |
5. Status & Priority Systems
Status Colors (consistent across all entities)
Defined in StatusBadge.tsx and StatusIcon.tsx:
| Status | Color | Entity types |
|---|---|---|
| active, achieved, completed, succeeded, approved, done | Green shades | Agents, goals, issues, approvals |
| running | Cyan | Agents |
| paused | Orange | Agents |
| idle, pending | Yellow | Agents, approvals |
| failed, error, rejected, blocked | Red shades | Runs, agents, approvals, issues |
| archived, planned, backlog, cancelled | Neutral gray | Various |
| todo | Blue | Issues |
| in_progress | Indigo | Issues |
| in_review | Violet | Issues |
Priority Icons
Defined in PriorityIcon.tsx: critical (red/AlertTriangle), high (orange/ArrowUp), medium (yellow/Minus), low (blue/ArrowDown).
Agent Status Dots
Inline colored dots: running (cyan, animate-pulse), active (green), paused (yellow), error (red), offline (neutral).
6. Component Hierarchy
Three tiers:
- shadcn/ui primitives (
ui/src/components/ui/) — Button, Card, Input, Badge, Dialog, Tabs, etc. Do not modify these directly; extend via composition. - Custom composites (
ui/src/components/) — StatusBadge, EntityRow, MetricCard, etc. These capture Paperclip-specific design language. - Page components (
ui/src/pages/) — Compose primitives and composites into full views.
See references/component-index.md for the complete component inventory with usage guidance.
When to Create a New Component
Create a reusable component when:
- The same visual pattern appears in 2+ places
- The pattern has interactive behavior (status changing, inline editing)
- The pattern encodes domain logic (status colors, priority icons)
Do NOT create a component for:
- One-off layouts specific to a single page
- Simple className combinations (use Tailwind directly)
- Thin wrappers that add no semantic value
7. Composition Patterns
These patterns describe how components work together. They may not be their own component, but they must be used consistently across the app.
Entity Row with Status + Priority
The standard list item for issues and similar entities:
<EntityRow
leading={<><StatusIcon status="in_progress" /><PriorityIcon priority="high" /></>}
identifier="PAP-001"
title="Implement authentication flow"
subtitle="Assigned to Agent Alpha"
trailing={<StatusBadge status="in_progress" />}
onClick={() => {}}
/>
Leading slot always: StatusIcon first, then PriorityIcon. Trailing slot: StatusBadge or timestamp.
Grouped List
Issues grouped by status header + entity rows:
<div className="flex items-center gap-2 px-4 py-2 bg-muted/50 rounded-t-md">
<StatusIcon status="in_progress" />
<span className="text-sm font-medium">In Progress</span>
<span className="text-xs text-muted-foreground ml-1">2</span>
</div>
<div className="border border-border rounded-b-md">
<EntityRow ... />
<EntityRow ... />
</div>
Property Row
Key-value pairs in properties panels:
<div className="flex items-center justify-between py-1.5">
<span className="text-xs text-muted-foreground">Status</span>
<StatusBadge status="active" />
</div>
Label is always text-xs text-muted-foreground, value on the right. Wrap in a container with space-y-1.
Metric Card Grid
Dashboard metrics in a responsive grid:
<div className="grid md:grid-cols-2 xl:grid-cols-4 gap-4">
<MetricCard icon={Bot} value={12} label="Active Agents" description="+3 this week" />
...
</div>
Progress Bar (Budget)
Color by threshold: green (<60%), yellow (60-85%), red (>85%):
<div className="w-full h-2 bg-muted rounded-full overflow-hidden">
<div className="h-full rounded-full bg-green-400" style={{ width: `${pct}%` }} />
</div>
Comment Thread
Author header (name + timestamp) then body, in bordered cards with space-y-3. Add comment textarea + button below.
Cost Table
Standard <table> with text-xs, header row with bg-accent/20, font-mono for numeric values.
Log Viewer
bg-neutral-950 rounded-lg p-3 font-mono text-xs container. Color lines by level: default (foreground), WARN (yellow-400), ERROR (red-400), SYS (blue-300). Include live indicator dot when streaming.
8. Interactive Patterns
Hover States
- Entity rows:
hover:bg-accent/50 - Nav items:
hover:bg-accent/50 hover:text-accent-foreground - Active nav:
bg-accent text-accent-foreground
Focus
focus-visible:ring-ring focus-visible:ring-[3px] — standard Tailwind focus-visible ring.
Disabled
disabled:opacity-50 disabled:pointer-events-none
Inline Editing
Use InlineEditor component — click text to edit, Enter saves, Escape cancels.
Popover Selectors
StatusIcon and PriorityIcon use Radix Popover for inline selection. Follow this pattern for any clickable property that opens a picker.
9. Layout System
Three-zone layout defined in Layout.tsx:
┌──────────┬──────────────────────────────┬──────────────────────┐
│ Sidebar │ Breadcrumb bar │ │
│ (w-60) ├──────────────────────────────┤ Properties panel │
│ │ Main content (flex-1) │ (w-80, optional) │
└──────────┴──────────────────────────────┴──────────────────────┘
- Sidebar:
w-60, collapsible, contains CompanySwitcher + SidebarSections - Properties panel:
w-80, shown on detail views, hidden on lists - Main content: scrollable,
flex-1
10. The /design-guide Page
Location: ui/src/pages/DesignGuide.tsx
Route: /design-guide
This is the living showcase of every component and pattern in the app. It is the source of truth for how things look.
Rules
- When you add a new reusable component, you MUST add it to the design guide page. Show all variants, sizes, and states.
- When you modify an existing component's API, update its design guide section.
- When you add a new composition pattern, add a section demonstrating it.
- Follow the existing structure:
<Section title="...">wrapper with<SubSection>for grouping. - Keep sections ordered logically: foundational (colors, typography) first, then primitives, then composites, then patterns.
Adding a New Section
<Section title="My New Component">
<SubSection title="Variants">
{/* Show all variants */}
</SubSection>
<SubSection title="Sizes">
{/* Show all sizes */}
</SubSection>
<SubSection title="States">
{/* Show interactive/disabled states */}
</SubSection>
</Section>
11. Component Index
See references/component-index.md for the full component inventory.
When you create a new reusable component:
- Add it to the component index reference file
- Add it to the /design-guide page
- Follow existing naming and file conventions
12. File Conventions
- shadcn primitives:
ui/src/components/ui/{component}.tsx— lowercase, kebab-case - Custom components:
ui/src/components/{ComponentName}.tsx— PascalCase - Pages:
ui/src/pages/{PageName}.tsx— PascalCase - Utilities:
ui/src/lib/{name}.ts - Hooks:
ui/src/hooks/{useName}.ts - API modules:
ui/src/api/{entity}.ts - Context providers:
ui/src/context/{Name}Context.tsx
All components use cn() from @/lib/utils for className merging. All components use CVA for variant definitions when they have multiple visual variants.
13. Common Mistakes to Avoid
- Using raw hex/rgb colors instead of CSS variable tokens
- Creating ad-hoc typography styles instead of using the established scale
- Hardcoding status colors instead of using StatusBadge/StatusIcon
- Building one-off styled elements when a reusable component exists
- Adding components without updating the design guide page
- Using
shadow-mdor heavier — keep shadows minimal (xs, sm only) - Using
rounded-2xlor larger — max isrounded-xl(exceptrounded-fullfor pills) - Forgetting dark mode — always use semantic tokens, never hardcode light/dark values
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核