Gdd Live 标志

Gdd Live

社区
hegemonart
gdd-live

实时浏览器内设计模式。用户可在运行中的开发服务器上选择一个 DOM 元素(通过 Claude Preview MCP),智能体会一次生成 N 个设计变体,再通过 HMR 或 preview_eval 使用 data-gdd-variant 标记在原位热切换。用户可接受或舍弃变体,整个“选择-生成-接受”流程会保存到 .design/live-sessions,因此即使发生崩溃或恢复,也能继续进行。当用户想对照真实运行的服务器迭代实时组件外观、要求尝试页面变体,或使用带 url 的 live 命令时使用;如果运行环境不支持 MCP,则退化为仅使用截图的模式。适用于涉及在浏览器中迭代设计、在开发服务器上选择元素或通过热切换生成变体的请求。

Add to TypingMind

概览

发布者hegemonart
代码仓库get-design-done
技能名称gdd-live
星标数
3
复刻数
1
附带文件
仅含指令
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 指令自成一体

    模型所需的一切都包含在指令中,无需同步额外文件。

  • 开源

    由 hegemonart 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Gdd Live AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/hegemonart/get-design-done/tree/main/scripts/skill-templates/live
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/hegemonart/get-design-done.git /tmp/get-design-done
mkdir -p .claude/skills
cp -r /tmp/get-design-done/scripts/skill-templates/live .claude/skills/gdd-live
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Gdd Live,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Gdd Live。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Gdd Live 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

gdd-live - Live In-Browser Design Mode

Pick a DOM element on a running dev server, generate competing design variants, hot-swap them in place, and accept the winner as a real source edit. Every step persists to .design/live-sessions/<id>.json so the session survives a crash or a later resume.

The browser-side runtime, the harness-mode gate, the session store, the events feed, the post-check, the scope guard, and the bandit feed are all separate modules under scripts/lib/live/. This skill describes the loop and names the module that owns each step; it does not import them.

For the full surface (the Preview MCP tools, the six live_* events, the session file, the bandit feed, degraded mode, the scope guard), see ../../reference/live-mode-integration.md. For the SKILL.md structural contract, see ../../reference/skill-authoring-contract.md.


Arguments

  • [url] - the page to drive. Optional. When omitted, detect the dev server and use its root.
  • --variants N - how many variants to generate per pick. Default 3.
  • --resume <session-id> - reattach to an in-progress session in .design/live-sessions/.

BOOT

  1. Probe the Preview MCP per ../../connections/preview.md: ToolSearch({ query: "Claude_Preview" }), then mcp__Claude_Preview__preview_list. Empty ToolSearch means the MCP is not loaded.
  2. Resolve the harness live mode. The capability signal is capability_matrix.mcp_support in scripts/lib/manifest/harnesses.json, projected by scripts/lib/live/harness-mode.cjs (liveModeFor(harnessId)). A puppeteer result means full live mode; a degraded result means screenshot-only.
  3. If mcp_support is false for this harness, or Preview is unavailable, enter DEGRADED mode and say so plainly: variants are generated and captured as static screenshots, with no in-page hot-swap. Skip the INJECT and PICK steps; generate against the file the user names instead.
  4. Detect the dev server. Look for Vite, Next, Bun, or a static server (check package.json scripts plus a preview_list entry). Record the server descriptor on the session.
  5. Open or create the session via scripts/lib/live/session-store.cjs (.design/live-sessions/<id>.json). On --resume, load the named session (see RESUME).

INJECT

Inject the browser runtime once. Read RUNTIME_JS from scripts/lib/live/runtime.cjs and evaluate it in the page with mcp__Claude_Preview__preview_eval. The runtime is an idempotent IIFE bound to window.__gddLive, so a re-inject after navigation rebinds the same singleton rather than stacking listeners. It installs the pick handler and the variant-swap helpers, and stamps the live variant on the element via the data-gdd-variant attribute.


PICK

  1. Arm the picker (window.__gddLive.pick()), then guide the user to click the target element. Use preview_click and preview_inspect to confirm the element and read its computed styles and bounding box.
  2. Read the pick report back. Its fields are documented in pickReportShape (selector, tagName, classList, boundingRect, computedStyle subset, current variant). The selector strategy prefers id, then a data-testid, then a tag plus class plus nth-of-type path.
  3. Emit a live_pick event through scripts/lib/live/events.cjs and append a pick entry to the session.

