跳到正文
cccskills
免费在 GitHub 公开中文介绍

design-guide

按照统一的颜色、文字、状态显示和交互规则创建或修改Paperclip界面,同时整理可复用组件、组件目录与示例页面。

原文查看原文说明

Paperclip UI design system guide for building consistent, reusable frontend components. Use when creating new UI components, modifying existing ones, adding pages or features to the frontend, styling UI elements, or when you need to understand the design language and conventions. Covers: component creation, design tokens, typography, status/priority systems, composition patterns, and the /design-guide showcase page. Always use this skill alongside the frontend-design skill (for visual quality) and the web-design-guidelines skill (for web best practices).

AI 评分90分/ 100查看安装方法

适用场景

  • 按现有设计规则添加页面
  • 创建可复用的界面组件
  • 统一状态颜色与优先级图标
  • 更新组件示例与交互状态

中文介绍

功能

design-guide用于按照共同的设计规则创建或修改Paperclip页面与界面组件。可参考的内容包括设计令牌,即颜色、间距等共享设置,以及字号、状态和优先级显示、列表与仪表盘布局。它也涵盖键盘操作、焦点提示和行内编辑,并将新增或修改的组件同步到/design-guide示例页面。

适用场景

适合在Paperclip中添加页面或功能,并希望其外观与操作方式和现有界面保持一致的情况。资料还提供判断标准,帮助决定复用已有组件,还是新建共享组件。整体设计默认采用深色主题,兼顾信息密度与阅读便利性。

使用示例

  • “使用已有界面组件,添加按状态分组的列表页面。”
  • “创建一个共享组件,并补充不同尺寸和状态的示例。”

注意事项

该技能以Paperclip的React 19、TypeScript、Vite、Tailwind CSS v4、shadcn/ui等技术配置为前提,并要求配合frontend-design和web-design-guidelines使用。添加可复用组件时,还需要更新组件目录和示例页面。

本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。

客观评估

AI 仅根据 SKILL.md 的内容,从 4 个方面进行了评估。星标数和热度不计入评估。

指令清晰度能否看出何时使用、做什么
A良好明确列出组件创建、修改和页面添加等场景,并说明应遵循的设计规则。
步骤具体性步骤、输入输出和示例是否具体
A良好提供具体的设计令牌、文字样式类、状态颜色、组件层级和组合示例。
安全性发送数据、删除文件、执行命令等是否有说明
A良好所给片段没有发送或删除指令,并禁止直接修改基础组件。
安装难易度所需工具和 API 密钥是否少且有说明
B部分不足列出了技术配置和配套技能,但没有安装步骤。

总分按每项 A=25 分、B=15 分、C=5 分相加。 由 AI(OpenAI Codex)于 2026年10月20日 评估。仅供参考,安装前请同时查看原文。

如果您认为评估有误,请申请复核

请写明哪一项有误以及原因。无需登录。我们会对照 SKILL.md 重新评估,并在此处更新结果。

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

包含的文件(2)

  • SKILL.md12.4 KB
  • references/component-index.md10.4 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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:

TokenUsage
--background / --foregroundPage background and primary text
--card / --card-foregroundCard surfaces
--primary / --primary-foregroundPrimary actions, emphasis
--secondary / --secondary-foregroundSecondary surfaces
--muted / --muted-foregroundSubdued text, labels
--accent / --accent-foregroundHover states, active nav items
--destructiveDestructive actions
--borderAll borders
--ringFocus rings
--sidebar-*Sidebar-specific variants
--chart-1 through --chart-5Data visualization

Radius

Single --radius variable (0.625rem) with derived sizes:

  • rounded-sm — small inputs, pills
  • rounded-md — buttons, inputs, small components
  • rounded-lg — cards, dialogs
  • rounded-xl — card containers, large components
  • rounded-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:

PatternClassesUsage
Page titletext-xl font-boldTop of pages
Section titletext-lg font-semiboldMajor sections
Section headingtext-sm font-semibold text-muted-foreground uppercase tracking-wideSection headers in design guide, sidebar
Card titletext-sm font-medium or text-sm font-semiboldCard headers, list item titles
Bodytext-smDefault body text
Mutedtext-sm text-muted-foregroundDescriptions, secondary text
Tiny labeltext-xs text-muted-foregroundMetadata, timestamps, property labels
Mono identifiertext-xs font-mono text-muted-foregroundIssue keys (PAP-001), CSS vars
Large stattext-2xl font-boldDashboard metric values
Code/logfont-mono text-xsLog output, code snippets

