Prototype 标志

Prototype

组织
nightly-labs
prototype

为某项功能或问题设计多种不同的方案(默认 3 种),制作成 Storybook stories 展示给用户,并让用户选择一种。用户输入 `$prototype <feature>`、说“为 X 制作原型”,或要求在实现前提供不同设计变体、选项或方向时使用。

Add to TypingMind

概览

发布者nightly-labs
代码仓库openbot
技能名称prototype
星标数
521
复刻数
81
附带文件
仅含指令
链接
  • Markdown 格式的指令

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

  • 兼容任何大语言模型

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

  • 指令自成一体

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

  • 开源

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

安装

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

1

安装到 TypingMind

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

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

安装到其他智能体

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

Claude Code — .claude/skills
git clone --depth 1 https://github.com/nightly-labs/openbot.git /tmp/openbot
mkdir -p .claude/skills
cp -r /tmp/openbot/.agents/skills/prototype .claude/skills/prototype
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

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

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

兼容任何 AI 模型

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

  • 仅在需要时加载

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

  • 在聊天中切换模型

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

技能指令

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

Prototype

Make a small number of different, clickable directions for one feature in Storybook. Show them to the user. The user chooses the direction. Do not implement the feature in product code before the user chooses.

The usual call is short, for example $prototype new pricing page. Get the missing details from the issue and the code. Ask only when you cannot continue without the user.

Inputs

  • Subject: the text after $prototype, an issue number, or an issue URL.
  • Count: 3 variants, unless the user gives a different number.
  • Style: follow the repository style and reuse its components, unless the user says otherwise (for example "go wild", "new visual style", "ignore the current design"). When the user sets the style aside, say which parts you changed.

Step 1 — Understand the subject

  1. When the subject is an issue, read it: gh issue view <n> --comments. Otherwise search open issues for the subject: gh issue list --search "<subject>" --state open. Use a match only when it is clearly the same feature.

  2. Find the current code for the feature, when it exists. Read it and its existing stories. Note what the user can do now, and the states it has (empty, loading, error, long data, narrow width).

  3. Find the surface:

    SurfaceStory locationStylesheet
    Desktop renderer, shared UIsrc/renderer/stories/Global; .storybook/preview.tsx loads it
    Public web (apps/auth-api)Beside the page, in apps/auth-api/src/components/<area>/. For a new page, use landing/Import apps/auth-api/src/styles.css in the story, as DiscordConnectPage.stories.tsx does

    A pricing page, landing page, or article is public web. A dialog, panel, sidebar, or settings screen is desktop.

    A public web page with the site header needs a router stand-in. Copy the WithRouter pattern from AgentTemplatePage.stories.tsx.

  4. Read packages/ui/AGENTS.md and src/renderer/AGENTS.md. For public web, also read apps/auth-api/AGENTS.md.

  5. Write down your assumptions in one short list. You show it to the user in Step 6.

Step 2 — List what to reuse

Before you write UI, list the parts that already exist:

  • Primitives from @openbot/ui (packages/ui/src/).
  • Feature components from @openbot/ui/features/<domain>/....
  • For public web: existing site components and classes in apps/auth-api/src/components/ and apps/auth-api/src/styles.css. Import only explicit @openbot/ui/... subpaths there. The @openbot/ui barrel fails the Worker typecheck.
  • Data that already exists, such as plans, prices, and limits in packages/contracts. Use the real values, not invented ones.
  • Fixtures and mocks: src/renderer/stories/*fixtures*, src/renderer/src/preview/, and the fixtures of related stories.
  • Design tokens and existing CSS classes. Do not add new colors, font sizes, radii, or spacing values when a token exists.
  • Similar screens in the app. A new screen must look like it belongs next to them.

Step 3 — Choose the directions

Each direction must be a different answer to the problem, not a different color. Change at least one of these between variants:

  • Information hierarchy: what the user sees first.
  • Layout: cards, table, list and detail, single column, steps.
  • Interaction model: inline edit, dialog, wizard, progressive disclosure.
  • Density: compact for experts, spacious for first use.

Give each direction a letter, a short name, one sentence for its idea, and one sentence for its main cost. Example for a pricing page:

VariantIdeaCost
A. Plan cardsThree cards side by side; the recommended plan is in the middleFeature differences are hard to compare
B. Comparison tableOne table with a row per featureDense on narrow screens
C. Guided choiceTwo questions, then one recommended planOne more step before the price

Do not ask the user to approve the directions. Build them.

Step 4 — Build the variants

Put each prototype in its own files. Do not change product code, shared components, contracts, or the i18n catalog for a prototype.

  • Stories: <Feature>Prototype.stories.tsx.
  • Prototype components, when the story file becomes long: <feature>-prototype.tsx in the same directory.
  • Styles, only when tokens and existing classes are not sufficient: <Feature>Prototype.css in the same directory. Scope each rule under a class of the prototype.

Use this story structure:

tsx
const meta = {
  title: "Prototypes/Pricing page",
  parameters: { layout: "fullscreen", a11y: { test: "error" } },
} satisfies Meta;

export default meta;
type Story = StoryObj<typeof meta>;

/** Three plan cards. The recommended plan is in the middle. */
export const PlanCards: Story = { name: "A. Plan cards", render: () => <PlanCardsVariant plans={PLANS} /> };
/** One table with a row for each feature. */
export const ComparisonTable: Story = { name: "B. Comparison table", render: () => <ComparisonTableVariant plans={PLANS} /> };
/** Two questions, then one recommended plan. */
export const GuidedChoice: Story = { name: "C. Guided choice", render: () => <GuidedChoiceVariant plans={PLANS} /> };

