dsh-skill-deterministic-pixel-art 0.0.0-stage → 0.1.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.
Files changed (118) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE.md +15 -0
  3. package/README.md +126 -2
  4. package/README.zh-CN.md +115 -0
  5. package/cordis.patch.yml +3 -0
  6. package/generated/skill.json +4 -0
  7. package/index.js +62 -0
  8. package/package.json +46 -4
  9. package/skill-manifest.json +111 -0
  10. package/skills/deterministic-pixel-art/LICENSE +21 -0
  11. package/skills/deterministic-pixel-art/SKILL.md +63 -0
  12. package/skills/deterministic-pixel-art/agents/openai.yaml +9 -0
  13. package/skills/deterministic-pixel-art/assets/asymmetric-ship-32.json +102 -0
  14. package/skills/deterministic-pixel-art/assets/brand/pixel-anchor-128.png +0 -0
  15. package/skills/deterministic-pixel-art/assets/brand/pixel-anchor-32.png +0 -0
  16. package/skills/deterministic-pixel-art/assets/gem-16.json +30 -0
  17. package/skills/deterministic-pixel-art/assets/generic-panel-96x40.json +79 -0
  18. package/skills/deterministic-pixel-art/assets/minecraft-button-states.json +112 -0
  19. package/skills/deterministic-pixel-art/assets/quality/contexts/directions-12.json +48 -0
  20. package/skills/deterministic-pixel-art/assets/quality/contexts/functions-16.json +62 -0
  21. package/skills/deterministic-pixel-art/assets/quality/contexts/materials-32.json +41 -0
  22. package/skills/deterministic-pixel-art/assets/quality/contexts/minecraft-panel.json +10 -0
  23. package/skills/deterministic-pixel-art/assets/quality/contexts/minecraft-states.json +67 -0
  24. package/skills/deterministic-pixel-art/assets/quality/contexts/ship-32.json +10 -0
  25. package/skills/deterministic-pixel-art/assets/quality/contexts/ui-panel.json +52 -0
  26. package/skills/deterministic-pixel-art/assets/quality/contexts/ui-states.json +62 -0
  27. package/skills/deterministic-pixel-art/assets/quality/directions-12.json +199 -0
  28. package/skills/deterministic-pixel-art/assets/quality/functions-16.json +341 -0
  29. package/skills/deterministic-pixel-art/assets/quality/materials-32.json +565 -0
  30. package/skills/deterministic-pixel-art/assets/quality/minecraft-panel.json +78 -0
  31. package/skills/deterministic-pixel-art/assets/quality/minecraft-states.json +358 -0
  32. package/skills/deterministic-pixel-art/assets/quality/ship-32.json +277 -0
  33. package/skills/deterministic-pixel-art/assets/quality/ui-panel.json +165 -0
  34. package/skills/deterministic-pixel-art/assets/quality/ui-states.json +481 -0
  35. package/skills/deterministic-pixel-art/assets/studies/art.png +0 -0
  36. package/skills/deterministic-pixel-art/assets/studies/icons.png +0 -0
  37. package/skills/deterministic-pixel-art/assets/studies/minecraft.png +0 -0
  38. package/skills/deterministic-pixel-art/assets/studies/ui.png +0 -0
  39. package/skills/deterministic-pixel-art/assets/transparent-grid.json +6 -0
  40. package/skills/deterministic-pixel-art/assets/workflows/atlas-before-layout.json +47 -0
  41. package/skills/deterministic-pixel-art/assets/workflows/atlas-before.json +139 -0
  42. package/skills/deterministic-pixel-art/assets/workflows/atlas-before.png +0 -0
  43. package/skills/deterministic-pixel-art/assets/workflows/atlas-editable.json +157 -0
  44. package/skills/deterministic-pixel-art/assets/workflows/atlas-final-layout.json +47 -0
  45. package/skills/deterministic-pixel-art/assets/workflows/atlas-final.json +157 -0
  46. package/skills/deterministic-pixel-art/assets/workflows/atlas-final.png +0 -0
  47. package/skills/deterministic-pixel-art/assets/workflows/atlas-replacement.json +30 -0
  48. package/skills/deterministic-pixel-art/assets/workflows/scene/bridge.json +299 -0
  49. package/skills/deterministic-pixel-art/assets/workflows/scene/bridge.png +0 -0
  50. package/skills/deterministic-pixel-art/assets/workflows/scene/details.json +725 -0
  51. package/skills/deterministic-pixel-art/assets/workflows/scene/details.png +0 -0
  52. package/skills/deterministic-pixel-art/assets/workflows/scene/mill.json +19889 -0
  53. package/skills/deterministic-pixel-art/assets/workflows/scene/mill.png +0 -0
  54. package/skills/deterministic-pixel-art/assets/workflows/scene/terrain.json +525 -0
  55. package/skills/deterministic-pixel-art/assets/workflows/scene/terrain.png +0 -0
  56. package/skills/deterministic-pixel-art/assets/workflows/scene-256.png +0 -0
  57. package/skills/deterministic-pixel-art/assets/workflows/scene-components.json +50 -0
  58. package/skills/deterministic-pixel-art/assets/workflows/scene-control.json +21469 -0
  59. package/skills/deterministic-pixel-art/assets/workflows/scene-tiles.json +46 -0
  60. package/skills/deterministic-pixel-art/assets/workflows/sprite-128.json +33744 -0
  61. package/skills/deterministic-pixel-art/assets/workflows/sprite-128.png +0 -0
  62. package/skills/deterministic-pixel-art/assets/workflows/sprite-context.json +9 -0
  63. package/skills/deterministic-pixel-art/assets/workflows/tiles/ne.json +170 -0
  64. package/skills/deterministic-pixel-art/assets/workflows/tiles/ne.png +0 -0
  65. package/skills/deterministic-pixel-art/assets/workflows/tiles/nw.json +165 -0
  66. package/skills/deterministic-pixel-art/assets/workflows/tiles/nw.png +0 -0
  67. package/skills/deterministic-pixel-art/assets/workflows/tiles/se.json +173 -0
  68. package/skills/deterministic-pixel-art/assets/workflows/tiles/se.png +0 -0
  69. package/skills/deterministic-pixel-art/assets/workflows/tiles/sw.json +170 -0
  70. package/skills/deterministic-pixel-art/assets/workflows/tiles/sw.png +0 -0
  71. package/skills/deterministic-pixel-art/references/action-icons.md +13 -0
  72. package/skills/deterministic-pixel-art/references/chunking.md +41 -0
  73. package/skills/deterministic-pixel-art/references/consumer-ui.md +43 -0
  74. package/skills/deterministic-pixel-art/references/formats.md +81 -0
  75. package/skills/deterministic-pixel-art/references/minecraft.md +26 -0
  76. package/skills/deterministic-pixel-art/references/pixel-art.md +27 -0
  77. package/skills/deterministic-pixel-art/references/recipes.md +198 -0
  78. package/skills/deterministic-pixel-art/references/review.md +77 -0
  79. package/skills/deterministic-pixel-art/references/scene-revision.md +50 -0
  80. package/skills/deterministic-pixel-art/references/scene-space.md +33 -0
  81. package/skills/deterministic-pixel-art/references/sources.md +18 -0
  82. package/skills/deterministic-pixel-art/references/text-workflow.md +114 -0
  83. package/skills/deterministic-pixel-art/references/ui.md +32 -0
  84. package/skills/deterministic-pixel-art/references/workflows.md +118 -0
  85. package/skills/deterministic-pixel-art/requirements.txt +1 -0
  86. package/skills/deterministic-pixel-art/scripts/pixel_art.py +14 -0
  87. package/skills/deterministic-pixel-art/scripts/pixelart/__init__.py +37 -0
  88. package/skills/deterministic-pixel-art/scripts/pixelart/__main__.py +3 -0
  89. package/skills/deterministic-pixel-art/scripts/pixelart/analysis.py +166 -0
  90. package/skills/deterministic-pixel-art/scripts/pixelart/assembly.py +144 -0
  91. package/skills/deterministic-pixel-art/scripts/pixelart/cli.py +535 -0
  92. package/skills/deterministic-pixel-art/scripts/pixelart/compat.py +17 -0
  93. package/skills/deterministic-pixel-art/scripts/pixelart/context.py +145 -0
  94. package/skills/deterministic-pixel-art/scripts/pixelart/core.py +252 -0
  95. package/skills/deterministic-pixel-art/scripts/pixelart/edit.py +116 -0
  96. package/skills/deterministic-pixel-art/scripts/pixelart/ingest.py +82 -0
  97. package/skills/deterministic-pixel-art/scripts/pixelart/jsonio.py +22 -0
  98. package/skills/deterministic-pixel-art/scripts/pixelart/metadata.py +95 -0
  99. package/skills/deterministic-pixel-art/scripts/pixelart/output.py +144 -0
  100. package/skills/deterministic-pixel-art/scripts/pixelart/presets.py +26 -0
  101. package/skills/deterministic-pixel-art/scripts/pixelart/review.py +292 -0
  102. package/skills/deterministic-pixel-art/scripts/pixelart/spec.py +249 -0
  103. package/skills/deterministic-pixel-art/scripts/recipes/_animation_gif.py +216 -0
  104. package/skills/deterministic-pixel-art/scripts/recipes/_animation_project.py +264 -0
  105. package/skills/deterministic-pixel-art/scripts/recipes/_chunk_contract.py +26 -0
  106. package/skills/deterministic-pixel-art/scripts/recipes/_common.py +64 -0
  107. package/skills/deterministic-pixel-art/scripts/recipes/animation_export.py +164 -0
  108. package/skills/deterministic-pixel-art/scripts/recipes/buttons.py +50 -0
  109. package/skills/deterministic-pixel-art/scripts/recipes/chunk_left.py +26 -0
  110. package/skills/deterministic-pixel-art/scripts/recipes/chunk_pair.py +38 -0
  111. package/skills/deterministic-pixel-art/scripts/recipes/chunk_right.py +28 -0
  112. package/skills/deterministic-pixel-art/scripts/recipes/courier128.py +49 -0
  113. package/skills/deterministic-pixel-art/scripts/recipes/icons.py +35 -0
  114. package/skills/deterministic-pixel-art/scripts/recipes/label_atlas.py +166 -0
  115. package/skills/deterministic-pixel-art/scripts/recipes/review_atlas.py +195 -0
  116. package/skills/deterministic-pixel-art/scripts/recipes/scene256.py +91 -0
  117. package/skills/deterministic-pixel-art/scripts/recipes/tile_preview.py +98 -0
  118. package/skills/deterministic-pixel-art/scripts/recipes/tile_scene.py +207 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Chenamel
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/NOTICE.md ADDED
@@ -0,0 +1,15 @@
1
+ # Sources and licenses
2
+
3
+ This third-party bundle is part of Chenamel/deterministic-pixel-art, under MIT
4
+ (see LICENSE). It is not an official DeepSeek product.
5
+
6
+ The `skills/deterministic-pixel-art/` files are generated byte for byte from this
7
+ repository's authoritative Skill, Python source, recipes and examples by
8
+ `tools/package_dsh.py`, using the same source mapping as `tools/package_skill.py`.
9
+ `skill-manifest.json` records their SHA-256 hashes. No second drawing engine is
10
+ maintained here.
11
+
12
+ DSH and Cordis are MIT-licensed peer dependencies from
13
+ deepseek-ai/deepseek-harness. They are imported from the host, not included in this
14
+ archive. Python and Pillow are separate runtime prerequisites and are not included.
15
+ The package has no installation scripts.
package/README.md CHANGED
@@ -1,3 +1,127 @@
1
- # Temporary Holding Version
1
+ # Deterministic Pixel Art for DSH
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [简体中文](README.zh-CN.md)
4
+
5
+ Optional third-party DSH bundle carrying the original `deterministic-pixel-art`
6
+ Skill, references, editable examples, Python renderer and recipes. Users and
7
+ models can invoke it as needed; a same-name local Skill can take precedence.
8
+
9
+ ## Build a local package
10
+
11
+ From a checkout with Python and the repository's development requirements:
12
+
13
+ ```sh
14
+ python -B tools/package_dsh.py --out dist/dsh-package
15
+ npm pack ./dist/dsh-package --ignore-scripts --pack-destination dist
16
+ ```
17
+
18
+ The package output directory must be new. The archive has no installation
19
+ scripts. Its initial compatibility range is DSH core **0.2.2-rc.1**, Node
20
+ **>=24.9.0**, DSH Skill **0.2.2-rc.1** and Cordis **~4.1.0**. Other DSH versions
21
+ are not claimed compatible.
22
+
23
+ ## Install in a new command-line profile
24
+
25
+ In DSH NEXT, run `dsh` inside **DSH Terminal**. Choose an unused profile name;
26
+ the examples use `pixel-art`. Initialize it **once, before installing**:
27
+ `--from-default-profile` replaces the target profile, including its plugins and
28
+ local configuration. Do not rerun that initialization to start another task.
29
+
30
+ ```text
31
+ dsh --profile pixel-art --from-default-profile headless --help
32
+ ```
33
+
34
+ This initializes the profile without a model call. Then choose **one** installation
35
+ method. When the official npm registry provides version **0.1.0**, use its exact
36
+ package version:
37
+
38
+ ```text
39
+ dsh plugin --profile pixel-art add dsh-skill-deterministic-pixel-art@0.1.0
40
+ ```
41
+
42
+ If that version is unavailable, build the local archive above and use its absolute
43
+ path instead; quote paths containing spaces:
44
+
45
+ ```text
46
+ dsh plugin --profile pixel-art add "/absolute/path/to/dsh-skill-deterministic-pixel-art-0.1.0.tgz"
47
+ ```
48
+
49
+ Both methods install into `pixel-art`; Desktop uses a separate profile.
50
+ npm installation does not require a DSH marketplace listing.
51
+
52
+ The shipped `headless` template disables stored-account services. To use your
53
+ normal DeepSeek account sign-in, save this as `dsh-account.patch.yml` in your
54
+ task directory. It contains configuration, not a token:
55
+
56
+ ```yaml
57
+ - id: agent-default-model
58
+ config:
59
+ provider: deepseek-account
60
+ model: deepseek-flash
61
+ - id: credentials
62
+ disabled: false
63
+ - id: authorization
64
+ disabled: false
65
+ - id: deepseek-account
66
+ disabled: false
67
+ ```
68
+
69
+ Sign in through DSH's normal account UI using the same `DSH_HOME`; do not copy
70
+ credentials into this file. From the directory where you want the JSON and PNG,
71
+ start a new task:
72
+
73
+ ```text
74
+ dsh --profile pixel-art --patch ./dsh-account.patch.yml --json --permission-mode workspace-write --approval-policy never "Use deterministic-pixel-art to make a 16x16 lantern PNG and keep editable JSON."
75
+ ```
76
+
77
+ `--json` emits run events, including a new `sessionId`. To continue that session,
78
+ keep the same working directory and replace the example ID with the returned ID:
79
+
80
+ ```text
81
+ dsh --profile pixel-art --patch ./dsh-account.patch.yml --json --permission-mode workspace-write --approval-policy never --session-id session-YOUR-ID "Make the outline darker."
82
+ ```
83
+
84
+ The command selects `workspace-write`; enforcement depends on DSH and the
85
+ platform. `never` disables interactive approval requests, so operations needing
86
+ approval fail. Model tasks may consume
87
+ account balance. These examples do not set a monetary spending limit. If you
88
+ already use an API-key or another configured profile, keep its model setup and
89
+ install the bundle into that profile instead of applying the account overlay.
90
+
91
+ ## Use and troubleshoot
92
+
93
+ Python **3.10+** and Pillow **>=10.4,<13** are required; Pillow **12.3.0** is the
94
+ fixed reproduction baseline. If `load_workspace_dependencies` is available, use
95
+ it to select an environment. Otherwise use the available shell to check Python
96
+ and Pillow. Missing prerequisites are a runtime issue; installing this bundle
97
+ does not run pip. Resolve scripts and references from the Skill's resource base,
98
+ and keep editable sources and PNG outputs in the task directory.
99
+
100
+ Use `present` when that tool exists. In the default headless profile, provide
101
+ absolute output paths instead. `read_image` lets the model inspect an image;
102
+ that call alone does not prove the image was delivered to the user. Desktop
103
+ profiles can have additional tools. Loading a Skill does not by itself create
104
+ or display a PNG.
105
+
106
+ If the Skill is absent, check that you launched the profile where it was
107
+ installed. `dsh --profile pixel-art --dump-config` should include
108
+ `deterministic-pixel-art-skill`. Resolve missing host peers or an unsupported DSH
109
+ version before a model task. `ACCOUNT_SIGN_IN_REQUIRED` means the account route
110
+ is unavailable: check the overlay, normal sign-in and `DSH_HOME`, rather than
111
+ reinstalling the Skill. A same-name local Skill can override the bundled one.
112
+
113
+ ## Verification and sources
114
+
115
+ Platform validation uses Windows DSH NEXT **2.0.22-next**, core **0.2.2-rc.1**,
116
+ Node **24.21.0**, Python **3.12.14** and Pillow **12.3.0**. Run
117
+ `python -B tools/check_dsh.py` with Node/npm and development requirements to
118
+ build and check the actual archive, real Skill services and relocated renderer.
119
+ That check requires no model call.
120
+
121
+ `tools/package_dsh.py` reuses the authoritative inputs in `skill-content/`,
122
+ `src/`, `recipes/` and existing examples. Generated resources are not maintained
123
+ here; `skill-manifest.json` records their hashes. DSH and its peers are not
124
+ bundled. See LICENSE and NOTICE.md for licensing and sources.
125
+
126
+ This project is not endorsed by DeepSeek. For native Skill installation, follow
127
+ [INSTALL.md](https://github.com/Chenamel/deterministic-pixel-art/blob/main/INSTALL.md).
@@ -0,0 +1,115 @@
1
+ # 在 DSH 中使用 Deterministic Pixel Art
2
+
3
+ [English](README.md)
4
+
5
+ 这是本项目的可选第三方 DSH bundle,携带原 `deterministic-pixel-art` Skill、
6
+ 说明、Python 工具、配方和可编辑示例。用户与模型都可按需调用;同名本地 Skill
7
+ 可以优先使用。
8
+
9
+ ## 生成本地包
10
+
11
+ 在源码仓库安装 Python 和开发依赖后运行:
12
+
13
+ ```sh
14
+ python -B tools/package_dsh.py --out dist/dsh-package
15
+ npm pack ./dist/dsh-package --ignore-scripts --pack-destination dist
16
+ ```
17
+
18
+ 生成目录必须不存在。包没有安装脚本。首版限定 DSH core **0.2.2-rc.1**、Node
19
+ **>=24.9.0**;宿主需提供 DSH Skill **0.2.2-rc.1** 和 Cordis **~4.1.0**。
20
+ 其他 DSH 版本未声明兼容。
21
+
22
+ ## 在新配置中安装
23
+
24
+ 在 DSH NEXT 的 **DSH Terminal** 中运行 `dsh`,选择未使用过的 profile 名称;
25
+ 以下用 `pixel-art`。**先初始化一次,再安装插件**:`--from-default-profile`
26
+ 会替换目标 profile,包括其中的插件和本地配置。以后启动任务不要重复初始化。
27
+
28
+ ```text
29
+ dsh --profile pixel-art --from-default-profile headless --help
30
+ ```
31
+
32
+ 这条命令初始化配置,不调用模型。随后**选择一种**安装方式。官方 npm registry
33
+ 提供 **0.1.0** 时,使用精确包版本:
34
+
35
+ ```text
36
+ dsh plugin --profile pixel-art add dsh-skill-deterministic-pixel-art@0.1.0
37
+ ```
38
+
39
+ 若该版本不可用,按前文生成本地归档,改用其绝对路径;含空格路径保留引号:
40
+
41
+ ```text
42
+ dsh plugin --profile pixel-art add "/absolute/path/to/dsh-skill-deterministic-pixel-art-0.1.0.tgz"
43
+ ```
44
+
45
+ 两种方式都安装到 `pixel-art`;Desktop 使用独立的 profile。
46
+ npm 安装无需等待 DSH 市场收录。
47
+
48
+ 官方 `headless` 模板默认关闭托管账户服务。若使用平时登录的 DeepSeek 账户,在
49
+ 任务目录保存以下 `dsh-account.patch.yml`;它只含配置,不填 token:
50
+
51
+ ```yaml
52
+ - id: agent-default-model
53
+ config:
54
+ provider: deepseek-account
55
+ model: deepseek-flash
56
+ - id: credentials
57
+ disabled: false
58
+ - id: authorization
59
+ disabled: false
60
+ - id: deepseek-account
61
+ disabled: false
62
+ ```
63
+
64
+ 通过 DSH 的正常账户界面登录,并确保使用同一 `DSH_HOME`;不要复制凭据到此文件。
65
+ 在希望保存 JSON 和 PNG 的任务目录启动新任务:
66
+
67
+ ```text
68
+ dsh --profile pixel-art --patch ./dsh-account.patch.yml --json --permission-mode workspace-write --approval-policy never "用 deterministic-pixel-art 画一个16×16灯笼PNG,保留可编辑JSON。"
69
+ ```
70
+
71
+ `--json` 输出运行事件,其中包括新的 `sessionId`。继续会话时保持同一工作目录,
72
+ 将示例 ID 换成返回的真实 ID:
73
+
74
+ ```text
75
+ dsh --profile pixel-art --patch ./dsh-account.patch.yml --json --permission-mode workspace-write --approval-policy never --session-id session-YOUR-ID "把轮廓改深一点。"
76
+ ```
77
+
78
+ 命令选择 `workspace-write` 模式,实际隔离程度取决于 DSH 与平台;`never` 关闭
79
+ 交互审批,需要审批的操作会失败。模型任务可能消耗账户余额,上述命令没有设置
80
+ 金额上限。若已用 API key 或
81
+ 其他配置好的 profile,保留其模型设置,将插件装入该 profile 即可,不必套用账户
82
+ overlay。
83
+
84
+ ## 使用与排错
85
+
86
+ 工具需要 Python **3.10+**、Pillow **>=10.4,<13**;固定复现基线为 Pillow
87
+ **12.3.0**。有 `load_workspace_dependencies` 时用它选择环境;没有时通过可用
88
+ shell 检查 Python 和 Pillow。缺少它们属于运行前置条件,安装 bundle 不会自动
89
+ 运行 pip。按 Skill 的资源目录解析脚本与 references,源文件和 PNG 保存在任务
90
+ 目录。
91
+
92
+ 有 `present` 时用它交付文件。默认 headless 应提供输出文件的绝对路径;`read_image`
93
+ 可供模型检查;看图调用不能证明已经向用户交付。桌面 profile 可以有额外工具。
94
+ 加载 Skill 本身不会生成或展示 PNG。
95
+
96
+ 找不到 Skill 时,先确认当前 profile 与安装时一致。
97
+ `dsh --profile pixel-art --dump-config` 应包含 `deterministic-pixel-art-skill`。
98
+ 加载报缺宿主 peer 或版本不兼容时,先解决运行环境。`ACCOUNT_SIGN_IN_REQUIRED`
99
+ 表示账户路线不可用,应检查 overlay、正常登录和 `DSH_HOME`,不必重装 Skill。
100
+ 同名本地 Skill 会覆盖随包版本。
101
+
102
+ ## 验证与来源
103
+
104
+ 本机验证基线为 Windows DSH NEXT **2.0.22-next**、core **0.2.2-rc.1**、Node
105
+ **24.21.0**、Python **3.12.14**、Pillow **12.3.0**。
106
+ `python -B tools/check_dsh.py` 需要 Node/npm 和开发依赖,检查实际归档、真实
107
+ Skill 服务与搬移后的绘图工具,不需要模型调用。
108
+
109
+ `tools/package_dsh.py` 复用 `skill-content/`、`src/`、`recipes/` 与原示例目录的
110
+ 权威输入;不手工维护生成资源,不建立第二套绘制引擎。`skill-manifest.json`
111
+ 记录文件哈希。DSH 与宿主 peer 不随包分发;许可和来源见 LICENSE、NOTICE.md。
112
+
113
+ 本项目不是 DeepSeek 官方插件。也可以按原仓库的
114
+ [INSTALL.md](https://github.com/Chenamel/deterministic-pixel-art/blob/main/INSTALL.md)
115
+ 直接安装原生 Skill。
@@ -0,0 +1,3 @@
1
+ - insert:
2
+ - id: deterministic-pixel-art-skill
3
+ name: dsh-skill-deterministic-pixel-art
@@ -0,0 +1,4 @@
1
+ {
2
+ "name": "deterministic-pixel-art",
3
+ "description": "Create or edit deterministic pixel-art PNG sprites, icons, GUI components and named atlases from editable grids, integer drawing commands or Python masks. Includes image measurements with limits on report size, lossless PNG import, visual checks on chosen backgrounds and optional Minecraft styling. Use vector tools for vector icon systems and image generation for photorealistic imagery."
4
+ }
package/index.js ADDED
@@ -0,0 +1,62 @@
1
+ import { readFile } from "node:fs/promises";
2
+ import { fileURLToPath } from "node:url";
3
+ import { BUNDLED_SKILL_RANK } from "@deepseek-ai/dsh-skill";
4
+
5
+ const metadata = JSON.parse(
6
+ await readFile(new URL("./generated/skill.json", import.meta.url), "utf8"),
7
+ );
8
+ const directory = new URL("./skills/deterministic-pixel-art/", import.meta.url);
9
+ const skillFile = new URL("SKILL.md", directory);
10
+ const resourceBase = { kind: "directory", path: fileURLToPath(directory) };
11
+ const candidate = {
12
+ name: metadata.name,
13
+ description: metadata.description,
14
+ invocation: { modelInvocable: true, userInvocable: true },
15
+ provider: "deterministic-pixel-art-bundle",
16
+ source: "bundled",
17
+ resourceBase,
18
+ rank: BUNDLED_SKILL_RANK,
19
+ locator: skillFile,
20
+ };
21
+
22
+ const provider = {
23
+ name: candidate.provider,
24
+ async list() {
25
+ return [candidate];
26
+ },
27
+ async get(_candidate, options) {
28
+ const raw = await readFile(skillFile, {
29
+ encoding: "utf8",
30
+ signal: options.signal,
31
+ });
32
+ const frontmatter = /^---\r?\n[\s\S]*?\r?\n---(?:\r?\n|$)/u.exec(raw);
33
+ if (!frontmatter) throw new Error("Packaged Skill has no YAML frontmatter");
34
+ return {
35
+ name: candidate.name,
36
+ description: candidate.description,
37
+ invocation: candidate.invocation,
38
+ provider: candidate.provider,
39
+ source: candidate.source,
40
+ resourceBase,
41
+ content: raw.slice(frontmatter[0].length) +
42
+ "\n\n## DSH runtime\n\n" +
43
+ "Use Python 3.10+ and Pillow >=10.4,<13. If load_workspace_dependencies " +
44
+ "is available, use it to select that environment; otherwise use an available " +
45
+ "shell to check existing Python and Pillow, and report missing prerequisites. " +
46
+ "Resolve scripts and references from this Skill's resource base. Keep editable " +
47
+ "sources and PNG outputs in the workspace. Inspect the finished PNG with an " +
48
+ "available image-reading tool, or state when visual inspection is unavailable. " +
49
+ "If present is available, use it to deliver the files; otherwise return their " +
50
+ "absolute paths. Reading an image for inspection does not by itself prove " +
51
+ "delivery to the user.\n",
52
+ };
53
+ },
54
+ };
55
+
56
+ export const name = "skill-deterministic-pixel-art";
57
+ export const inject = ["skills"];
58
+
59
+ /** Register the original Skill with the host's lifecycle and precedence rules. */
60
+ export function apply(ctx) {
61
+ ctx.skills.registerProvider(() => provider);
62
+ }
package/package.json CHANGED
@@ -1,6 +1,48 @@
1
1
  {
2
2
  "name": "dsh-skill-deterministic-pixel-art",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "Third-party DSH bundle for the Deterministic Pixel Art Skill and its editable PNG tools.",
5
+ "type": "module",
6
+ "main": "index.js",
7
+ "exports": {
8
+ ".": "./index.js",
9
+ "./package.json": "./package.json"
10
+ },
11
+ "files": [
12
+ "index.js",
13
+ "cordis.patch.yml",
14
+ "generated/",
15
+ "skills/",
16
+ "skill-manifest.json",
17
+ "NOTICE.md",
18
+ "README.zh-CN.md"
19
+ ],
20
+ "license": "MIT",
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "git+https://github.com/Chenamel/deterministic-pixel-art.git",
24
+ "directory": "integrations/dsh"
25
+ },
26
+ "homepage": "https://github.com/Chenamel/deterministic-pixel-art/tree/main/integrations/dsh",
27
+ "bugs": {
28
+ "url": "https://github.com/Chenamel/deterministic-pixel-art/issues"
29
+ },
30
+ "dsh": {
31
+ "bundle": {
32
+ "patch": "./cordis.patch.yml"
33
+ }
34
+ },
35
+ "engines": {
36
+ "node": ">=24.9.0",
37
+ "dsh": "0.2.2-rc.1"
38
+ },
39
+ "peerDependencies": {
40
+ "@deepseek-ai/cordis": "~4.1.0",
41
+ "@deepseek-ai/dsh-skill": "0.2.2-rc.1"
42
+ },
43
+ "devDependencies": {
44
+ "@deepseek-ai/cordis": "~4.1.0",
45
+ "@deepseek-ai/dsh-skill": "0.2.2-rc.1",
46
+ "@deepseek-ai/dsh-skill-filesystem": "0.2.2-rc.1"
47
+ }
48
+ }
@@ -0,0 +1,111 @@
1
+ {
2
+ "LICENSE": "88a5abebe2ce2d7c7fdb1a36bc100cadf3136f9b39874465e8de282ba64119dc",
3
+ "SKILL.md": "b267ead367c2788bb654eb0794f309fa9a4d69cb0660d24139bf8755063eb05f",
4
+ "agents/openai.yaml": "3988a508ce249115048ffab26e360946769dea12e1969a9bb24f6736136bb876",
5
+ "assets/asymmetric-ship-32.json": "2e0582beb829ba3758e9388a7fa26f82cf5ce2738da490e827a534a0322bddaf",
6
+ "assets/brand/pixel-anchor-128.png": "932f8d8e4deb0552624c3a503deb02627d6176b689aaff6bbdd1f3cf75697259",
7
+ "assets/brand/pixel-anchor-32.png": "fef887d487d2990104f9b94d62822e3506673baa6954ce8014d08a67ab0709c5",
8
+ "assets/gem-16.json": "6fa8f688a5e6fc8a3516b9d637c7730b8f060dfb8f189830e2c8e10e8028b307",
9
+ "assets/generic-panel-96x40.json": "40023d7165139117581d7cf2f44faa35f21ebefff2ca8f9fc76f8a5da4557008",
10
+ "assets/minecraft-button-states.json": "5b2354d213e8dc4d5c7c4cb42aff2859281acaa4b12f2ac77fb2ad242d5f6cb8",
11
+ "assets/quality/contexts/directions-12.json": "0a1bea7daeee06e34d9baf833bd64a5cc16347aea704162f69dca9ff95b09c37",
12
+ "assets/quality/contexts/functions-16.json": "216402c8fec2f6713b83296996db5de3df9af293df08b2657aeda5eaf72aa72b",
13
+ "assets/quality/contexts/materials-32.json": "98c60b48abe09b5d81e90c82e45353e927a82eb1563e00da97557f3660cea9b2",
14
+ "assets/quality/contexts/minecraft-panel.json": "06559548be73cf122f5af4a2efee532eefb50abda16b5537953f5e1bf24c7339",
15
+ "assets/quality/contexts/minecraft-states.json": "da3d3a2f6afbfa9d04b598a97ccf15c19da56fc84f3b6e83f5bc9b76d31c745e",
16
+ "assets/quality/contexts/ship-32.json": "6a6b8dfd2152a9ed1f9e509a42ef71b990f603027c5a9342f1b6474c423b2604",
17
+ "assets/quality/contexts/ui-panel.json": "0db39bcc6e206baabd2b6895f7c58298e2b79666b18d022b5abc08ff632b6732",
18
+ "assets/quality/contexts/ui-states.json": "37b7d6a73f01ee4e3b3e295e9afac12a136c397ca11d7769a6df6ef45f67b4fb",
19
+ "assets/quality/directions-12.json": "bbc308c8d83e8e39b48b833914abb0e5ae74a84de3336e3add61fbca6890a8ad",
20
+ "assets/quality/functions-16.json": "07629f611543a1ee1e7ef7fb9fcdf81274d857022c7b846205a7cef661a09954",
21
+ "assets/quality/materials-32.json": "41acc9e8c0ac179042eb7fb25a1f998569dfef60d7c7b18ba964f96ce0bf90ee",
22
+ "assets/quality/minecraft-panel.json": "c2baae7fd002aa6caecc04f7c6f71accb36db9b9ceb68719e37fef8269eae99b",
23
+ "assets/quality/minecraft-states.json": "13ae65c958f1dfa69938b310e607bb7bf5fcdd067f7517a181f7f4864f8d114e",
24
+ "assets/quality/ship-32.json": "8982098be6acc5a1b70b56640095cdbf10e49407ae9d1e1f7c0d5f7c80b185c1",
25
+ "assets/quality/ui-panel.json": "f13f0f579038e6a6643cb1845464b129e0e7f98183dffe98975250c9d65689b8",
26
+ "assets/quality/ui-states.json": "c316a125f73acb82e84fd72ce3e9d9a9209bf2e40cb0ef6d2bc3a691c05192d3",
27
+ "assets/studies/art.png": "b9804dfd4b886a982c95f0654417e0ad39c8f1df38085f8cc269ec0ca4df45ea",
28
+ "assets/studies/icons.png": "47da99f5593850a33f3a63f23f716b376ac34c5a4256df2b4ded093f95bf2843",
29
+ "assets/studies/minecraft.png": "b19f3b3287dc0233724af10000e19fb353556b47d8f0cdb1d6db4b7e951185ff",
30
+ "assets/studies/ui.png": "56fba132190d2d82ab1b3557c93db50d5e33827d4fa30fc8a8d48c6646b9a89f",
31
+ "assets/transparent-grid.json": "c056174c1285a64814700117fef0ebf13fda3cb03447f5d321fc60b9e2caa035",
32
+ "assets/workflows/atlas-before-layout.json": "49f91ae7d8ee97902ef6267d3f3d453f96b5e8a95b2e38a6886c0b7b9c500a67",
33
+ "assets/workflows/atlas-before.json": "c9f75d7bf0892eb77d8c9d5d945809cb7674f423edb9b52cca1db3c1062fac02",
34
+ "assets/workflows/atlas-before.png": "ddf6f6733d94e8b012dd02e68b4616bdbee1fb8c2a2b2a5c3ebfe064da19737c",
35
+ "assets/workflows/atlas-editable.json": "a72b517792d96739af9817c8ed7177e0ed2ca79043a2bd0c0027205c499a360e",
36
+ "assets/workflows/atlas-final-layout.json": "7bad5570d3be32e6d6614d5b9d08af41d2ff326e71b2eb49ba442c8534ff6e48",
37
+ "assets/workflows/atlas-final.json": "0f272a8a68c4b1a9c0242314287c5c7342c0fe883b93d84db88302de17b42672",
38
+ "assets/workflows/atlas-final.png": "141fe6c7298b374311d6d61ff2be068f011f0b04ddb2a1e6e98cb96be8b53421",
39
+ "assets/workflows/atlas-replacement.json": "b1897e32f48bc45a41e661726a1f7750a2296486e09f15376e338a5dd72e65e4",
40
+ "assets/workflows/scene-256.png": "4b3fb7e92ec461a64f255508a726bea1fc0aab773dd04352267836d99b7652e9",
41
+ "assets/workflows/scene-components.json": "5579edee594e6750d77a9baaed438485c3f160ba963e62974328b081c7a802c4",
42
+ "assets/workflows/scene-control.json": "abdd8075427f43d19d3024588608a1cc3a3874aa4e00e926c31cc6a7f2f57033",
43
+ "assets/workflows/scene-tiles.json": "7adadd5e9038088f077bdaccdbd9e97a9686f8c3252702a3f570c64e7485c1c8",
44
+ "assets/workflows/scene/bridge.json": "71c2aedcdff2a8dff68464cf691d5f850e2d6a8b61a66635eee7f46df030a605",
45
+ "assets/workflows/scene/bridge.png": "01f4ac805de51999c43bc423812fde5f38499e4d48907bc3864e0c4b3a184353",
46
+ "assets/workflows/scene/details.json": "c5df0c12d8eaf1621912bf5374f39126d9609ff766a17ee2e33ec19421f8d999",
47
+ "assets/workflows/scene/details.png": "3f2d7f36a7db031fe442ee75692232f854333b05550e82b18d60830e0d5bc93e",
48
+ "assets/workflows/scene/mill.json": "a9dcaf8355946d52f1ad1187ffa54c818254c6022567a6edc0a3873e282e8515",
49
+ "assets/workflows/scene/mill.png": "655ff69d5e0be5cde5979f6e4192a6b0143071d41a23819f592f8cb581e19965",
50
+ "assets/workflows/scene/terrain.json": "7e0d2ce6b1bd8e59979bf53ee11592249b32d2516fcf5413b385bdb88bbf6948",
51
+ "assets/workflows/scene/terrain.png": "0320fe3e475c394e7d1bf9cb8cffa51ed1ae2f401b9e450f016e52451dd68230",
52
+ "assets/workflows/sprite-128.json": "2cef0645c7aa5e58845820f0725ace7fb113c9b53b386064ede2e74e19d8b5dd",
53
+ "assets/workflows/sprite-128.png": "2f9c598df9d11f79c6e5e6bd4615899276597649b6023fe65d330a1a01e5081f",
54
+ "assets/workflows/sprite-context.json": "f25afa7bb0d5c8f96df3131e7ea87387edb0cadeccc585ac5d3f854cf3725c39",
55
+ "assets/workflows/tiles/ne.json": "85a1ccafa558ea4328ccb61a6f1993029a5f5ed7e8c04e91f5497469b3e27d46",
56
+ "assets/workflows/tiles/ne.png": "ceeb64773c3f4fe7b7f504917bdb03bf630d08ab370d631c94c3ff9e095c46e9",
57
+ "assets/workflows/tiles/nw.json": "f4aae86d5afb437fa6a914b89f836f1b0f6cc496d1083a956f1c69d79748e456",
58
+ "assets/workflows/tiles/nw.png": "4b4d8c6da296198d7ff017b297db423a0c07c41643878e012c526ad9940f7361",
59
+ "assets/workflows/tiles/se.json": "d6d6ea77ffab1266e62c35de01df740ef1fb3d4cb4266c987eeb84177c5e3bde",
60
+ "assets/workflows/tiles/se.png": "d2ecd32416f05815d106865597022d58feb6c551f11e5fb6254734d6ccac24a6",
61
+ "assets/workflows/tiles/sw.json": "1c9e0e287c465e1bb2e42a1b4b9c2afbcc701e215ed35c5db5bea3a7cecf7b56",
62
+ "assets/workflows/tiles/sw.png": "addd2ec3b9cad4a3a01bfc44cf582b81b0f660bfb84a89845542f40a9de1a984",
63
+ "references/action-icons.md": "bec4080ffca716169e2b6c293524131bde803236b9c82d015ffb7f345c9c2986",
64
+ "references/chunking.md": "e48ce7627ec41923ba684d909ff0656555fe60095cf29730711adef0de0d662d",
65
+ "references/consumer-ui.md": "4786b536fddce47d004a1a5ebdb3a1ea8ddf4da4ec80e6b1e320e8a6399c651b",
66
+ "references/formats.md": "64cdc582ba60d0ece7f22dcffcd0dc5c72471acdec2d977c7d9f1d608a476de6",
67
+ "references/minecraft.md": "12d3df74f02cdd73ef3586d29a79ba30543e8ad87eed0a538b338ff48b13cb9a",
68
+ "references/pixel-art.md": "f7e6b969aef0a4f88219269887b94a8ff05998ef8c591ed490c87ed86d27ad8f",
69
+ "references/recipes.md": "40258b69fd06e7e0386fe31c227427ebd0dd9481e7209cbd227fd6de18fc9431",
70
+ "references/review.md": "5e331e05db52b38fefa8cfe09c4e5eceb0520f43fecaf77f69d25ff5237a3364",
71
+ "references/scene-revision.md": "78f62d6a3f9f04a05d89016269aabc6d83edb061df0d5a68f1f2e05f0e17ffcf",
72
+ "references/scene-space.md": "8827556f8122877c98b083dc4829577b2ba9882148094016bfaf0f3fe7795f0a",
73
+ "references/sources.md": "72d8ef7cc656e9b632d6c35b92c431598cf32254c26cd97056c85286eedd646b",
74
+ "references/text-workflow.md": "7cd64f3235004d0b23e6e2d837a4b46569d4407d24a9ac99fe1fd32491e0ce20",
75
+ "references/ui.md": "fccea168e299771f55e8ce6794ee29895f6ec1f53d2cc7a443385f9f8039fe25",
76
+ "references/workflows.md": "75886884455fde045149245dad4812378f7ddc4d86256a00429b80b2acf503fd",
77
+ "requirements.txt": "41b54a6fb2918667ca47a61d73b522629d84490f3d78f0f20b21135faba10d35",
78
+ "scripts/pixel_art.py": "48e5bbd53e402b5e82b0ab16ea52e9d0bb166040a0bbcfd570b3198d7b56f17f",
79
+ "scripts/pixelart/__init__.py": "67b04f56c8ead2c04ef32584f946d060e5202ca1756116c6d520cf6cdaddb2e0",
80
+ "scripts/pixelart/__main__.py": "935a1c1166b0c1ea35a82256345000bf2c73ded718d77773bc27a71ecce28f7d",
81
+ "scripts/pixelart/analysis.py": "2d8b8c0d3edd9ec809202dcb83d5cc5a49cebe46583a0793d9689c117b3d3771",
82
+ "scripts/pixelart/assembly.py": "d83b77642a008142afa912d9deeacbcda069f3a66e62097c01d2e4d140f12dfe",
83
+ "scripts/pixelart/cli.py": "058468120a5d9344acade5dfa5ec8ef5ed128d418efbeaac987fbb64c6272fe1",
84
+ "scripts/pixelart/compat.py": "98aa940594f525dab4f58c91012f1dbb1f24615c36b7f317be5a433af81cf203",
85
+ "scripts/pixelart/context.py": "d15774a0f2bd076c1d5258a47d157b4d776d00fd4a934d89f6ecf12539c0acd1",
86
+ "scripts/pixelart/core.py": "7f4ee5643f5dbb03b57408ed5b75a4fe0d492e86a64e4fa9c9de2fb29b5cd7c7",
87
+ "scripts/pixelart/edit.py": "409d6c0e74cd95089e527713e856f07ad5a4cea1d88164838eb9463dc2d99d23",
88
+ "scripts/pixelart/ingest.py": "781e3bd693f1cc408d4aed7eab0f07008602c2c375941b5cbd6749fff31c7bb4",
89
+ "scripts/pixelart/jsonio.py": "5da4f59c9c8deeba79fda0c8c12863097e12bcf360e68bbb280f7cac62e57b6f",
90
+ "scripts/pixelart/metadata.py": "24bfb80b11b1c56e9c17c8cb34a8f785b145fba7f8efa081349ea67e09681f31",
91
+ "scripts/pixelart/output.py": "c3c17d615c388c6c2f65555b3a69ab38243e44830245371217c572a0fca193d0",
92
+ "scripts/pixelart/presets.py": "89b5fa58e1c14818a38918a1dc47875347c67f24e09df580e750e29a10312941",
93
+ "scripts/pixelart/review.py": "871be22819e6b44446c92935f03fc46a94efafa6b7cdb2801c359403de16cd4e",
94
+ "scripts/pixelart/spec.py": "225b99bcdb3943fad74a1788808ce1b6baa046b3ee01f3e5d14f4b1b97cddba7",
95
+ "scripts/recipes/_animation_gif.py": "527fb249aec50b462a439fb4a747d1a8084e5805fd293f01b3caa90bfb875238",
96
+ "scripts/recipes/_animation_project.py": "2f5a5e1ca4dab1159fd12c3127e12681393ad9f8521871d4d626b7eb4b5b85f8",
97
+ "scripts/recipes/_chunk_contract.py": "eaf07ce20ca3f237ba79656cf0746cfb7ad189b414199221722c95783083b32e",
98
+ "scripts/recipes/_common.py": "f654fc9f61a81968f7cf70f241b81671519a3c008ac735a57bf76178f8ebc047",
99
+ "scripts/recipes/animation_export.py": "6f462a1c9c1538d0629b83426330b0298087154a539a8d30b6de919fc2627758",
100
+ "scripts/recipes/buttons.py": "0c255b01cc1190b5fc32b100f73d7ed8eb1a7d5a77fe81dbf36db107fbfe2477",
101
+ "scripts/recipes/chunk_left.py": "a11012763911ae8faeb430c1c9c8e940314718faa0bd98693894e0ebf489d8cd",
102
+ "scripts/recipes/chunk_pair.py": "f0f2677587810dbb48e47511b76b148b2ddec03d70c69c7efa7d0046a3632b2b",
103
+ "scripts/recipes/chunk_right.py": "0c6313c277fb3d0fb2b25da6cb5578d07eac35bce438dbfa700315b4a9b030c1",
104
+ "scripts/recipes/courier128.py": "c9d0c6bad1398bff2321a62a0a3a8a3d76ee73997f35f339f86897daa7c97dcc",
105
+ "scripts/recipes/icons.py": "1016d3e322a8dda0dde10405456889c90df5c045c82135c3ccd900d3e37467bb",
106
+ "scripts/recipes/label_atlas.py": "64df90e3b6aa32c3bd1bc757b5d7a9a721e03312ddb1818737eeaa7d9524f619",
107
+ "scripts/recipes/review_atlas.py": "54ba00a5f8a81184d912993591c6f7dcd47c37f0c5c28e935f544df21b091a60",
108
+ "scripts/recipes/scene256.py": "64bae2dc1d74b6de4b6fcd76da544b341d2db4125a22938dcc18109cfbfe49b7",
109
+ "scripts/recipes/tile_preview.py": "39c309e4a24e20bbbd9815d76c9d5dc3e5f224eee211b2b804cc90be16908145",
110
+ "scripts/recipes/tile_scene.py": "ef73e967c31e0219cbfba2cbc8b2fb3db7be9b8725c13edfb6734e2ca4547579"
111
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Chenamel
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: deterministic-pixel-art
3
+ license: MIT
4
+ description: Create or edit deterministic pixel-art PNG sprites, icons, GUI components and named atlases from editable grids, integer drawing commands or Python masks. Includes image measurements with limits on report size, lossless PNG import, visual checks on chosen backgrounds and optional Minecraft styling. Use vector tools for vector icon systems and image generation for photorealistic imagery.
5
+ ---
6
+
7
+ # Deterministic Pixel Art
8
+
9
+ Create editable specifications and exact-grid PNGs with Python and Pillow. Work at native logical resolution and enlarge with nearest-neighbor scaling.
10
+
11
+ ## Choose the shortest useful path
12
+
13
+ - **Unclear or changing direction in a small flat action icon:** read [action-icons.md](references/action-icons.md) to decide direction and silhouette before detail. Skip this card for color-only edits when the action is already clear.
14
+ - **Small edit:** inherit dimensions, palette, lighting, outline and atlas order. Modify only the affected region and check its neighbors. An existing PNG can be imported to an editable spec; exact scoped color changes can use [recolor](references/workflows.md#scoped-color-variants). Alternatives and a full contact sheet are optional.
15
+ - **Text-only work:** read [text-workflow.md](references/text-workflow.md). Use `inspect` for coordinates, colors, components and a size-limited symbol grid; import, edit, render and compare. Measurements do not identify objects or judge beauty.
16
+ - **Visual work:** inspect native size and nearest-neighbor enlargement on the intended background. Use [review.md](references/review.md) for contact sheets, named cells, baseline differences, intentional specks and declared functional contrast pairs.
17
+ - **Named PNG edit or component scene:** read [workflows.md](references/workflows.md) for named import, single-cell replacement, exact allowed-change checks and PNG assembly. Load it only for these tasks.
18
+ - **Scene edits:** when parts must move together, fills must stay inside a surface, or patterns are hard to read, you may consult [scene-revision.md](references/scene-revision.md). Read the relevant section; simple edits can skip it.
19
+ - **Parameterized variants or large point lists:** use the [editable recipes](references/recipes.md) for icons, UI states, a 128×128 sprite and a component scene. Change named parameters or short source functions, then regenerate the JSON/PNG; small one-off edits need no recipe.
20
+ - **Check a single PNG's repeating texture:** run the [tile repeat preview](references/recipes.md#single-tile-repeat-preview) directly on the PNG; choose left/right, up/down or both.
21
+ - **See named tiles together:** use the [named tile scene](references/recipes.md#named-tile-scene) with an explicit name layout. Replace a named tile and regenerate to update every placement; inspect the actual scene and seams.
22
+ - **View every named atlas cell, including atlases over 256 cells:** use [paged atlas review](references/recipes.md#paged-atlas-review). Open every listed native page; the index retains names and global coordinates.
23
+ - **Export existing PNG frames as an animation:** use the optional [animation export](references/recipes.md#png-animation-export) with explicit actions and milliseconds. Keep exact PNGs; select GIF alpha/background conversion explicitly.
24
+ - **Separately drawn chunks:** read [chunking.md](references/chunking.md) to define chunk boundaries, align repeating textures, connect shapes across seams and check local edits; start with the two-chunk example.
25
+
26
+ For new artwork, capture meaning, native size, target background, style reference, palette roles, light/outline rules, state names and the requirements of the game or application that will use the image. User references take priority over demo styling. Read only the relevant guide:
27
+
28
+ - [Pixel art](references/pixel-art.md): silhouettes, clusters, diagonals, form and material.
29
+ - [Scene space](references/scene-space.md): optional help with viewing direction, projection, connected forms and object placement; follow the user's reference.
30
+ - [Pixel UI](references/ui.md): hierarchy, spacing, optical weight, state language and text reservations.
31
+ - [Minecraft](references/minecraft.md): version-specific slots, bevel seams, UV coordinates and GUI-scale requirements; an optional style.
32
+
33
+ When a new shape is uncertain, compare two silhouette ideas. For a UI set, establish layout and one representative component before expanding states. Normally stop after two targeted revision rounds; retain unresolved candidates and state the specific remaining issue.
34
+
35
+ ## Represent and render
36
+
37
+ Read [formats.md](references/formats.md) for the chosen representation or Python API. Prefer grid/palette for small sprites, integer draw operations for geometric components, masks for irregular shapes and named atlases for equal-size states. Mirror only symmetric forms. Rectangles use `x,y,width,height`; unknown symbols and implicit clipping are errors. Primitives replace RGBA; `blit` composites source-over.
38
+
39
+ Grid transparency needs an explicit palette entry, such as `".":null`. This complete 3×3 spec renders one opaque center pixel; [transparent-grid.json](assets/transparent-grid.json) is a larger example:
40
+
41
+ ```json
42
+ {"version":1,"kind":"grid","rows":["...",".X.","..."],"palette":{".":null,"X":"62D8E8"}}
43
+ ```
44
+
45
+ Resolve `scripts/pixel_art.py` relative to this skill, not the working directory. Use Python 3.10+ with Pillow >=10.4,<13; the fixed reproduction baseline is Pillow 12.3.0. Install `requirements.txt` in a task-local virtual environment when needed.
46
+
47
+ ```text
48
+ python <skill>/scripts/pixel_art.py render --spec scene.json --out candidate.png --preview preview.png --preview-background 172033 --metadata layout.json
49
+ python <skill>/scripts/pixel_art.py inspect --image candidate.png --metadata layout.json --cell normal --grid
50
+ python <skill>/scripts/pixel_art.py validate --image candidate.png --rules rules.json
51
+ ```
52
+
53
+ Omit `--cell` for a non-atlas image. `render --embed-metadata` optionally stores layout for later automatic reuse. Keep the editable spec alongside the PNG. Existing outputs require `--force`; revise accepted art into a separate candidate unless replacement is requested. When revision history is required, retain each reviewed candidate's spec, PNG, layout and generator source before rebuilding. Python APIs include `Canvas`, `render`, `outline`, `make_preview`, `validate`, `inspect_image` and `image_to_spec`; keep task-specific writes behind an entrypoint.
54
+
55
+ ## Check against intent
56
+
57
+ Use `preview --image candidate.png --out native.png --scale 1 --background 172033` for a native target-background view; `review` makes diagnostic sheets. `import` creates editable pixels, `replace-cell` updates one atlas member, `recolor` applies declared color mappings within an explicit scope, `verify` checks allowed RGBA changes, and `assemble` places PNG components. If a visual description conflicts with the pixels, follow the [local fact check](references/review.md#when-a-visual-description-conflicts) before revising artwork.
58
+
59
+ If the filesystem rejects hard links when creating output files, choose a local output directory, use `--portable-output`, or explicitly set `PIXELART_PORTABLE_OUTPUT=1` once in the task shell. CLI and recipes inherit it; `--no-portable-output` overrides it for one command. This mode still refuses to overwrite existing files, but another program may read a new file before writing has finished. Never add `--force` automatically. Task-local environment setup and dependency recovery are in [workflows.md](references/workflows.md). Supported Pillow versions can differ in polygon fill; exact reproduction uses the fixed baseline or an unchanged imported pixel spec.
60
+
61
+ Check the size, transparency, palette and atlas layout required by the receiving game or application. Transparent margins, binary alpha, symmetry and palette limits apply only when required. Preserve UVs, state order, reserved content and attached opaque edges. Check each named cell's actual direction, function or state against the brief before detail; correct names and layout do not prove the pictured meaning. Then inspect silhouette, lighting/material, set consistency and seams.
62
+
63
+ UI scenes need real content and the application's actual font to establish text fit; [consumer-ui.md](references/consumer-ui.md) includes the optional `label_atlas.py` helper for actual-font composites, explicit raster mode and state offsets, plus checks for mouse and keyboard behavior. State what remains unchecked when unavailable. Hand-placed antialiasing, dithering and isolated pixels may be intentional. A warning prompts inspection; a report with no warnings still needs visual review. Report concrete changes and tradeoffs, distinguishing author review, independent review and actual in-game tests. [sources.md](references/sources.md) records the external methods and their limits; bundled examples are original artwork.
@@ -0,0 +1,9 @@
1
+ interface:
2
+ display_name: "Deterministic Pixel Art"
3
+ short_description: "用网格和绘图指令制作、修改像素图,支持 Minecraft 风格"
4
+ icon_small: "./assets/brand/pixel-anchor-32.png"
5
+ icon_large: "./assets/brand/pixel-anchor-128.png"
6
+ brand_color: "#146F80"
7
+ default_prompt: "使用 $deterministic-pixel-art 制作可编辑的像素图,并查看原尺寸预览、核对修改范围。"
8
+ policy:
9
+ allow_implicit_invocation: true