Ui Canvas logo

Ui Canvas

OrganizationPopular
Prismer-AI
ui-canvas

Use when a product journey, production component path, UI/UX operation sequence, visual regression, or alignment review must be represented or audited in /ui-canvas with implementation-spec references, immutable versions, task-bound screenshots, and a persisted ReportCard.

Overview

PublisherPrismer-AI
RepositoryPrismerCloud
Skill nameui-canvas
Stars
1.6K
Forks
17
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Prismer-AI on GitHub. Read the source before you install it.

Installation

Install the Ui Canvas AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Prismer-AI/PrismerCloud/tree/main/sdk/apc/skills/ui-canvas
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Prismer-AI/PrismerCloud.git /tmp/PrismerCloud
mkdir -p .claude/skills
cp -r /tmp/PrismerCloud/sdk/apc/skills/ui-canvas .claude/skills/ui-canvas
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Ui Canvas in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Ui Canvas on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Ui Canvas is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

UI Canvas

用一个代码定义的展开画布完成 spec ↔ 真实生产组件 ↔ 用户操作 ↔ 可寻址视觉证据 对齐。Production checkpoint 必须在 Frame 内直接渲染真实 UI;不能安全渲染就保留同尺寸 gap contract。最终证据来自真实 /ui-canvas deep link,不来自 /ui-kit 仿制稿。

