baoyu-design README

The project's README from github.com/JimLiu/baoyu-design. As one markdown file: README.md.

baoyu-design

Run Claude Design on your own local agent — Cursor, Claude Code, Claude Desktop, or any file‑capable coding agent.

English · 简体中文 · Changelog

License: MIT Best with Opus 4.8 Harness

baoyu-design packages Claude Design — the design engine behind claude.ai/design — as a portable Agent Skill. Drop it into a local agent and you get most of what the website does, right inside your editor: polished UI mockups, interactive prototypes, wireframes, landing pages, dashboards, mobile apps, and slide decks — all produced as self‑contained HTML.

No website, no separate subscription, no upload step. The agent already on your machine does the work, and every artifact stays in your repo.


Screenshots

The same Reader Mac App prompt was used in Cursor, Codex, Claude, and Claude Design.

Cursor Codex Claude Claude Design
Cursor running baoyu-design Codex running baoyu-design Claude running baoyu-design Claude Design running the same Reader Mac App prompt
Prompt used for all screenshots
Build a Reader Mac app that helps me read and save articles better. All data is stored locally.

## Information collection

1. Manual adding
Support manually adding different types of information:
- URL: enter a URL and automatically fetch content and images
- Attachments: upload PDFs, videos, and images
- Markdown editing: like publishing a blog post, enter the title, body, and cover image
- Other

2. Automatic subscriptions
- RSS feeds
- Social media accounts: X, Weibo, YouTube
- Other

## Editing and organization

1. Tags
Every item can have tags.

2. Categories and folders
Create tree-structured folders and place content in different categories.

3. Favorites
Users can click to favorite an item.

4. Editing
Every item can be edited with a built-in Markdown editor.

## AI assistance

1. Automatic translation
Support translation across different languages.

2. Summaries and abstracts
Generate summaries for captured content.

3. Derivative creation
Create new work based on one or more pieces of content.

4. Integrated AI Chat
Use AI Chat to call AI Agents that help process content.

Why run it locally


What it can make

The skill drives a full design process — clarifying questions → gathering design context → producing one or more HTML deliverables → previewing and verifying. It ships a deep bench of built‑in skills and a set of ready‑made component scaffolds.

Area Built‑in skills
Core design Hi‑fi design · Interactive prototype · Wireframe · Frontend aesthetic direction
Decks Make a deck · Speaker notes
Mobile & motion Mobile prototype · Animated video · Sound effects
Web & campaigns Website & landing page · Social media content · HTML email · Flier · Trifold brochure
Data & research Web research · Data science · Data visualization · Maps & geography · Experiment workflow
Documents, 3D & illustration Make a doc · 3D object · Watercolor illustration
Design systems Create design system · Use design system · Design system preview · Design Components (.dc.html) · Make tweakable
Import sources Figma .fig (offline decode) · GitHub repo · Existing HTML/CSS
Export & handoff Standalone HTML · PDF · PPTX (editable) · PPTX (screenshots) · Video (MP4) · Send to Figma · Send to Canva · Handoff to Claude Code
AI assets & integration Gemini image generation · Call Claude from prototypes · Read PDF

Starter components (in starter-components/) save the agent from hand‑rolling the basics: device, browser, and social-media shells; a pan‑zoom design canvas; slide, animation, chart, document, file, and 3D stages; a tweaks panel; and a fillable image slot.


How it works

The skill is plain Markdown plus a few JSX/JS scaffolds — no build step, no runtime.

skills/baoyu-design/
├── SKILL.md              # Entry point — orchestrates the whole flow
├── system-prompt.md      # The design methodology & craft standards (source of truth)
├── references/
│   ├── claude.md         # Tool map for Claude Code
│   ├── cursor.md         # Tool map for Cursor
│   └── codex.md          # Tool map for Codex Agent
├── built-in-skills/      # Specialized prompts (decks, mobile, import, export, …)
└── starter-components/   # Device/social shells, deck, chart, document, 3D, animation, …

When you ask for a design, the agent reads SKILL.md, loads the core methodology from system-prompt.md, detects whether it's running in Cursor, Claude Code, Codex Agent, or a generic file‑capable harness, and reads the matching reference doc when one exists. It then pulls in only the built‑in skill(s) the task needs. The split keeps craft rules harness‑independent while each environment resolves its own tools for asking questions, previewing, screenshotting, and verifying.


Quick start

Prerequisites

Install

Recommended — the skills CLI. npx skills (from Vercel Labs) reads this repo, finds skills/baoyu-design/, and drops it into the right folder for whatever agent it detects:

# Install into the current project (auto‑detects your agent)
npx skills add JimLiu/baoyu-design

