ui-designer
Use when a screen spec (MAP entry, pattern name or free-form description) must become browser-viewable mockups, or mockups/manifests must be validated, regenerated or served.
- License 许可
- MIT
- 最近更新
- 2026-10-30
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- ui-designer
- description
- Use when a screen spec (MAP entry, pattern name or free-form description) must become browser-viewable mockups, or mockups/manifests must be validated, regenerated or served.
02 资源文件 2
- 参考文档templates/designer-json.md1.1 KB
- 参考文档templates/screen-spec.md1.2 KB
03 SKILL.md 正文
ui-designer
When to use
- Turn a MAP screen spec into browser-viewable artboards.
- Iterate on mockup feedback after a user reviews the gallery.
- Regenerate or check an existing
mockups/directory.
The skill works in any directory that has a MAP-like manifest; it assumes no other layout.
Steps
- Locate the project's MAP-like manifest and its
mockups/directory. The skill works in any directory with a MAP; no other layout assumption. - Kit selection: read
.designer.jsonnext to the MAP (kit,kit_version,tokens); an absent file meansplain-tokens. A per-run override from the user wins. - Invoke the
ui-designersubagent with the target dir, MAP path, screen keys and optional kit override. The subagent owns rendering and validation; do not render artboards yourself. - After it returns: run
~/.config/opencode/bin/designer-validate <mockups> --map <MAP>(must be green), then~/.config/opencode/bin/designer-gallery <mockups> --map <MAP>, then~/.config/opencode/bin/designer-serve <mockups>and give the user the URL. - Feedback loop: the user comments on the gallery; pass each comment back to the subagent as a new invocation listing the screens to change; re-run validate+gallery; serve prints a fresh URL (or reuse the running server and refresh).
- First use in a project:
~/.config/opencode/bin/designer-kit ensure <mockups> <kit> <version>after choosing the kit. Kits available in the machine cache:plain-tokens,antd,tailwind-daisyui(see~/.config/opencode/bin/designer-kit list).
Verify
Command: run all three scripts by their full path and check their green markers.
~/.config/opencode/bin/designer-validate <mockups> --map <MAP>exits 0 with no findings.~/.config/opencode/bin/designer-gallery <mockups> --map <MAP>writes the generated files (index.html,feature/*,map.html,MOCKUPS.md).~/.config/opencode/bin/designer-serve <mockups>prints adesigner: http://127.0.0.1:<port>/index.htmlURL.
Pitfalls
- Never reference a CDN or any http(s) URL inside artboards; vendor only.
- Never hand-edit generated files (
index.html,feature/*,map.html,MOCKUPS.md); regenerate them with the gallery script. - Kit versions are pinned in the manifest; changing a version is an explicit manifest update plus a
syncrun, never an in-place vendor edit. - A single artboard opens via
file://; the gallery and map view are meant for the local server.
Templates
- templates/screen-spec.md - free-form screen spec used when no MAP row exists
- templates/designer-json.md - commented
.designer.jsonexample (kit, kit_version, tokens)
04 同仓库更多 Skills
verify
Use when a change in __SERVICE__ must be checked before review
work-record
Use when you finished work on a tracker task and it must be recorded in the workspace through a merge request.
task-new
Use to create one story in a stream from the stream profile's story template, link it from its scope screens and open a merge request.
task-decompose
Use to split a stream at the decomposition stage into stories - list scope screens without a story, create the accepted stories and close the stage through a merge request.
task-context
Use to gather the context of a story key or a tracker id - its story, stream stage, scope screens, repositories, decisions, mockups and work records.
repos-sync
Use to update clones of your repositories under repos/ and see their branch, lag and uncommitted changes.