Give each variant component a Variant suffix, so its name is not the same as the story export.

Rules:

  • All variants use the same fixture data, so the user compares design, not content. Use realistic data: real plan names, long names, many rows.
  • Make each variant interactive with local signals or a store. A button that does nothing is acceptable only when its result is outside the feature.
  • When a state is important to the decision (empty, error, loading), add it as an extra story with the same letter, for example A2. Plan cards, empty.
  • Draft new copy as literals. no-hardcoded-ui-text.grit does not check stories, prototype files beside them, or apps/auth-api. On desktop, use existing i18n keys when they fit; the chosen variant moves its other text to catalog keys in Step 7.
  • When you reuse a shared class, check its media queries at phone width. Some site classes, such as compare-table, change layout below 640 px.
  • Keep a11y: { test: "error" }. Fix each accessibility violation. Use real roles, labels, and focus order.
  • Do not add play functions or data-testid. check:ui rejects them.
  • Do not add dependencies.
  • Do not add tests for a prototype.

Step 5 — Check and capture

Run these checks one at a time:

  1. bunx biome check --write --max-diagnostics=none <new files>
  2. The one typecheck project for the surface: bun run typecheck:renderer for src/renderer/stories/, or bun run typecheck:api for public web.
  3. Run bun run dev:status. When it lists a Storybook for this worktree, reuse it. Otherwise start Storybook with the Bash background option: env -u ELECTRON_RUN_AS_NODE bun run storybook --no-open. Use the port that it prints in Storybook: http://localhost:<port>. Do not pass --port. When Storybook exits with "Port is not available", another process holds the port that the wrapper chose. Start again with OPENBOT_STORYBOOK_PORT=<a free port> before the command.
  4. Open each variant at http://localhost:<port>/iframe.html?id=<story-id>&viewMode=story. The story ID is the title and the export name in kebab case, for example prototypes-pricing-page--plan-cards.
  5. Take a screenshot of each variant with the Playwright or Chrome DevTools tools. Save them in .openbot-build/prototypes/<feature>/ (git ignores this directory), for example a-plan-cards.png. Use a desktop width (1440 px) and, for public web, also a phone width (390 px). The desktop stylesheet sets overflow: hidden on html and body, so a full-page screenshot shows only the viewport. Before each screenshot, resize the viewport height to the scrollHeight of #storybook-root.
  6. Look at each screenshot. Fix broken layout, clipped text, overlap, and console errors that the prototype causes before you show the variants. Report errors that also occur without the prototype; do not fix them.

Leave Storybook running, so that the user can open the variants. When a subagent did the work, its background Storybook can stop when the subagent ends. Before you send the links, open one. When it does not load, start Storybook again.

Step 6 — Show the variants

Write one message:

  1. Your assumptions from Step 1, as a short list.
  2. One table: variant, idea, strengths, costs, Storybook link (http://localhost:<port>/?path=/story/<story-id>).
  3. The screenshots, embedded with their absolute paths.
  4. Your recommendation, in one sentence, with the reason.
  5. One question: which direction, or which mix (for example "B with the header of A").

Then stop. Do not commit, push, or open a PR unless the user asks.

Step 7 — After the user chooses

  • More rounds: when the user asks for changes or a mix, change the prototypes and repeat Steps 5 and 6. Remove the variants that the user rejected.
  • Implement: when the user tells you to build the chosen direction, build it in product code with the normal repository rules: shared UI in packages/ui, text as docs/i18n.md says for the surface, release notes in changelog.d/, and focused checks only. Then delete the prototype files, or change the chosen story into the feature's normal story under its domain title. Do not keep Prototypes/ stories in a PR unless the user asks for them.

常见问题

Prototype AI 技能有什么作用?

为某项功能或问题设计多种不同的方案(默认 3 种),制作成 Storybook stories 展示给用户,并让用户选择一种。用户输入 `$prototype <feature>`、说“为 X 制作原型”,或要求在实现前提供不同设计变体、选项或方向时使用。

为什么在 TypingMind 中使用 Prototype?

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

如何在 TypingMind 中安装 Prototype?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/nightly-labs/openbot/tree/main/.agents/skills/prototype。TypingMind 会读取其中的 SKILL.md,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Prototype?

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

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

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

Prototype AI 技能免费吗?

nightly-labs 已在 GitHub 上发布了该技能。请查看代码仓库了解许可条款。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

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

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

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

查看全部

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

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