Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when uiux-designer is about to produce a design spec (spec.md) or static HTML prototype, or frontend-dev is about to build UI from a design. Provides the anti-AI-slop design discipline layer — Brief Inference (Design Read), three aesthetic dials tuned for product UI, AI Tells blacklist with overrides, mechanically-checkable Pre-Flight. Sits above the token layer (DESIGN.md) and mechanical review (code-reviewer); does not redeclare tokens or guide non-shadcn design systems. Inspired by taste-
.claude/skills/pcliangx-agf-design-discipline/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 143% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 145% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 35% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 478% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 265% | 0% |
> AGF 设计治理的第三层:审美判断。与 token 层(docs/design/DESIGN.md)、机械审查层(code-reviewer.md 设计 token 审查项)正交。本 skill 不重声明 token、不做 grep、不引导非 shadcn 设计系统 —— 只管"设计方向与审美判断"。治理背书 ADR-013。
spec.md 或 index.html 原型(设计侧:产出前给 Design Read + 自查 9 维)Do NOT use this skill for:
docs/design/DESIGN.md 的职责,本 skill 只指向它code-reviewer.md 设计 token 审查项 + agf-design-precheck.shLLM 设计输出烂的头号原因:模型跳过"读需求"直接套默认审美。写任何设计 / 代码前,先输出一句 Design Read 声明,落 spec.md 顶部(feature 审美方向锚)。
Reading this as: <产品 UI / 营销页> for <受众>, with a <风格> language,
leaning toward <shadcn/ui + Tailwind 方向>, VARIANCE/MOTION/DENSITY = x/y/z.例:
brief 真正分叉时问一个澄清问题(不要连环问):"这个更偏 Linear 克制还是 premium consumer?" 能从上下文推断就别问,直接声明 Design Read 并继续。
三刻度是全文交叉引用的"全局变量",驱动后续布局 / 动效 / 密度决策。它们是风格参数不是视觉值 —— 不进 DESIGN.md token YAML,落 spec.md 顶部 Design Read 声明里(ADR-013 决策 3)。
| 刻度 | 1 | 10 | AGF 产品 UI 默认 | |---|---|---|---| | VARIANCE(布局实验度) | 完美对称 / 居中 | 非对称 / 网格破碎 | ≤ 5 | | MOTION(动效深度) | 静态(仅 hover) | 影院级 / 物理编排 | ≤ 4 | | DENSITY(视口信息密度) | 画廊级留白 | 驾驶舱紧凑 | 中 |
| 信号 | VARIANCE | MOTION | DENSITY | |---|---|---|---| | 产品 UI(默认)| 4-5 | 3-4 | 中 | | "克制 / 简约 / Linear 风 / 严肃 B2B" | 3-4 | 2-3 | 中-高 | | dashboard / 数据密集 | 3-4 | 2-3 | 高 | | 营销 landing / portfolio(PL 显式声明)| 7-9 | 5-7 | 低-中 | | premium consumer / Apple 感(营销)| 7-8 | 5-6 | 低 | | 无障碍优先 / 公共部门 / 强监管 | 2-3 | 1-2 | 中 | | 改版 - 保留 | 匹配现状 | +1 | 匹配现状 | | 改版 - 翻新 | +2 | +2 | 匹配现状 |
py-16 间距;高(dashboard)→ 紧凑 + divide-y 分隔;低(营销)→ py-32 大留白。taste-skill 的高 MOTION 编排是为营销页设计的。AGF 产品 UI 一律禁用,理由:破坏稳定性、Core Web Vitals(INP)、可访问性、prefers-reduced-motion 兜底复杂度。这是 taste-skill(营销页导向)与 AGF(产品 UI 导向)最核心的语境差异。
window.addEventListener('scroll', ...) —— 每帧触发、jank;用 useScroll() / IntersectionObserver / CSS animation-timeline: view() 替代useState 跟踪连续输入值(鼠标位置 / 滚动进度 / 磁吸 hover)—— 每帧重渲染;用 useMotionValue / useTransform(在 React render cycle 之外)transition(cubic-bezier(0.16, 1, 0.3, 1),~300ms)whileInView(motion/react)或 IntersectionObserver 或 CSS animation-timeline: view(),once: true:active 时 -translate-y-[1px] 或 scale-[0.98]transform / opacity,绝不动 top/left/width/heightprefers-reduced-motion(useReducedMotion() 降级为静态)—— 非协商PL 派工时显式声明该 feature 是营销 / 落地页 → spec.md Design Read 标注 → 该 feature 可放开 MOTION 到 5-7(仍守 reduced-motion + transform/opacity only + 客户端 leaf 组件隔离 + useEffect cleanup)。不放开到 scroll-hijack / GSAP(AGF 不引 GSAP,ADR-000 技术栈无它)。
LLM 生成 UI 的高频"AI 味"模式。每条默认禁,override 路径说明何时可破例。
from-indigo-* to-violet-* / bg-purple-* 按钮 glow / 随机 mesh 渐变)—— LLM 头号指纹。{color.primary}),accent 都引自 token。#000000 / 纯白 #ffffff —— 杀死纵深。{color.primary}),全页审计一致。typography.*.font-family 定 system-ui 栈或 Geist;display 与 body 各一族。text-7xl/8xl)—— 用 weight + color 控层级,不全靠 scale。bg-clip-text text-transparent)大面积标题 —— 营销页花活,产品 UI 不要。grid-cols-3 三张一模一样)—— LLM 布局头号指纹。divide-y 列表。rounded-2xl(所有东西一个圆角)—— 单调。radius token 锁单一 radius 系统(全锐 / 全软 / 全胶囊,或文档化规则如"按钮胶囊 / 卡片 12px / 输入 8px")。<!-- mock -->。<div> 矩形堆假任务列表 / 假面板)—— LLM-design 头号 Tell。https://picsum.photos/seed/{描述性 seed}/{w}/{h} 或 DESIGN.md token 色。对照下表逐条自检 spec + 原型。机械可验项(可 grep / 可数)优先,人审项(AI Tells)其次。agf-design-precheck.sh 跑机械项作 step 0。
机械可验项(脚本 / grep 可查):
#RRGGBB / 字面 px 间距字号 / 一次性圆角(引用 DESIGN.md token)min-h-[100dvh] / 100dvh,无 100vh / h-screen(iOS Safari 地址栏跳动)font-family 无 Inter 作默认(system-ui 栈或 Geist)from-indigo-* to-violet-* / bg-purple-* AI 渐变信号prefers-reduced-motion 对 MOTION > 3 的动效有兜底人审项(AI Tells,§4):
window.addEventListener('scroll'))纪律项:
任一项不过 = 产出未完成,改完再交。
设计系统选型只锚定 ADR-000 锁定的栈,不引导其他系统(ADR-013 决策 5):
frontend-design:frontend-design 插件检查清单docs/design/DESIGN.md(SSOT,禁另立色板)不要引导:Material / Fluent / Carbon / Polaris / Atlassian / Primer / GOV.UK / USWDS / Bootstrap / Radix Themes(这些是 taste-skill 的多系统引导,与 AGF 锁死 shadcn/ui 冲突)。若用户明确要某系统 → 退回 tech-lead 开新 ADR(技术选型变更)。
window.addEventListener('scroll'))?bash .claude/scripts/agf-design-precheck.sh docs/design/[feature]/ advisory 通过?设计产出(uiux-designer)或 UI 实现(frontend-dev)完成自检后:
agf-design-precheck.sh step 0 + §4 AI Tells 人审 + §3 motion 红线核| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 20,559 | 13,265 | -35% | 1 | 1 | 0% | 2,949 | 7,172 | +143% | 0 | 0 | — |
case-02 | fail→pass | 21,333 | 16,261 | -24% | 1 | 1 | 0% | 3,212 | 7,873 | +145% | 0 | 0 | — |
case-03 | fail→pass | 35,374 | 19,609 | -45% | 1 | 1 | 0% | 6,233 | 8,389 | +35% | 0 | 0 | — |
case-04 | pass→pass | 10,017 | 10,679 | +7% | 1 | 1 | 0% | 1,810 | 7,077 | +291% | 0 | 0 | — |
case-05 | pass→pass | 15,399 | 15,281 | -1% | 1 | 1 | 0% | 2,788 | 7,966 | +186% | 0 | 0 | — |
case-06 | fail→pass | 9,138 | 14,549 | +59% | 1 | 1 | 0% | 1,325 | 7,652 | +478% | 0 | 0 | — |
case-07 | pass→pass | 16,513 | 8,063 | -51% | 1 | 1 | 0% | 2,519 | 6,534 | +159% | 0 | 0 | — |
case-08 | pass→pass | 14,473 | 8,324 | -42% | 1 | 1 | 0% | 2,260 | 6,530 | +189% | 0 | 0 | — |
case-09 | fail→pass | 11,048 | 5,823 | -47% | 1 | 1 | 0% | 1,662 | 6,070 | +265% | 0 | 0 | — |
case-10 | fail→pass | 15,854 | 9,554 | -40% | 1 | 1 | 0% | 2,418 | 6,514 | +169% | 0 | 0 | — |
case-11 | fail→pass | 14,531 | 9,821 | -32% | 1 | 1 | 0% | 2,182 | 6,705 | +207% | 0 | 0 | — |
case-12 | pass→pass | 15,572 | 15,159 | -3% | 1 | 1 | 0% | 2,229 | 7,852 | +252% | 0 | 0 | — |
case-13 | pass→pass | 14,823 | 7,290 | -51% | 1 | 1 | 0% | 2,279 | 6,328 | +178% | 0 | 0 | — |
case-14 | fail→pass | 16,052 | 9,901 | -38% | 1 | 1 | 0% | 2,438 | 6,857 | +181% | 0 | 0 | — |
case-15 | pass→pass | 13,597 | 7,376 | -46% | 1 | 1 | 0% | 2,056 | 6,281 | +205% | 0 | 0 | — |
case-16 | fail→pass | 11,729 | 7,415 | -37% | 1 | 1 | 0% | 1,692 | 6,263 | +270% | 0 | 0 | — |
case-17 | fail→pass | 14,206 | 9,097 | -36% | 1 | 1 | 0% | 2,051 | 6,509 | +217% | 0 | 0 | — |
case-18 | pass→pass | 13,347 | 9,708 | -27% | 1 | 1 | 0% | 2,233 | 6,738 | +202% | 0 | 0 | — |
case-19 | fail→pass | 14,943 | 8,298 | -44% | 1 | 1 | 0% | 2,187 | 6,600 | +202% | 0 | 0 | — |
case-20 | fail→pass | 16,928 | 11,449 | -32% | 1 | 1 | 0% | 2,602 | 7,231 | +178% | 0 | 0 | — |
case-21 | fail→pass | 8,367 | 5,110 | -39% | 1 | 1 | 0% | 1,189 | 6,021 | +406% | 0 | 0 | — |
case-22 | fail→pass | 12,219 | 5,668 | -54% | 1 | 1 | 0% | 1,731 | 6,026 | +248% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +64 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.