首页 / 全部技能 / 设计 / interaction-design-board
设计 · daymade/claude-code-skills

interaction-design-board

Generate several genuinely different, runnable HTML interaction prototypes for one product surface, combine them in an interactive Design Board, collect structured selection/remix feedback, and only then hand the approved behavior to production implementation. Use when a user asks for multiple clickable UI versions, interaction alternatives, progressive-disclosure options, a Design Board, HTML prototypes, test-time scaling for product design, or says the visual styling is acceptable but the hierarchy, workflow, layout, or interaction still feels unprofessional. Prefer this over static image exploration when the decision depends on what happens after clicking, expanding, selecting, filtering, or moving through states.

L4 高权限 · 分级授权与审计V1 已固定执行命令联网读写文件Dual-pass Audit
Author daymadeGitHub daymade/claude-code-skills ↗Stars 1385License MIT(仓库根 LICENSE;GitHub API spdx MIT)Commit d5c4678cb5
管控等级描述 skill 的能力与建议配套的管控措施,不代表质量或安全认证,也不表示可用或不可用。是否使用由用户和管理者决定。不同 agent 宿主对权限的约束各不相同,请勿假定宿主一定会提供安全兜底。第三方 skill 版权归原作者,使用风险由使用者自行承担。

1实现原理 · 为什么它能做到

流程门禁:先冻结 Decision Contract(user job/decision scope/immutable facts/existing language/first-view invariant/interaction states/stop condition),再提议 3 个独立交互架构候选(命令优先/队列详情/对象主导/对比主导/ledger 优先等族),每个候选=一个交互假说而非皮肤,变量只动导航/选择/披露/动作归属/信息序。

daymade-codex/interaction-design-board/SKILL.md
Each candidate embodies a distinct interaction hypothesis rather than a skin.
SKILL 'Hold the decision contract constant. Change navigation/selection/disclosure/action ownership or information order—not colors, copy, and data all at once.'——静态图只算支持证据:'A screenshot cannot prove a collapse state, keyboard path, selection model, or task handoff.'

build_board.py 是合规闸门:读 board.json(schemaVersion=interaction-design-board/v1),校验 2-8 个变体、变体文件不越 manifest 目录且非 symlink、sha256 去重(byte-identical 拒绝)、每个变体必须自包含 HTML(禁外部 script/img/link/poster/url() 资源、禁 CSS @import、必须有 title、禁 <base>),然后填模板产出单文件 Board。

daymade-codex/interaction-design-board/scripts/build_board.py
f"{field} depends on external resource {locator!r}; inline it as CSS, JS, or data URL"
resolve_variant 校验 'candidate.relative_to(root.resolve())' 防穿越;validate_self_contained 用 StyleBlockExtractor 忽略注释/raw-text 容器后查 @import;'variants must contain between 2 and 8 candidates'。

运行隔离=模板注入 CSP + srcdoc sandbox iframe:每个候选被包进 srcdoc frame,Board 向其注入 default-src 'none' 的 CSP(仅 unsafe-inline 样式/脚本 + data:/blob: 媒体,connect-src/frame-src/object-src/form-action 全禁),再叠 sandbox='allow-scripts allow-forms allow-modals'。

daymade-codex/interaction-design-board/assets/design-board-template.html
policy.content = "default-src 'none'; style-src 'unsafe-inline'; script-src 'unsafe-inline'; img-src data: blob:; media-src data: blob:; font-src data:; connect-src 'none'; frame-src 'none'; object-src 'none'; base-uri 'none'; form-action 'none'"
securedCandidateHtml 把候选 HTML 拷进 documentCopy 并 prepend CSP meta 再 srcdoc;frame.setAttribute('sandbox', 'allow-scripts allow-forms allow-modals')。SKILL:'The Board also injects a network-denying Content Security Policy into every sandboxed candidate so dynamic JavaScript cannot create an undeclared runtime dependency.'

测试时缩放(test-time scaling):有独立 worker 上下文时,一个候选派一个 worker、共享同一份冻结 contract、互不可见彼此输出,防收敛成兄弟方案;无 worker 则串行生成但重读冻结 contract 而非上一个候选。

daymade-codex/interaction-design-board/SKILL.md
assign one candidate to each worker with the same frozen decision contract and only that candidate's hypothesis. Do not let workers see one another's output.
SKILL:'This isolation is the test-time-scaling mechanism: it preserves distinct hypotheses instead of converging into siblings.'

反馈回路:Board 提交 feedback.json / feedback-pending.json(regenerated:true 时带 regenerateAction iterate|remix)→ agent 保留接受部分、改失败轴、只重生成受影响候选 → 版本化 Board 文件 → gstack serve 已存在则 POST /api/reload(响应 {"reloaded":true}),重复 serve 不算 reload。

daymade-codex/interaction-design-board/SKILL.md
curl -sS -X POST "${BOARD_URL%/}/api/reload" \ -H 'Content-Type: application/json' \ -d '{"html":"<absolute-versioned-board-path>"}'
模板 deliver():有 __GSTACK_SERVER_URL 或 http(s) 协议时先 POST ./api/feedback,失败/本地文件模式则 download feedback.json——'A successful response or downloaded file is transport evidence, not approval'。