GENERATE (one batch)

  1. Load the relevant Phase 45 canonical reference index FIRST, so variants are grounded in real guidance: the domain index that matches the picked element (for example ../../reference/spatial.md for layout, ../../reference/interaction.md for components and a11y, ../../reference/color.md for color, ../../reference/typography.md for type, ../../reference/motion.md for animation).
  2. Generate all N variants in ONE batch (default 3), each a distinct, hypothesis-tagged design direction for the picked element. Do not generate them one at a time.
  3. For each variant: write the change atomically to the implicated source file, then make it live. With HMR running, the file write is enough; otherwise apply the variant in place with window.__gddLive.swapVariant({ n, style, html }), which sets data-gdd-variant="n" and applies the variant's style or markup.

POST-CHECK

Run the post-check on each variant via scripts/lib/live/postcheck.cjs, which invokes gdd-detect. Show the findings inline next to each variant. A variant that trips a finding is flagged, NOT auto-rejected: the user still decides. Append a live_postcheck event per variant.


ACCEPT / DISCARD

  • ACCEPT one variant: apply the chosen variant as the canonical source edit, and revert the others in the page (window.__gddLive.revert() on each non-chosen element). Emit a live_accept event and feed the outcome to the design-variants bandit via scripts/lib/live/bandit-feed.cjs (a dev-time signal). Append an accept entry.
  • DISCARD: revert every variant in the page back to its captured original and leave the source untouched. Emit a live_discard event and append a discard entry.

Either way, persist the result through scripts/lib/live/session-store.cjs before continuing.


PERSIST

Every step (boot, pick, generate, post-check, accept, discard) is written to the session file through scripts/lib/live/session-store.cjs as it happens. The on-disk event log uses the pick, generate, accept, discard kinds; the telemetry stream uses the six live_* event types. Writes are atomic, so an interrupted step never leaves a half-written session.


RESUME

With --resume <session-id>, load the named session from .design/live-sessions/. Only an in_progress session is resumable. Offer the user two choices: continue from the last recorded event (report what that was, for example "last pick was the primary button"), or start fresh (open a new session and leave the old one intact). Never silently replay completed events.


SCOPE GUARD

Never write outside the source files implicated by the picked element. Run every proposed write through scripts/lib/live/scope-guard.cjs, which maps the picked selector to its owning source files and rejects edits that fall outside them. If a variant would need a change beyond that scope (a shared token, a parent layout, a new dependency), stop and surface it to the user rather than widening the blast radius.

Constraints

  • Do NOT edit files outside the picked element's implicated sources (enforced by the scope guard).
  • Do NOT generate variants one at a time; generate the full batch, then swap.
  • Do NOT auto-reject a variant on a post-check finding; flag it and let the user decide.
  • In DEGRADED mode, state up front that hot-swap is unavailable and fall back to screenshots.
  • Persist before every user-facing prompt so a crash never loses accepted work.

LIVE COMPLETE

常见问题

Gdd Live AI 技能有什么作用?

实时浏览器内设计模式。用户可在运行中的开发服务器上选择一个 DOM 元素(通过 Claude Preview MCP),智能体会一次生成 N 个设计变体,再通过 HMR 或 preview_eval 使用 data-gdd-variant 标记在原位热切换。用户可接受或舍弃变体,整个“选择-生成-接受”流程会保存到 .design/live-sessions,因此即使发生崩溃或恢复,也能继续进行。当用户想对照真实运行的服务器迭代实时组件外观、要求尝试页面变体,或使用带 url 的 live 命令时使用;如果运行环境不支持 MCP,则退化为仅使用截图的模式。适用于涉及在浏览器中迭代设计、在开发服务器上选择元素或通过热切换生成变体的请求。

为什么在 TypingMind 中使用 Gdd Live?

因为您只需安装一次,就能搭配任何模型使用。Gdd Live 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Gdd Live?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/hegemonart/get-design-done/tree/main/scripts/skill-templates/live。TypingMind 会读取其中的 SKILL.md,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Gdd Live?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Gdd Live 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Gdd Live 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Gdd Live AI 技能免费吗?

是的。hegemonart 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