@yuhan1124/draw-prompt 0.4.3 → 0.4.4
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/README.md +15 -7
- package/SKILL.md +1 -1
- package/package.json +1 -1
- package/scripts/prompt_cli.py +3 -2
package/README.md
CHANGED
|
@@ -34,14 +34,20 @@ Prompt 的默认结构是三段:`User visual brief` 原始视觉需求、`Styl
|
|
|
34
34
|
发布到 npm 后可以直接:
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
|
-
npx @yuhan1124/draw-prompt status
|
|
38
|
-
npx @yuhan1124/draw-prompt convert "茶饮新品海报,写冷泡系列"
|
|
39
|
-
npx @yuhan1124/draw-prompt install-skill --target codex
|
|
37
|
+
npx --yes --registry=https://registry.npmjs.org/ @yuhan1124/draw-prompt@latest status
|
|
38
|
+
npx --yes --registry=https://registry.npmjs.org/ @yuhan1124/draw-prompt@latest convert "茶饮新品海报,写冷泡系列"
|
|
39
|
+
npx --yes --registry=https://registry.npmjs.org/ @yuhan1124/draw-prompt@latest install-skill --target codex
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
`npx` 包内置同一份 Python CLI 和 references。执行时优先使用 `uv run` 自动处理
|
|
43
43
|
PEP723 依赖;没有 `uv` 时退回 `python3`。`overlay`、`visual-check`、`edit-check`
|
|
44
44
|
需要 Pillow,推荐用户安装 `uv` 获得最稳运行链路。
|
|
45
|
+
显式 `--registry=https://registry.npmjs.org/` 是为了避开公司/镜像 registry 的同步延迟;
|
|
46
|
+
如果你的 npm 默认 registry 已经是公网 npm,也可以省略。
|
|
47
|
+
|
|
48
|
+
如果当前目录就是本仓库源码目录,`npx @yuhan1124/draw-prompt ...` 可能被 npm 解析到同名本地
|
|
49
|
+
package 而失败;本地开发请直接用 `node bin/draw-prompt.js ...` 或
|
|
50
|
+
`python3 scripts/prompt_cli.py ...`。
|
|
45
51
|
|
|
46
52
|
`visual-regress` / `benchmark` 用到的回归集只保留在开发仓库本地,不随 npm 包发布。
|
|
47
53
|
|
|
@@ -51,13 +57,13 @@ PEP723 依赖;没有 `uv` 时退回 `python3`。`overlay`、`visual-check`、`
|
|
|
51
57
|
|
|
52
58
|
```bash
|
|
53
59
|
# 安装到 Codex:~/.codex/skills/draw-prompt
|
|
54
|
-
npx @yuhan1124/draw-prompt install-skill --target codex
|
|
60
|
+
npx --yes --registry=https://registry.npmjs.org/ @yuhan1124/draw-prompt@latest install-skill --target codex
|
|
55
61
|
|
|
56
62
|
# 安装到 Claude Code:~/.claude/skills/draw-prompt
|
|
57
|
-
npx @yuhan1124/draw-prompt install-skill --target claude
|
|
63
|
+
npx --yes --registry=https://registry.npmjs.org/ @yuhan1124/draw-prompt@latest install-skill --target claude
|
|
58
64
|
|
|
59
65
|
# 同时安装两边;更新已有安装时加 --force
|
|
60
|
-
npx @yuhan1124/draw-prompt install-skill --target both --force
|
|
66
|
+
npx --yes --registry=https://registry.npmjs.org/ @yuhan1124/draw-prompt@latest install-skill --target both --force
|
|
61
67
|
```
|
|
62
68
|
|
|
63
69
|
`install-skill` 默认复制 npm 包内的运行文件,避免软链到 npx 缓存导致后续路径失效。它只复制
|
|
@@ -73,7 +79,9 @@ ln -s ~/Desktop/draw-prompt ~/.claude/skills/draw-prompt
|
|
|
73
79
|
|
|
74
80
|
依赖:`uv`(推荐,PEP723 自动装 pyyaml)或 `python3`。检查环境:
|
|
75
81
|
```bash
|
|
76
|
-
|
|
82
|
+
node bin/draw-prompt.js status
|
|
83
|
+
# 或
|
|
84
|
+
python3 scripts/prompt_cli.py status
|
|
77
85
|
```
|
|
78
86
|
|
|
79
87
|
## 怎么用
|
package/SKILL.md
CHANGED
package/package.json
CHANGED
package/scripts/prompt_cli.py
CHANGED
|
@@ -135,7 +135,7 @@ def ensure_home() -> None:
|
|
|
135
135
|
|
|
136
136
|
|
|
137
137
|
SCHEMA_VERSION = 1
|
|
138
|
-
COMPILER_VERSION = "0.4.
|
|
138
|
+
COMPILER_VERSION = "0.4.4"
|
|
139
139
|
|
|
140
140
|
|
|
141
141
|
PACKAGED_SKILL_FILES = [
|
|
@@ -4178,7 +4178,8 @@ def load_json_value(value: str | None) -> dict:
|
|
|
4178
4178
|
|
|
4179
4179
|
def missing_pillow_message(command: str) -> str:
|
|
4180
4180
|
return (
|
|
4181
|
-
f"{command} 需要 Pillow 图像库。请优先用 `uv run` /
|
|
4181
|
+
f"{command} 需要 Pillow 图像库。请优先用 `uv run` / "
|
|
4182
|
+
"`npx --yes --registry=https://registry.npmjs.org/ @yuhan1124/draw-prompt@latest ...` 自动安装依赖,"
|
|
4182
4183
|
"或在当前 Python 环境中安装:python3 -m pip install pillow"
|
|
4183
4184
|
)
|
|
4184
4185
|
|