# …or install globally, for every project
npx skills add JimLiu/baoyu-design -g

# Target a specific agent explicitly
npx skills add JimLiu/baoyu-design --agent claude-code
npx skills add JimLiu/baoyu-design --agent cursor
npx skills add JimLiu/baoyu-design --agent codex

# Just list what's in the repo first
npx skills add JimLiu/baoyu-design --list

It installs to .claude/skills/ for Claude Code and .agents/skills/ for Cursor/Codex-style agents (add -g for the ~/‑level user install).

Update

If you installed baoyu-design with the skills CLI, update it from the terminal:

# Update and let the CLI prompt for the install scope
npx skills update baoyu-design

# Update the project-level install
npx skills update baoyu-design -p -y

# Update the global install
npx skills update baoyu-design -g -y

upgrade is also supported as an alias:

npx skills upgrade baoyu-design

You can also run npx skills update to update all installed skills. After updating, restart Claude Code (or start a new agent session) so the refreshed skill files are loaded.

Alternative — hand the repo URL to your agent. Don't want to install anything? Paste the URL into chat and let the agent fetch the skill itself:

Read https://github.com/JimLiu/baoyu-design and follow its skills/baoyu-design/SKILL.md to design a settings screen for a meditation app.

The agent clones or fetches the repo, loads SKILL.md, and proceeds — perfect for a one‑off.

Use it

Once the skill is installed (or fetched), just describe a design task in plain language — it auto‑activates from its description:

Design 3 hi‑fi variations of a settings screen for a meditation app.

In Claude Code you can also trigger it explicitly with /baoyu-design; in Codex, mention $baoyu-design when skills are available. The agent asks a few clarifying questions, builds the HTML under designs/, and previews it over localhost. Point at any element in the live preview and say what to change — the agent edits the underlying source for a fast, visual second pass.

Preview server

