1实现原理 · 为什么它能做到
整个 skill 是一份纯提示词知识源:`.claude/skills/interface-design/SKILL.md`(约 320 行、9 个一级章节)承载全部规则,仓库内没有任何可执行逻辑参与设计流程。
This skill is self-contained: direction, visual hierarchy, design-system architecture, and the polish and motion essentials needed to ship production-grade UI all live here.
对抗『模型输出千篇一律 SaaS 模板』的核心机制是把默认值显式点名并要求逐项自述意图——不是给风格建议,而是设一个强制检查点。
This checkpoint is mandatory. If you can't explain WHY for each, you're defaulting — stop and think.
跨会话『设计记忆』不靠代码,而是让 agent 在消费方项目里写一份纯文本 `.interface-design/system.md`,下次读回即视为既定决策。
Always offer to save: "Want me to save these patterns for future sessions?" If yes, write to `.interface-design/system.md`:
热启动路径把消费方项目里的 system.md 抬到规则之上:文件存在即『决策已定』,不再重新推演方向。
- **If `.interface-design/system.md` exists:** read it and apply — decisions are made.
评审侧给出可执行的通过门槛:8 条必要条件 + 8 类一票否决项(Presumptive blockers),命中任一即 not approved。
**Presumptive blockers** (unless the author justifies them against intent): no focal point · size-only or defaulted typography · monotone layout · timid or competing-accent palette · harsh or fragmented surfaces · missing states · structural hacks · an inaccessible hand-rolled control (no keyboard/focus/ARIA) where a primitive or existing component should be used. Any one present → **not approved**; leave explicit, actionable feedback and push for the crafted version.
评审与修改被刻意分离:design-review 默认只判不改,改动交给用户显式要求或 design-deslop。
This review **judges by default**. Report findings and a verdict; only rebuild when the user asks. Keep the review and the mutation cleanly separate.
渲染与出图能力全部是运行时可探测的条件式能力:有内联渲染工具就『展示』而不是描述,没有就退回代码与 token;skill 自己不含任何像素生成能力。
If an inline visual-rendering tool is available in the session (e.g. a `show_widget` / `visualize` tool that renders HTML or SVG inline in the conversation), prefer **showing** the design over describing it.
唯一可执行的仓库资产是 `.githooks/pre-commit`:用时间戳改写两个 manifest 的 version 并 git add,但在本 clone 中并未接线,因此不会自动运行。
sed -i '' "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" .claude-plugin/plugin.json
2核心能力
3外部依赖
| 类型 | 依赖 |
|---|---|
| package | skills CLI(npx 第三方安装器,来自 npm registry) |
| api | 宿主内联渲染工具(具名 show_widget / visualize,条件式) |
| api | 外部出图工具(未具名,条件式;仅用于方向板/参考图,非交付物) |
| network | 项目站点域名(README 外链;仓库内无站点源码) |
| network | Claude Code marketplace JSON schema 指针(JSON 声明,非运行时请求) |
| package | 推荐给消费方项目使用的无头可访问组件库(建议,不安装) |
4风险提醒 风险提醒:蓝色 · 知晓即可
- 被审仓库自带的 system.md 可豁免评审结论(注入/绕过面) — SKILL.md 要求 system.md 存在即 `read it and apply — decisions are made`,design-review.md L91 与 design-deslop 同类条款把其中决定的事项排除在缺陷/slop 之外。任何被审项目只要放入该文件,就能让评审对其中声明的值不作追问;skill 没有来源校验、大小限制或冲突策略。
- 『自动加载 / 自动记忆』是提示词层面的期望,不是机制 — README L32/L46 的 Memory 与『System loads automatically』由 SKILL.md L288/L303 的 prompt 指令实现(读文件、offer to save),没有代码或 hook 保障;在没有 system.md 或 agent 未读的会话里,一致性承诺不成立。
- reference/ 模板不随 skill 安装,README 指引悬空 — plugin.json 只发布 `./.claude/skills`,而 system.md 模板与两份示例位于仓库根 reference/;README L328 的指向对走 npx 安装的用户拿不到文件。
- 不可验证的兼容性与质量宣称 — README L129-135 的 Compatibility Matrix 无测试或 CI 支撑;仓库无 package.json、无 workflows。
- 仓库内残留第三方平台标识 — website/.vercel/project.json 把 Vercel projectId 与 orgId 提交进公开仓库(且 .vercel/README.txt 自述不应分享该目录);无 .gitignore 阻止。
- 运行时写文件属常规能力,但会落在用户仓库根目录 — `.interface-design/system.md` 由 agent 在消费方项目写出(经用户同意),位置在工作目录内、内容为 Markdown;对本 skill 属正常行为,但审计时需知晓会新增目录。
5第二遍独立确认
- [ok] skill.path = .claude/skills/interface-design — 重读根目录与 `.claude/` 目录树:确为 `.claude/skills/interface-design/`(内含 SKILL.md 与 agents/openai.yaml),同层还有 `.claude/commands/`(design-review.md、design-deslop.md);无 .claude/settings.json、无 hooks 目录,全仓仍为 15 个文件。
- [ok] official_desc 逐字 — 重读 SKILL.md L1-4,frontmatter 仅 name/description 两键,description 为单行长文本;与 README『What This Does』口径一致(同为『Not for marketing』)。
- [ok] external_deps:渲染/出图工具为条件式而非硬依赖 — 重读 SKILL.md L74(含 `Never assume the tool exists; check, then use it.` 与无工具时的 fallback 句)、L269(`if an image-generation tool is available`)与 design-deslop.md L18(`If a render tool (`show_widget`/`visualize`) or a screenshot is available, use it.`)。三处均为条件式,无硬依赖。
- [ok] external_deps:npx skills add / 组件库建议 — 重读 README.md L63/70/73/74/77/80/92/111/126 与 L133 兼容性表,均出现在 bash 代码块中,是给用户的安装说明;重读 SKILL.md L181 确认 Radix/React Aria 等仅为给消费方项目的选型建议,本仓无 package.json、不安装任何依赖。
- [discrepancy] security:pre-commit 是否会被自动触发 — 重读 `.githooks/pre-commit` 全 18 行与 `.git/config`:配置里只有 core/repositoryformatversion/filemode/bare/logallrefupdates、remote origin、branch main,**没有 core.hooksPath**;`.git/hooks/` 全是 *.sample。结论:clone 后不会自动执行(常见说法『克隆即触发 git hook』不成立)。附带发现脚本用 `sed -i ''`(BSD/macOS 语法),在 GNU sed 上会报错,进一步说明是作者本机工作流。
- [ok] security:凭证读取与网络外发为零 — 全仓独立扫描 env/keychain/token/secret/curl/wget/.env 等 token:唯一命中是 SKILL.md 的 `## Tokens` 标题与 marketplace.json 的 'tokens' tag(设计 token 语义,非凭证)。.githooks、.claude/、reference/、website/ 正文逐一见底,无任何凭证或网络访问点。
- [ok] security:file_writes 的两条路径 — 重读 .githooks/pre-commit L10/13/16(写 .claude-plugin 两个 JSON + git add)与 SKILL.md L303(写消费方项目 `.interface-design/system.md`)。两条写入路径都限定在各自工作目录之内,不触碰 $HOME 与系统目录。
- [discrepancy] 宣称 vs 实际:reference/ 是否随 skill 安装 — 重读 plugin.json L11-12(commands=./.claude/commands、skills=./.claude/skills)与 README.md L328-330(`For system file templates, see `reference/examples/`:`)。reference/ 位于仓库根、不在发布目录内,全仓仅 README 引用它(SKILL.md 与两个命令零引用),因此走 README 推荐的 npx 安装后这些模板不会落地,README 该指引对安装用户是悬空引用。
6结论
83166a71a36953ec…2f9be32068