dsh-claude-design-system 2.4.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +5 -0
- package/NOTICE.md +58 -0
- package/README.md +1 -1
- package/lib/client.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +4 -3
- package/skills/claude-design-system/SKILL.md +14 -1
- package/skills/claude-design-system/scripts/artifact.mjs +316 -78
- package/skills/claude-design-system/scripts/editor/assets/{index-CHV2ZUA0.js → index-BABbb9P5.js} +104 -104
- package/skills/claude-design-system/scripts/editor/index.html +2 -2
- package/skills/claude-design-system/scripts/editor/share-ui.js +83 -0
- package/skills/claude-design-system/scripts/server.mjs +817 -95
package/LICENSE
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
This MIT License covers only the original work of Jim Liu 宝玉 in this repository
|
|
2
|
+
and in the baoyu-design npm packages. It does not cover the material from
|
|
3
|
+
Anthropic or the third-party open-source code listed in NOTICE.md, which keep
|
|
4
|
+
their own terms.
|
|
5
|
+
|
|
1
6
|
MIT License
|
|
2
7
|
|
|
3
8
|
Copyright (c) 2026 Jim Liu 宝玉
|
package/NOTICE.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Notices
|
|
2
|
+
|
|
3
|
+
baoyu-design holds material under three different sets of terms. The MIT License in [LICENSE](LICENSE) covers only the first. The same applies to the DeepSeek Harness plugins on npm, which ship this file next to their `LICENSE`.
|
|
4
|
+
|
|
5
|
+
[中文说明](#中文说明)
|
|
6
|
+
|
|
7
|
+
## 1. The maintainer's own work: MIT
|
|
8
|
+
|
|
9
|
+
Copyright (c) 2026 Jim Liu 宝玉, under the MIT License in [LICENSE](LICENSE):
|
|
10
|
+
|
|
11
|
+
- The local tooling: each skill's `scripts/artifact.mjs` and, where there is one, `scripts/server.mjs` (the command line and the local editor server), the local comments, and what lets the editors run on a local machine instead of claude.ai.
|
|
12
|
+
- The DeepSeek Harness plugins' own code and files: `dsh-plugins/*/lib/`, `cordis.patch.yml`, `locale/`, `docs/` and `icon.svg`.
|
|
13
|
+
- The parts of the skills' text written for local agents: how to open and run the editors, local paths and files, comments.
|
|
14
|
+
- The READMEs, the changelogs, the images in `assets/` and the files in `.github/`.
|
|
15
|
+
- The maintainer's tools in `archive/baoyu-design/agents/`, apart from the open-source code vendored there (section 3).
|
|
16
|
+
|
|
17
|
+
## 2. Material from Anthropic: not MIT
|
|
18
|
+
|
|
19
|
+
baoyu-design brings claude.ai's Artifact types and Claude Design to local agents, so much of what it ships comes from Anthropic, PBC. That material stays Anthropic's. Anthropic has published no license for it, apart from the one file in section 2.1, and this project grants none: the MIT License does not apply to it. It is included so the skills work as they do on claude.ai. This project is independent and is not affiliated with or endorsed by Anthropic.
|
|
20
|
+
|
|
21
|
+
- **Skill instructions.** Each `skills/claude-*/SKILL.md` adapts the SKILL.md of a claude.ai Artifact type. The maintainer's local-agent changes are described in section 1.
|
|
22
|
+
- **Reference docs.** `skills/*/artifact-type/reference/`, and the copies under `scripts/editor/artifact-type/`: the craft, format and layout guides, font lists and other references of the Artifact types.
|
|
23
|
+
- **The `dataviz` skill.** `skills/dataviz/` is Anthropic's dataviz skill. Its palette validators include code from Color.js (MIT, Lea Verou and Chris Lilley), credited in the files.
|
|
24
|
+
- **The editors.** `skills/claude-*/scripts/editor/` holds editors reconstructed from the claude.ai Artifact-type runtimes: their interface, wording and behaviour are Anthropic's. The built files mix that reconstruction with the maintainer's local additions (section 1) and with open-source packages (section 3).
|
|
25
|
+
- **Icon fonts.** The Anthropicons icon fonts: the `anthropicons-*.woff2` files in the editors' `assets/` and `artifact-type/` folders, and the Anthropicons font faces embedded as data URIs in the editors' CSS.
|
|
26
|
+
- **The archived `baoyu-design` skill.** In `archive/baoyu-design/`: `system-prompt.md`, `references/upstream-system-prompt.md` and `references/upstream-sync/` (the Claude Design system prompt, a snapshot of it and its sync records), `built-in-skills/` (Claude Design's built-in skills) and `starter-components/` (Claude Design's starter components; the local patches are recorded in the `*-patch.md` files there).
|
|
27
|
+
|
|
28
|
+
### 2.1 frontend-design: Apache License 2.0
|
|
29
|
+
|
|
30
|
+
`archive/baoyu-design/built-in-skills/frontend-design.md` is Claude Design's copy of Anthropic's frontend-design skill, which Anthropic publishes under the Apache License 2.0. The full license text is in [`archive/baoyu-design/built-in-skills/LICENSE-frontend-design.txt`](archive/baoyu-design/built-in-skills/LICENSE-frontend-design.txt). The file was changed from the original: its frontmatter was rewritten for the built-in-skill format (its `license` line records the change), and its text follows the version Claude Design ships.
|
|
31
|
+
|
|
32
|
+
## 3. Third-party open-source code
|
|
33
|
+
|
|
34
|
+
The editors bundle open-source packages, such as React, Base UI, d3 and pptxgenjs. Each keeps its own license, which this project's license does not replace. The licenses are in each editor's `scripts/editor/third-party-licenses.txt`, and for the slides compiler in `scripts/editor/node/third-party-licenses.txt`.
|
|
35
|
+
|
|
36
|
+
The archived `baoyu-design` skill vendors React, ReactDOM, Babel and fflate (MIT) in `archive/baoyu-design/agents/vendor/`, and pptxgenjs (MIT) in `archive/baoyu-design/agents/gen-pptx/vendor/pptxgenjs/`, with its `LICENSE`.
|
|
37
|
+
|
|
38
|
+
## Questions and removal
|
|
39
|
+
|
|
40
|
+
If you hold rights in anything here and want it credited differently, changed or removed, open an issue at <https://github.com/JimLiu/baoyu-design/issues>.
|
|
41
|
+
|
|
42
|
+
## 中文说明
|
|
43
|
+
|
|
44
|
+
本仓库(以及 npm 上的 DeepSeek Harness 插件)里的内容分三类,许可各不相同。[LICENSE](LICENSE) 里的 MIT 许可只管第一类。
|
|
45
|
+
|
|
46
|
+
1. **维护者自己写的部分,MIT。** 本地命令行和编辑器服务器(各技能的 `scripts/artifact.mjs`,以及有的技能带的 `scripts/server.mjs`)、本地评论、让编辑器离开 claude.ai 在本机运行的那部分代码;DeepSeek Harness 插件自己的代码和文件(`dsh-plugins/*/lib/`、`cordis.patch.yml`、`locale/`、`docs/`、`icon.svg`);技能说明里为本地 Agent 写的部分;README、更新日志、`assets/` 里的图片、`.github/`;`archive/baoyu-design/agents/` 里维护者写的工具。
|
|
47
|
+
2. **取自 Anthropic 的部分,不适用 MIT。** 权利归 Anthropic。除 frontend-design 外,Anthropic 没有为这些内容公开许可,本项目也不授予任何许可。包括:
|
|
48
|
+
- 各 `skills/claude-*/SKILL.md` 所改编的 Artifact 类型技能说明;
|
|
49
|
+
- `artifact-type/reference/` 里的参考文档;
|
|
50
|
+
- `skills/dataviz/`(Anthropic 的 dataviz 技能);
|
|
51
|
+
- `scripts/editor/` 里从 claude.ai 运行时还原的编辑器(界面、文案和行为);
|
|
52
|
+
- Anthropicons 图标字体(`anthropicons-*.woff2` 文件,以及编辑器 CSS 里内嵌的字体);
|
|
53
|
+
- `archive/baoyu-design/` 里的 Claude Design 系统提示词、内置技能和起步组件。
|
|
54
|
+
|
|
55
|
+
`archive/baoyu-design/built-in-skills/frontend-design.md` 取自 Anthropic 以 Apache License 2.0 发布的 frontend-design 技能,许可全文见同目录的 `LICENSE-frontend-design.txt`。
|
|
56
|
+
3. **第三方开源代码,各按原许可。** 编辑器打进去的开源包(React、Base UI、d3、pptxgenjs 等)的许可见各编辑器的 `scripts/editor/third-party-licenses.txt`;归档技能里内置的 React、Babel、fflate、pptxgenjs 见 `archive/baoyu-design/agents/vendor/` 和 `agents/gen-pptx/vendor/pptxgenjs/LICENSE`。
|
|
57
|
+
|
|
58
|
+
本项目是独立的社区项目,与 Anthropic 无隶属或背书关系。权利人希望调整署名、修改或移除某部分内容,请在 <https://github.com/JimLiu/baoyu-design/issues> 提 issue。
|
package/README.md
CHANGED
|
@@ -39,4 +39,4 @@ The page's server listens on 127.0.0.1 only and reads and writes only the design
|
|
|
39
39
|
|
|
40
40
|
## License
|
|
41
41
|
|
|
42
|
-
MIT. The page's
|
|
42
|
+
Not all MIT. The plugin's own code and files (`lib/`, `cordis.patch.yml`, `locale/`, `docs/`, `icon.svg`) and the skill's local tooling are MIT, in `LICENSE`. The bundled `claude-design-system` skill is adapted from Anthropic's claude.ai Design System type: its instructions, references, page and icon fonts stay Anthropic's and are not under the MIT License. `NOTICE.md` sets out which is which. The page's open-source licenses are in `skills/claude-design-system/scripts/editor/third-party-licenses.txt`.
|
package/lib/client.js
CHANGED
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// dsh-claude-design-system 2.
|
|
1
|
+
// dsh-claude-design-system 2.5.0: built from baoyu-design.
|
|
2
2
|
var define_PLUGIN_default = { name: "claude-design-system", provider: "dsh-claude-design-system", skills: [{ name: "claude-design-system", description: "Create and revise design systems in the Design System artifact format (project/design-system.json, tokens.json, a README brand book, component previews, fonts and asset groups) as local files, then open them in a local design-system page where the user can browse and edit tokens, type, components and assets. Use when the user asks for a design system or brand kit in this format, built from a code repository, a design tool or scratch, names claude-design-system or the Design System type, or wants to revise a folder that holds project/design-system.json. claude-slides and claude-design install these systems. A free-form HTML style guide, UI kit or token page is baoyu-design's.", comments: true }] };
|
|
3
3
|
import { spawn } from "node:child_process";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-claude-design-system",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "DeepSeek Harness plugin: the claude-design-system skill from baoyu-design. The agent writes design systems (tokens, type, components, assets) as files and opens them in a local design-system page.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"url": "git+https://github.com/JimLiu/baoyu-design.git",
|
|
18
18
|
"directory": "dsh-plugins/dsh-claude-design-system"
|
|
19
19
|
},
|
|
20
|
-
"license": "
|
|
20
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
21
21
|
"author": "Jim Liu 宝玉",
|
|
22
22
|
"type": "module",
|
|
23
23
|
"main": "lib/index.js",
|
|
@@ -37,7 +37,8 @@
|
|
|
37
37
|
"cordis.patch.yml",
|
|
38
38
|
"icon.svg",
|
|
39
39
|
"README.md",
|
|
40
|
-
"LICENSE"
|
|
40
|
+
"LICENSE",
|
|
41
|
+
"NOTICE.md"
|
|
41
42
|
],
|
|
42
43
|
"engines": {
|
|
43
44
|
"node": ">=20",
|
|
@@ -8,6 +8,7 @@ description: >-
|
|
|
8
8
|
code repository, a design tool or scratch, names claude-design-system or the Design System type, or
|
|
9
9
|
wants to revise a folder that holds project/design-system.json. claude-slides and claude-design install
|
|
10
10
|
these systems. A free-form HTML style guide, UI kit or token page is baoyu-design's.
|
|
11
|
+
license: "Mixed. The skill text, references and editors adapted from Anthropic's claude.ai Artifact types stay Anthropic's and are not MIT-licensed; the local tooling is MIT. Complete terms in NOTICE.md: https://github.com/JimLiu/baoyu-design/blob/main/NOTICE.md"
|
|
11
12
|
---
|
|
12
13
|
|
|
13
14
|
# Design System — a system kept in local files
|
|
@@ -162,7 +163,8 @@ leave alone stays as it is, and removing a file is deleting it. The rest goes th
|
|
|
162
163
|
- `upload <root> <file> --group <Group>` → `{url:"/_blob/<id>", record, indexPath, shownAs, …}`: stores a copy as `project/_blobs/<id>.<ext>`; the same bytes always get the same id. Write `record` into the index at `indexPath` (with the index, LAST). `<root>` must exist.
|
|
163
164
|
- `check <root>` → `problems` (0: done); `issues` (each a `file` under `project/` and its fix) and `notes`, each when any; it exits 1 while any problem remains. The generated files and whether previews render are not checked.
|
|
164
165
|
- `list [dir …]` → the design systems in the working directory (or the folders given, and those in `$CLAUDE_DESIGN_SYSTEMS`), each `{title, namespace, folder, root, readme, tokens}`.
|
|
165
|
-
- `open <root>` → `{url, pid, stop, …}`: starts the page on this machine in the background (once; later calls reuse it, `reused: true`) and prints its address. `stop <root>` ends it (`serve <root>` runs it in the foreground instead). The page saves the user's edits (and the generated files) into the same folder, and shows yours as soon as you write them. `.artifact-server.json` and `.artifact-server.log` beside `project/` are its own: leave them; so is `comments.json` (the comments, see Comments), which only the comment commands below change.
|
|
166
|
+
- `open <root>` → `{url, pid, stop, …}`: starts the page on this machine in the background (once; later calls reuse it, `reused: true`) and prints its address, 127.0.0.1:4730 (the next free port up when 4730 is taken; `--port n` starts from n, `--port 0` takes any). `stop <root>` ends it (`serve <root>` runs it in the foreground instead). The page saves the user's edits (and the generated files) into the same folder, and shows yours as soon as you write them. `.artifact-server.json` and `.artifact-server.log` beside `project/` are its own: leave them; so is `comments.json` (the comments, see Comments), which only the comment commands below change.
|
|
167
|
+
- `share <root>` (or `open <root> --lan`): opens the page to the local network and prints a link per role (Sharing, below).
|
|
166
168
|
|
|
167
169
|
Each result carries more keys than named here; its `next`, where it has one, says what to do with it.
|
|
168
170
|
|
|
@@ -242,6 +244,17 @@ People comment in the open editor: Comment (or C), then a click on a token, colo
|
|
|
242
244
|
- `comment-resolve <root> <id>` closes one (`--reopen` opens it again).
|
|
243
245
|
- Live, while the page is open: run `comments <root> --wait` as a background command that tells you when it exits. While it waits the editor offers **Send to agent**; when the person sends a comment, it prints that thread and exits. Handle it, reply, then start the wait again (its `next`). No background commands? Skip it: the page then just saves comments, without the button, and you read them when asked. (`open <root> --agent-hook "<command>"` is the other way in: the server runs the command in `<root>` for each comment sent, the thread as JSON on stdin.)
|
|
244
246
|
|
|
247
|
+
## Sharing
|
|
248
|
+
|
|
249
|
+
`share <root>` opens the system to the local network (the same Wi-Fi or LAN, as `http://<this computer's address>:4730/`), starting the server if it isn't running, and prints a link per role: `editor` edits and comments, `commenter` comments without editing, `viewer` only looks. `open <root> --lan` (or `serve --lan`) shares it as it starts.
|
|
250
|
+
|
|
251
|
+
- The person at this computer is the owner: everything, plus the Share button in the bar across the top of the page, next to the comments button (the links, the people who joined and who is online, each one's role, sharing on or off). On this computer (`127.0.0.1`) they stay the owner even when they open a link; a link opened at the network address shows what that role sees.
|
|
252
|
+
- Give the person the links to pass on. Whoever opens one types a name and is in as that role; what they change and comment lands in the same folder as the owner's. The links survive a restart while the server gets its port back; if not, `share <root>` prints the new ones to give out again.
|
|
253
|
+
- Guests have a Share button too. It holds the links they may pass on, their own role's and the ones below it (an editor's has all three, a commenter's the commenter and viewer links, a viewer's the viewer link), and Copy link for the page's address, which only people who already have access can open. Whoever joins through a guest's link shows in the owner's panel like anyone else; turning links off, resetting them, changing roles and removing people stay the owner's.
|
|
254
|
+
- `share <root> --disable <role>` / `--enable <role>` turns a link off or on (`<role>`: one, `editor,viewer`, or `all`); off, it holds everyone who came by it until it is on again. `--reset <role>` gives the role a new link: the old one stops working and the people who came by it are out. `--role <guest>=<role>` gives someone who joined another role (`<guest>`: an id from the `guests` it prints). `--off` stops sharing on the network.
|
|
255
|
+
- Only the owner's page sends to you (Send to agent); what guests comment is saved for you to read with `comments <root>`.
|
|
256
|
+
- The links and the people who joined are in `<root>/.sharing.json`: leave it. It is plain http on the local network: anyone there with a link gets in.
|
|
257
|
+
|
|
245
258
|
## The references
|
|
246
259
|
|
|
247
260
|
Under `artifact-type/reference/` in this skill's folder: `format.md` (every file, field, cap and alias, the
|