Deliverables are previewed over HTTP (multi‑file prototypes won't load from file://). The agent normally starts this for you; to run it by hand:

python3 -m http.server 4311 --directory designs
# then open http://localhost:4311/<project>/<file>.html

Design systems

Beyond one‑off mockups, the skill can hold a whole project to a design system — a versioned bundle of a brand's tokens, fonts, components, and full UI kits. Systems live next to your projects under designs/: author one with the Create design system built‑in skill, drop in a pre‑built one, or import one from a Figma .fig file (see the next section). Once a system exists, two flows let any project consume it.

Import an existing design system

When you start a design, the agent asks where to save it and which design system(s) to use — it discovers every system under designs/ and lists them, so you can pick none (free design), one, or several. Name one up front and it skips the menu:

Design a settings screen using the Fluent 2 design system.

For each system you choose, the agent syncs a self‑contained, version‑pinned copy into your project at _ds/<slug>/, wires its CSS and component bundle into the page, and records the binding in the project's _d_meta.json. That local copy is what keeps the project portable and reproducible — nothing reaches outside the folder, and re‑running the import is how you pull updates later. Choose several systems and one becomes primary — it owns the overall look and wins any token collision, while the others lend specific components.

Use an imported design system

Once a system is bound it acts as a binding visual contract, not a loose suggestion: every screen is built from the system's real tokens, type, spacing, and components, and the agent won't invent off‑system colors or styles. If the system ships starting points — ready‑made screens or components — you can seed a new design from one instead of starting blank.

The binding travels with the project. Reopen it later and the agent reads _d_meta.json, reloads the system, and keeps designing in‑style — no need to re‑pick. From there you can refresh a system to pull updates, add another, swap which one is primary, or remove one entirely.


Import design sources

Real context beats description. Three built‑in import skills turn material you already have into design ground truth the agent works from directly:

Anything imported as a design system compiles into a single self‑contained, interactive preview.html. This is the community Chakra UI Figma Kit .fig after one import conversation — 28 components in semantic groups, 400+ curated tokens, guideline cards, and a self‑authored showcase, all browsable in one file:

preview.html of a design system imported from the Chakra UI Figma Kit .fig

Decks & PPTX export

Ask for a slide deck and the skill builds it the same way it builds everything else — as a self‑contained HTML page, using the deck-stage component and the Make a deck built‑in skill. Because the deck is just a web page, the whole editing loop stays where you already are:

Slide animations

Decks can carry per‑element build animations that survive export. Just ask — "build the list point by point", "fly the chart in on click", "move the ball along an arc" — and the agent authors the slide in its final layout, then marks the elements that should build with data-anim attributes:

<li data-anim="fade-in" data-anim-trigger="click">First point</li>
<li data-anim="fly-in" data-anim-dir="right" data-anim-trigger="click">Second point</li>
<img data-anim="zoom-in" data-anim-trigger="with" src="chart.png">
<div class="ball" data-anim="path" data-anim-path="C 100 -200 300 -200 400 0"></div>

The full attribute reference lives in make-a-deck.md (→ Animations).

When the deck is ready, export it to PowerPoint by saying so in the same conversation — "export this to PPTX", "export to PowerPoint", or "做个 PPT" all route to the export flow (it only exports decks this skill builds, not arbitrary HTML). Two modes:

Running locally: on claude.ai/design, PPTX export is a built‑in gen_pptx tool — and that tool isn't there when you run the skill on your own agent. So the skill ships its own: a local CLI (agents/gen-pptx/) that drives headless Chromium via Playwright and writes the .pptx with a vendored PptxGenJS. In Claude Code it runs after a one‑time build (cd skills/baoyu-design/agents/gen-pptx && npm install && npx playwright install chromium && npm run build); from then on the agent serves the deck and invokes the CLI for you.

How gen_pptx works

The core idea: don't parse HTML — render it in a real browser, then translate the result into PowerPoint.

gen_pptx export pipeline

The CLI launches a headless Chromium via Playwright and loads the deck as a live web page (which is why it needs an http:// URL, not file://). A capture bundle is injected into the page and exposed as window.__genpptx; the Node driver talks to it through page.evaluate() — everything that needs the real browser (layout, computed styles, font metrics, image decoding) runs in‑page and returns pure data to Node.

Before any slides are captured, setup() hides UI chrome, applies font substitutions (injecting @font-face rules or fetching from Google Fonts), undoes transform: scale() wrappers so measurements reflect authored dimensions, waits for document.fonts.ready, and collects speaker notes.

Then slides are processed one by one — showJs navigates to each slide, a delay lets transitions settle, and images are .decode()'d. From here the two modes diverge:

baoyu-design (JimLiu/baoyu-design)

Searching Database…

这是什么?baoyu-design 把 Claude Design——claude.ai/design 背后的设计引擎——打包成一个可移植的 Agent Skill,你可以放进 Cursor、Claude Code 或 Codex 等本地编程 agent,生成精美的 UI 效果图、原型、线框图、落地页、仪表盘和幻灯片,全部为自包含的 HTML。
这是我运行的应用,还是放进我的编程 agent 里的东西?它是一个 Skill,不是独立应用:纯 Markdown 加少量 JSX/JS 脚手架,没有构建步骤,也没有运行时。你现有的 AI agent 读取它并自己完成设计工作。
怎么把它添加到我的 agent?在你的项目中运行 `npx skills` CLI(Vercel Labs 出品)——它会检测你的 agent,并安装到 Claude Code 的 `.claude/skills/` 或 Cursor/Codex 类 agent 的 `.agents/skills/`。另一种方式是直接把仓库 URL 粘贴到对话中,让 agent 去读取 `skills/baoyu-design/SKILL.md`。
它需要哪些 agent 和模型?它需要一个能访问本地文件的 agent——Cursor、Claude Code、Codex,或安装器支持的 70 多个其他 agent——还需要 Node.js 来运行安装器。选择 Claude Opus 4.8 作为模型时效果最佳。
预览输出时有什么要注意的坑吗?生成的设计必须通过本地 HTTP 预览服务器查看,不能直接作为文件打开——多文件原型无法通过 file:// 加载,需要 agent 通常会为你启动的那个服务器。
我可以把现有的 Figma 文件或 GitHub 仓库作为设计参考喂给它吗?可以——它可以在完全离线、无需 API 令牌的情况下解码 Figma .fig 文件;在克隆之前先浏览 GitHub 仓库的目录树,只获取所需内容;还能读取现有网站的 HTML/CSS,把真实的颜色、字体和间距提取到你的项目中。
我可以跨项目保持一致的设计系统吗?可以——你可以创建、导入或绑定一个包含设计令牌、字体和组件的版本化设计系统,agent 之后会把它当作严格的视觉契约来对待,而不是对每个界面的宽松建议。
我能把幻灯片转换成带动画的可编辑 PowerPoint 吗?可以——幻灯片以自包含 HTML 的形式构建,带有逐元素的入场动画(淡入、飞入、擦除、运动路径等),导出 PPTX 时这些相同的属性会自动转换为原生、可编辑的 PowerPoint 动画。
为什么不直接去 claude.ai/design,而要用这个?它无需单独的订阅或上传步骤就能提供该网站的大部分设计能力——工作由你机器上已有的 agent 完成,而且每个 HTML 产物都以版本化的形式保存在你自己的仓库中。
Creator
JimLiu
Size
8.2 MB
Stars
4.4K
Age
4mo
Commits · 90 Days