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-skill, cropped for AGF product UI per ADR-013.
npx skills add https://github.com/pcliangx/AppGenesisForge --skill agf-design-discipline
> 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 红线核This skill should be used when refactoring existing CSS from inline styles or utility classes to semantic patterns. Triggers on "refactor CSS", "extract styles", "consolidate CSS", "convert inline", "clean up styles", "migrate to semantic". Transforms to semantic classes with dark mode and tests.
Audit and improve SwiftUI runtime performance from code review and architecture. Use for requests to diagnose slow rendering, janky scrolling, high CPU/memory usage, excessive view updates, or layout thrash in SwiftUI apps, and to provide guidance for user-run Instruments profiling when code review alone is insufficient.
Run lint on affected packages, parse errors, and auto-fix common issues (design tokens, React.FC, SSR safety, import restrictions)
Read this before building a component or diagnosing a build failure; do not guess build flags or the inner loop. Explains how to build, iterate on, and debug an azldev component, covering comp build flags (local-repo, preserve-buildenv), the render/build/test inner loop, diff-sources, and disabling a failing %check via check.skip. Triggers include build component, build failed, build error, inner loop, preserve buildenv, local repo, disable check.
Load a sharded, on-disk dataset (sharded .npy, Parquet/Arrow, raw binary, sharded HDF5, custom layouts) into a distributed cuPyNumeric ndarray via a manual partition + leaf @task launch with CPU/OMP/GPU variants. Use when no single-call loader fits, including when per-shard row counts differ across files. Prefer cupynumeric.load or legate.io.hdf5.from_file when they apply.
Use when configuring, running, or fixing PHPStan static analysis in WordPress projects (plugins/themes/sites): phpstan.neon setup, baselines, WordPress-specific typing, and handling third-party plugin classes.
Create, read, and analyze C# scripts — create, read, replace, append, search, rename, move, and delete scripts, plus compile feedback. Use when authoring or editing C# code, searching across scripts, refactoring file layout, or checking compile errors, even if the user just says "写个脚本" or "改代码". 对 C# 脚本进行增删改查与分析(创建、读取、替换、追加、搜索、重命名、移动、删除脚本,以及编译反馈);当用户要编写或编辑 C# 代码、跨脚本搜索、重构文件布局、或检查编译错误时使用。
Quick automated lint — detects common design system violations in seconds
Take pcliangx/agf-design-discipline from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.