前端设计
- 作者仓库星标 1,897
- 作者更新于 实时读取
- 作者仓库 skillshare
- 领域
- 通用
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @runkids · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: skillshare-ui-website-style
description: >- Enforce the skillshare design system across the two frontends. $ARGUMENTS is the file or area…
category: 通用
runtime: 无特殊运行时
---
# skillshare-ui-website-style 输出预览
## PART A: 任务判断
- 适用问题:通用任务拆解、检查和交付。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“UI Dashboard (ui/) / Design Tokens / Color Tokens (Tailwind classes)”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于通用任务拆解、检查和交付,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“UI Dashboard (ui/) / Design Tokens / Color Tokens (Tailwind classes)”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文出现了 `/ui-ux-pro-max`、`/pill` 这类斜杠命令;如果你的 Agent 支持命令触发,优先用命令开场,再补充目标和边界。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令。
先用一个小任务确认它会围绕“UI Dashboard (ui/) / Design Tokens / Color Tokens (Tailwind classes)”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: skillshare-ui-website-style
description: >- Enforce the skillshare design system across the two frontends. $ARGUMENTS is the file or area…
category: 通用
source: runkids/skillshare
---
# skillshare-ui-website-style
## 什么时候使用
- 把通用方向的常用动作沉淀成 Agent 可调用的技能 适合处理通用任务拆解、检查、交付和复盘,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的步骤;通常不需要额外…
- 面向通用任务拆解、检查和交付,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「UI Dashboard (ui/) / Design Tokens / Color Tokens (Tailwind classes)」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "skillshare-ui-website-style" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> UI Dashboard (ui/) / Design Tokens / Color Tokens (Tailwind classes)
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件、执行终端命令 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Enforce the skillshare design system across the two frontends. $ARGUMENTS is the file or area being worked on.
Companion skill: For UX design decisions beyond token/component usage — layout strategy, information hierarchy, interaction patterns, micro-copy, or when designing a new page from scratch — also invoke /ui-ux-pro-max for higher-level design guidance. This skill handles what components and tokens to use; /ui-ux-pro-max handles how to design the experience.
The project has two distinct design systems sharing semantic color names but with different visual treatments:
| Aspect | UI Dashboard (ui/) |
Website (website/) |
|---|---|---|
| Stack | React 19 + Vite + Tailwind CSS v4 | Docusaurus 3 + custom CSS |
| Font body | DM Sans | IBM Plex Sans |
| Font heading | DM Sans | Inter |
| Font mono | SFMono-Regular, Menlo | JetBrains Mono |
| Border-radius | Clean: 4px/8px/12px/pill |
Wobbly: 255px 15px 225px 15px / ... |
| Shadows | Subtle blur: 0 1px 3px rgba(...) |
Hard offset: 4px 4px 0px 0px #2d2d2d |
| Background | Flat #f7f6f3 |
Dot grid on #fdfbf7 |
| Philosophy | skillshare-inspired minimal | Hand-drawn sketchy organic |
UI Dashboard (ui/)
Reference implementation: ui/src/pages/LogPage.tsx
For the full human-readable style guide (design philosophy, visual rules, anti-patterns), see
references/STYLE_GUIDE.mdbundled with this skill.
Design Tokens
Defined in ui/src/index.css (@theme) and ui/src/design.ts:
// ui/src/design.ts
import { radius, shadows, palette } from '../design';
radius.sm // '4px' — badges, chips
radius.md // '8px' — cards, containers
radius.lg // '12px' — modals, panels
radius.btn // '9999px' — pill buttons (skillshare style)
radius.full // '9999px' — avatars
shadows.sm / .md / .lg / .hover / .active / .accent / .blue
palette.accent / .info / .success / .warning / .danger
Color Tokens (Tailwind classes)
| Role | Class | When |
|---|---|---|
| Primary text | text-pencil |
Titles, names, values |
| Secondary | text-pencil-light |
Descriptions, timestamps, labels |
| Tertiary | text-muted-dark |
Hints, placeholders |
| Success | text-success |
Passed, synced, clean |
| Warning | text-warning |
Dirty, behind, partial |
| Danger | text-danger |
Failed, blocked, critical |
| Info / Blue | text-blue |
Links, info badges, repo URLs |
| Background | bg-surface |
Cards, inputs |
| Page bg | bg-paper |
Root background |
| Borders | border-muted |
Default borders |
Rule: Max one accent color per visual region. Don't double up — if a row has a colored dot, skip the colored badge (or vice versa).
Typography
- Body: DM Sans (via
--font-hand) font-mono: timestamps, file paths, durations, code, hashesuppercase tracking-wider: command names, stat labels- Size:
text-2xl>text-xl>text-base>text-sm>text-xs
Page Structure (mandatory order)
Every page follows this layout:
<div className="space-y-5 animate-fade-in">
<PageHeader icon={<Icon />} title="..." subtitle="..." actions={<>...</>} />
{/* Toolbar: tabs + filters */}
<div className="flex flex-wrap items-end gap-3">
<SegmentedControl ... />
<Select ... />
</div>
{/* Summary line or stat cards */}
<SummaryLine ... />
{/* Content: table, card list, or card grid */}
{empty ? <EmptyState ... /> : <ContentArea />}
{/* Dialogs (rendered at bottom, portal via DialogShell) */}
<ConfirmDialog ... />
</div>
Component Library
| Component | File | API |
|---|---|---|
Card |
Card.tsx |
variant="default|accent|outlined", hover, overflow, tilt?, padding="none|sm|md" — accent uses thicker border for emphasis (no stripe) |
Button |
Button.tsx |
variant="primary|secondary|danger|ghost|link", size="sm|md|lg", loading? |
Badge |
Badge.tsx |
variant="default|success|warning|danger|info|accent", size="sm|md", dot? |
PageHeader |
PageHeader.tsx |
icon, title, subtitle?, actions?, backTo? (styled back arrow) |
EmptyState |
EmptyState.tsx |
icon (LucideIcon), title, description?, action? |
ConfirmDialog |
ConfirmDialog.tsx |
open, onConfirm, onCancel, title, message, variant="default|danger" |
DialogShell |
DialogShell.tsx |
open, onClose, maxWidth, preventClose (backdrop blur + dialog-in animation) |
Input |
Input.tsx |
label? + standard input props (re-exports Checkbox, Select) |
Textarea |
Input.tsx |
label? + standard textarea props |
Select |
Select.tsx |
label?, value, onChange, options[], size="sm|md" |
Checkbox |
Checkbox.tsx |
label, checked, onChange, indeterminate?, disabled?, size="sm|md" |
Spinner |
Spinner.tsx |
size="sm|md|lg" — use instead of <RefreshCw className="animate-spin"> |
Tooltip |
Tooltip.tsx |
content: string, side="top|bottom" — portal-based, 200ms delay |
SegmentedControl |
SegmentedControl.tsx |
value, onChange, options[], connected?, colorFn? |
Pagination |
Pagination.tsx |
page, totalPages, onPageChange, rangeText?, pageSize? |
StatusBadge |
StatusBadge.tsx |
Status display |
Skeleton / PageSkeleton |
Skeleton.tsx |
Shimmer animation loading states |
Toast / useToast |
Toast.tsx |
toast(message, 'success'|'error') — exit animation, progress bar, hover pause |
FilterTagInput |
FilterTagInput.tsx |
Tag-based filter input |
IconButton |
IconButton.tsx |
Icon-only button with aria-label |
Stats Patterns (choose one)
| Pattern | When |
|---|---|
| Inline summary text | 1-3 stats: "42 ops · 3 errors · last: 2m ago" |
| Stat card grid | Dashboard overview KPIs only |
Status Patterns (choose one per element)
| Pattern | Markup | When |
|---|---|---|
| Colored dot | w-2 h-2 rounded-full |
Table rows, list items, audit findings/rules |
| Badge | <Badge variant="..."> |
Standalone labels |
List Patterns
| Pattern | When |
|---|---|
| Table | Uniform rows, sortable columns, many items |
| Card list (vertical) | Mixed content per row, expandable |
| Card grid | Visual overview, few fields per item |
Button Variants
| Variant | When |
|---|---|
danger |
Permanent destructive: clear log, empty trash, delete forever |
secondary |
Reversible removal: uninstall, remove, restore |
ghost |
Cancel, clear filter, reset |
primary |
Positive action: save, sync, install, run |
Separator
Always: border-dashed border-pencil-light/30 (unified opacity, not /20 or /40)
Animations
| Context | Value |
|---|---|
| Card rotation | rotate(+-0.15deg) via :nth-child(odd/even) |
| Standalone accent | Max rotate(+-0.3deg) |
| Hover | transition-all duration-150 |
| Page entry | animate-fade-in (0.2s ease-out) |
Keyboard Shortcuts
Registered in KeyboardShortcutsModal.tsx and useGlobalShortcuts.ts:
?— shortcuts modal/— focus searchg d/s/t/l— go to Dashboard/Skills/Targets/Logr— refresh page- Only fire when no
<input>/<textarea>focused - Chord timeout: 500ms
- New shortcuts must be added to
KeyboardShortcutsModal - Never override browser-native shortcuts (
Cmd+C, etc.)
Accessibility
| Concern | Requirement |
|---|---|
| Focus ring | focus:ring-2 focus:ring-blue/20 |
| Touch target | Min 44x44px |
| Color contrast | 4.5:1 (WCAG AA) |
| Icon buttons | aria-label required |
| Modals | role="dialog" + aria-modal="true" + useFocusTrap |
| Select | role="combobox" + aria-expanded + role="listbox/option" |
Card Overflow Gotcha
Card.tsx has overflow-hidden by default for border-radius clipping. Absolute-positioned children (dropdowns, tooltips) get clipped. Fix: pass overflow prop or add className="!overflow-visible".
Data Fetching Pattern
Pages use @tanstack/react-query:
const { data, isPending } = useQuery({
queryKey: queryKeys.someKey(...),
queryFn: () => api.someEndpoint(...),
staleTime: staleTimes.someCategory,
});
- Query keys:
ui/src/lib/queryKeys.ts - API client:
ui/src/api/client.ts - App context:
ui/src/context/AppContext.tsxprovides{ isProjectMode, projectRoot }
Website (website/)
Docusaurus with hand-drawn "sketchy organic" design in website/src/css/custom.css.
Key Differences from UI Dashboard
- Wobbly borders:
border-radius: var(--radius-wobbly)(not clean px values) - Hard shadows:
4px 4px 0px 0px #2d2d2d(no blur) - Dot grid bg:
radial-gradient(var(--color-muted) 1px, transparent 1px)on body - Post-it yellow:
--color-postit: #fff9c4for highlights - Dashed borders everywhere: navbar, sidebar, tables, pagination, code blocks
- Button hover:
transform: translate(2px, 2px)+ shadow shrinks (press-down feel) - Links: wavy underline (
text-decoration-style: wavy) - Dark mode: amber/gold primary (
#e8a84c) instead of blue
CSS Variables
See website/src/css/custom.css for full list. Key additions beyond shared palette:
--radius-wobbly[-sm|-md|-btn]— hand-drawn border-radius--color-postit[-dark]— yellow highlight--shadow-md: 4px 4px 0px 0px #2d2d2d— hard offset--card-bg,--card-border,--install-bg— component-specific
Docusaurus Classes
.button--primary— green bg, pencil border, hard shadow.button--secondary— dashed border, no fill.markdown h2— dashed bottom border.admonition— wobbly border-radius, left stripe.menu__link--active— post-it yellow background.target-badge— wobbly border for target grid- Code blocks get
box-shadow: 4px 4px 0px 0px #101827
Homepage Components (website/src/pages/index.tsx)
CARD_ROTATIONSarray for random hand-drawn tiltWavyDivider— SVG dashed wavy line between sectionsInstallTabs— tabbed install commands with copy button- Hero has hand-drawn SVG connector + underline
Anti-Patterns (Both Systems)
| Don't | Do Instead |
|---|---|
| Emojis as status icons | Colored dots, badges, or semantic icons |
| Stat cards for 1-3 values | Inline summary text |
Left-border colored stripes (border-l-*) |
Colored dots or badges — never use left stripe for emphasis or status |
| Stripe + badge for same status | Pick one per element |
Mixed separator opacity (/20, /40) |
Always border-pencil-light/30 |
window.confirm() |
<ConfirmDialog> component |
| Custom empty-state markup | <EmptyState> component |
| Inline styles for design tokens | Use Tailwind classes or design.ts exports |
overflow-visible on Card without overflow prop |
Pass overflow prop to Card |
Dropdowns inside flex-wrap title rows |
Put dropdowns on their own row |
Checklist Before Submitting
- Uses existing components (Card, Badge, Button, etc.) — no custom markup for solved patterns
- Page follows PageHeader → Toolbar → Summary → Content structure
- Color tokens from Tailwind (
text-pencil, not hardcoded#141312) - Separator is
border-dashed border-pencil-light/30 - Empty states use
<EmptyState> - Destructive actions use
<ConfirmDialog> - All icon buttons have
aria-label - New shortcuts registered in
KeyboardShortcutsModal -
animate-fade-inon root container - Dark mode works (check both themes)
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核