生产实施门禁:用户确认反馈总结后才写 approved.json(选中/批准交互规则/first-view invariant/被拒 trade-off/实际演练状态/剩余未知/原型文件身份),然后才进产品实现并用真实浏览器验证同一代表任务——像素相似不算数。

daymade-codex/interaction-design-board/SKILL.md
Then—and only then—implement in the product.
SKILL 末尾还约束:'Do not claim usability validation from the author's own click-through. Agent QA catches broken states; the user's task observation decides the interaction.'

2核心能力

01多候选可运行 HTML 交互原型(同一业务事实/设计语言下变交互架构)
02board.json 合规构建:2-8 变体、sha256 去重、自包含强制、穿越/symlink 拒绝
03CSP+srcdoc sandbox 的双层原型运行隔离(网络/嵌套/弹窗全禁)
04结构化反馈收集与命名 remix(feedback.json/feedback-pending.json schema + 版本化 Board + /api/reload)
05worker 隔离式并行生成(test-time scaling,防方案收敛)
06批准门禁与生产移交(approved.json → 产品实现 → 真实浏览器任务验证)
07Board 内任务观察协议(noticed first / knew next step / disclosure 帮助或遮蔽 / 自然或意外的状态转换)

3外部依赖

KindDependency / Endpoint
clipython3(build_board.py,纯 stdlib)
cligstack design 可执行(可选:serve Board + /api/feedback + /api/reload;未装则开文件直用)
clicurl(可选:Board 重载探测/触发)

4管控建议与判定依据

建议配套管控措施
面向 Agent
分级或逐次授权,建议在沙箱运行
面向管理者
审批流程、可回滚、全程审计
判定依据(文件路径与关键语句摘要)
  • scripts/: 执行本地脚本或命令: python3 build_board.py(纯 stdlib;读取 manifest 与变体 HTML、写 design-board.html)
  • 环境变量 / API Key: 读取厂商服务密钥: 无
  • 本地工作目录: 文件读写与工件输出: build_board.py 写 session-dir/design-board.html;agent 按流程在 session-dir 写 boa
审计说明: 。自带 stdlib python 脚本,写 session-dir 本地文件,无网络外发(反而在渲染层禁网)、无凭证读取;可选 gstack design serve 为本地服务。写盘对象是会话工作区产物与(批准后)产品源码——后者是任务本意,由用户确认门禁控制;无破坏性/删除操作。

5第二遍独立确认

  • [ok] 穿越/symlink/外部资源拒绝 — resolve_variant: symlink 拒 + relative_to(root) 校验;validate_self_contained: RESOURCE_PATTERNS 扫 script/img/link/video/url(),仅放行 data:/blob:/about:。
  • [ok] CSP 断网声明 — 模板 241 行 CSP 含 connect-src 'none'; frame-src 'none'; object-src 'none';srcdoc + sandbox allow-scripts allow-forms allow-modals 双保险。
  • [ok] sha256 去重与变体数上限 — seen_hashes 重复即 ContractError;'2 <= len(variants) <= 8'。
  • [ok] 无网络外发/凭证 — build_board.py imports 仅 stdlib(argparse/hashlib/html/json/re/sys/html.parser/pathlib);无 http/密钥。
  • [unlocatable] gstack serve/reload 集成 — 依赖外部 gstack 工具(仓库外),本环境未安装;SKILL 中 serve/reload/反馈端点语义无法端到端验证,代码侧仅见模板对 __GSTACK_SERVER_URL 与 ./api/feedback 的 POST。
  • [unlocatable] Board 内候选交互可用性(UI 层) — 模板 434 行含 tab/对比视图/反馈面板 JS,未在浏览器实测;fixtures+test_build_board.py 覆盖构建层而非视觉层。

6结论

  • 把『可运行、可点、可比较』立为产出底线,静态图只作支持证据
  • 构建器把安全/合规做成硬校验(穿越、外链、重复、缺失状态全拒),不是文档劝告
  • 运行隔离到 CSP/sandbox 层:候选 JS 物理上无法联网或嵌 frame
  • worker 隔离式并行=把 test-time scaling 落到产品设计流程
  • 生产门禁严格:approved.json 前不动产品代码,QA 点击不冒充用户验证
  • 适合: 适合交互不确定性高的单面/单流程决策:层级、工作流、披露、选择模型、任务交接『感觉不专业但说不出哪』时给出可操作对比;适合多 worker 宿主做并行假说生成(test-time scaling);适合与 design-style-picker 接力(先定视觉再比交互)或 gstack 系列协同。
    不适合: 不适合一行 CSS 调整/已有批准规格的纯实现(SKILL 明说);不适合宿主无浏览器且无 gstack 的纯文本环境(Board 要人点);决策不依赖『点击后发生什么』的静态视觉选择应走 design-style-picker;原型数据需真实后端回包的产品场景(SKILL 要求 honest local state,不模拟产品没有的后端)。
    Install Agent-Ready
    ① Verified Mirror 2026-09-09
    Option A · Direct DownloadDownload interaction-design-board.tar.gz
    sha256: bb7d5b878d07fe8e…
    Option B · Copy Guide for Agent
    install.json
    agent 读 JSON 指南后会自动从本站下载安装,无需更多说明。
    ② Upstream GitHub
    GitHub Repo ↗
    Pinned to commit d5c4678cb5.