承重规则

  1. 先读 implementation spec 的 UI Canvas index 和 Canvas registry,建立双向索引。
  2. 禁止从 src/app/ui-kit/sections/** 取节点实现;/ui-kit 仅是历史参考。
  3. Canvas callback 只能改变本地 fixture、选中节点和 edge 高亮,不得发业务请求。
  4. aligned 版本不可原地修改;需求变化时新增版本并用 previousVersion 回指。
  5. Production Frame 直接 import 生产组件;不能复用就写 gap,不复制 JSX 冒充闭合。
  6. 测试和截图只证明 Canvas route/registry/render;不能证明 service、DB、daemon 或业务副作用。
  7. 截图 asset 与 ReportCard 证明“证据已产出”,不能自动判定“视觉正确”。

Workflow

1. 建立双向索引

从 spec 找出 set、journey、checkpoint 与 user/system oracle。每个 CanvasSet、version、journey、node 都持有真实 SpecRef;spec 反向列出 Overview、journey deep link 与 registry source。

2. 盘生产 source

bash
rg -n "export (function|const|class)" src/app src/components
rg -n "ui-kit/sections|fetch\\(|imFetch\\(|/api/" src/app/ui-canvas
判定条件动作
productionprops 可确定性渲染,callback 可留在本地在 component-registry.tsx 直接 import
gap没有生产组件,或 wrapper 挂载即请求/轮询写清 reason、driftRef、双 oracle

生产 wrapper 只因数据编排不能复用时,可抽纯 *View 让生产 wrapper 与 Canvas 共用;不得借机修改 endpoint、model、daemon 或 SDK。

3. 写不可变版本

  • draft 可编辑;aligned 后冻结。
  • 需求变化新增版本文件,不覆盖历史文件。
  • checkpoint 总数、唯一性、edge 完整性和 production source 由 registry test 锁定。
  • Overview 从 journey registry 派生,不复制 checkpoint。

4. 展开 Frame 与操作边

  • Production checkpoint 使用约 960×680 的 Frame,body 直接挂 renderer。
  • Gap 使用同尺寸 contract,显示 reason、driftRef、双 oracle 和 SpecRef。
  • 默认相机聚焦 deep-link Frame;整条路径缩略图只能通过显式 Fit journey。
  • Inspector 使用浮层,不永久挤压真实组件。
  • Edge label 写用户动作或条件;用 action / condition / error / recovery / handoff 区分语义。
  • 生产 callback 选择对应 outgoing edge;没有真实 target 时只记录 local action。

5. 验证结构与真实渲染

bash
npx vitest run src/app/ui-canvas/__tests__
npx tsc --noEmit
PRISMER_BASE_URL=http://127.0.0.1:3000 \
  npx playwright test e2e-playwright/specs/ui-canvas.spec.ts --project=chromium
rg -n "ui-kit/sections|fetch\\(|imFetch\\(|/api/" src/app/ui-canvas

Playwright 只能打本地 127.0.0.1:3000。截图前先断言目标可见,不得用 .first() 掩盖稳定态重复节点。

6. 发布 task-bound 视觉证据

先从代码 registry 读取合法 set/version/journey:

bash
npx tsx scripts/ui-canvas-evidence.ts --list

再对需要验收的真实 Frame deep link 产 light/dark 截图、task asset 和一张 ReportCard:

bash
npx tsx scripts/ui-canvas-evidence.ts \
  --set <set> --version <version> --journey <journey> --node <node> \
  --themes light,dark \
  --workspace "$APC_WORKSPACE_ID" --task "$PRISMER_TASK_ID"

Runner 的顺序是:registry target 校验 → 可选 baseline asset 回读 → Playwright 打真实 /ui-canvas deep link → PNG 像素闸 → 上传 task-bound assets → 写 visibility=task:<id> 的 ReportCard。非法 set/version/journey/node 在任何副作用前失败。默认 ReportCard path 同时包含 task 与本次 evidence id,因此同一节点重复运行不会撞已有 page;显式 --path 时调用方必须提供未占用路径。

需要旧图/新图并排时只传一个 --baseline-light 或 --baseline-dark;一张 ReportCard 只承载所选 theme 的一组 old/new。它只是 reference,不是 diff;结构化输出的 comparison 恒为 "none"。禁止编造偏差百分比、changed pixels 或视觉 PASS。

凭据只从已设置的 APC_API_KEY / PRISMER_API_KEY 环境读取,禁止把 token 放进命令参数或报告。

没有 task/workspace/live local cloud 时可以完成代码审计,但证据步骤必须写 not-run + 原因,不能声称已产 asset 或 ReportCard。

输出契约

text
CANVAS: <set>@<version> | route: </ui-canvas?...>
PRODUCTION: <count> | source: <repo-relative-path:line>
GAPS: <count> | refs: <drift refs>
REGISTRY-TEST: <command> | exit: <code>
PLAYWRIGHT: <local command> | exit: <code> | passed: <count>
EVIDENCE: route=<exact deep link> | themes=light,dark | comparison=none
ASSETS: light=<assetId>(bytes=<n>) | dark=<assetId>(bytes=<n>)
REPORTCARD: pageId=<id> | uri=<prismer uri> | visibility=task:<taskId>
HARNESS: <command> | exit: <code>
BOUNDARY: canvas interaction and evidence are not service verification

只汇报真跑结果。任何 not-run 都必须带原因;没有 pageId 就没有持久化 ReportCard。

Red flags

  • 在 /ui-kit 画一个相似稿再当 production
  • 用摘要卡代表真实 UI,或把真实组件藏进 detached Focus
  • 默认 Fit 整条路径,导致 Frame 变成不可读缩略图
  • 复制生产 JSX 到 Canvas
  • 用 mock 隐藏缺失 checkpoint
  • 为截图在 Canvas 调业务 API
  • 原地修改 aligned 版本
  • 用 asset/ReportCard 的存在声称视觉已经通过
  • 把 Canvas local callback 说成系统副作用已验证

出现任一项就停止,把节点改回 gap、建立共享生产 *View,或如实降低证据结论。

调用回执

执行本 Skill 的第一步:

bash
cloud skill ack ui-canvas --task "$PRISMER_TASK_ID"
exit含义动作
0回执已落库继续
3无 task 上下文继续,但不得声称已 ack 或已发布 task evidence
4不是 task assignee停止并上报
1网络或服务端失败重试一次,仍失败则标注回执缺失

回执只证明 Skill 被调度,不证明执行正确。

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Ui Canvas AI skill do?

Use when a product journey, production component path, UI/UX operation sequence, visual regression, or alignment review must be represented or audited in /ui-canvas with implementation-spec references, immutable versions, task-bound screenshots, and a persisted ReportCard.

Why use Ui Canvas on TypingMind?

Because you install it once and use it with any model. Ui Canvas is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Ui Canvas in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Prismer-AI/PrismerCloud/tree/main/sdk/apc/skills/ui-canvas. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Ui Canvas?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Ui Canvas?

As many as you like. As long as a model supports skills, you can use Ui Canvas with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Ui Canvas AI skill free?

Yes. It is published on GitHub by Prismer-AI under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