5. Status & Priority Systems

Status Colors (consistent across all entities)

Defined in StatusBadge.tsx and StatusIcon.tsx:

StatusColorEntity types
active, achieved, completed, succeeded, approved, doneGreen shadesAgents, goals, issues, approvals
runningCyanAgents
pausedOrangeAgents
idle, pendingYellowAgents, approvals
failed, error, rejected, blockedRed shadesRuns, agents, approvals, issues
archived, planned, backlog, cancelledNeutral grayVarious
todoBlueIssues
in_progressIndigoIssues
in_reviewVioletIssues

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:

  1. shadcn/ui primitives (ui/src/components/ui/) — Button, Card, Input, Badge, Dialog, Tabs, etc. Do not modify these directly; extend via composition.
  2. Custom composites (ui/src/components/) — StatusBadge, EntityRow, MetricCard, etc. These capture Paperclip-specific design language.
  3. 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

  1. When you add a new reusable component, you MUST add it to the design guide page. Show all variants, sizes, and states.
  2. When you modify an existing component's API, update its design guide section.
  3. When you add a new composition pattern, add a section demonstrating it.
  4. Follow the existing structure: <Section title="..."> wrapper with <SubSection> for grouping.
  5. 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:

  1. Add it to the component index reference file
  2. Add it to the /design-guide page
  3. 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-md or heavier — keep shadows minimal (xs, sm only)
  • Using rounded-2xl or larger — max is rounded-xl (except rounded-full for pills)
  • Forgetting dark mode — always use semantic tokens, never hardcode light/dark values

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

add-product-e2e-eval

免费有简介AI 评分 90分

为Paperclip新增或扩展贯穿真实浏览器、服务器、数据库和runner的端到端评估,整理测试数据、判定条件与证据,并在现有报告中查看操作结果。

  • 新增完整用户操作流程的评估
  • 更新测试数据与判定条件
  • 在评估报告中加入截图和产物
paperclipai/paperclip10.5万2026年10月20日 更新

add-runner-eval

免费有简介AI 评分 90分

为Paperclip Runner添加或扩展行为评估,定义判定条件、执行目标和报告验证数据,利用正常及异常证据验证结果,并保留执行记录与费用。

  • 添加Runner行为评估
  • 用有效与无效证据检验判定
  • 更新执行列表和持续评估
paperclipai/paperclip10.5万2026年10月20日 更新

agent-browser

免费有简介AI 评分 90分

通过实际浏览器操作网页和应用,检查界面显示与运行情况。结合截图、简单表单填写、错误及网络请求记录,帮助复现问题并确认操作结果。

  • 检查界面修改后的显示效果
  • 读取由JavaScript渲染的内容
  • 复现界面问题并记录错误
paperclipai/paperclip10.5万2026年10月20日 更新

agentmail

免费有简介AI 评分 100分

通过 Paperclip 分配的 AgentMail 收件箱,查看任务关联邮件、发送新邮件或回复,并核查投递结果;重试时保留相同标识,避免重复发送。

  • 查看所负责任务关联的邮件
  • 从分配的收件箱发送新邮件
  • 回复会话中的指定邮件
paperclipai/paperclip10.5万2026年10月20日 更新

check-pr

免费有简介AI 评分 80分

检查GitHub、GitLab和Perforce变更中的评审意见、自动检查失败及说明缺漏,整理待办事项,并按请求协助修改和解决已处理的讨论。

  • 提交变更前进行检查
  • 确认失败的检查和待修改项
  • 整理人工及机器人评审意见
paperclipai/paperclip10.5万2026年10月20日 更新

company-creator

免费有简介AI 评分 100分

根据构想或现有代码仓库,梳理AI智能体的职责、汇报关系与工作交接,生成符合规范的公司或团队文件包,供组织协作和导入Paperclip使用。

  • 从构想建立智能体公司
  • 将代码仓库整理为团队
  • 设计职责分工与工作交接
paperclipai/paperclip10.5万2026年10月20日 更新

查看 paperclipai 的全部技能

报告此技能的问题