# Introduction
When building Chinese web interfaces with agents in DeepSeek Harness (DSH), the common problem isn't "whether the page can be written", but whether the layout details, color schemes, and copy look like a template site at first glance: no spacing between Chinese and Western text, line heights too tight, hardcoded color values, marketing clichés piled under headings. Relying solely on general frontend skills, it's difficult to solidify CJK typography and "anti-generic-feeling" checks into every conversation.
Below is the community plugin [dsh-zh-ui](https://github.com/1186258278/dsh-zh-ui) (maintainer 1186258278). It provides a Chinese UI design skill, project-level design spec injection, and a static lint tool that doesn't depend on browser rendering in DSH, aimed at Chinese frontend interface design and specification implementation.
# What Is This
**dsh-zh-ui** is a DSH plugin for Chinese interface work, currently distributed on [SkillHub Catalog](https://www.skillhub.cn/plugins/1186258278/dsh-zh-ui) and [GitHub](https://github.com/1186258278/dsh-zh-ui), licensed under MIT. The plugin consists of three capabilities:
1. Skill **`zh-ui-design`**: Chinese typography rules, anti-"generic-feeling" checklist, "define design direction first" workflow, and four style presets with complete CSS custom properties and component examples.
2. **Project spec injection**: When assembling prompts each time, read `DESIGN.md` and `design.tokens.json` from the session working directory and append them as runtime context (not cached system prompt); if files don't exist, no injection occurs.
3. Tool **`zh_design_lint`**: Performs static scanning on HTML / CSS / SCSS / Vue / JSX / TSX / Svelte source code and Tailwind classes, without rendering the page.
The DSH ecosystem advocates "everything is a plugin"; SkillHub is a community directory site, with no official affiliation to DeepSeek / High-Flyer.
# Core Features
## Skill zh-ui-design
The skill side covers Chinese typography and interface directions, key points include:
- Spacing between Chinese and Latin letters/numbers; full-width punctuation; CJK font stacks with fallbacks; line height recommendation 1.6–1.8; approximately 25–40 characters per line.
- Anti-"generic-feeling" checklist, and "design direction priority" process.
- Four style presets: **observatory**, **night-shift**, **cobalt-poster**, **trust**, each containing complete CSS custom properties, and example recipes for navigation, Hero, pricing cards, CTA, etc.; text/background contrast in presets is verified against WCAG AA (4.5:1).
## Project Spec Injection
The plugin listens to `system-prompt/assemble`, appends runtime context after assembly completes, similar in behavior to how `@deepseek-ai/dsh-working-directory` handles working directories. The default list of files to read can be adjusted via `specFiles` in configuration; character limit is controlled by `maxSpecChars` (default 8000).
## Tool zh_design_lint
Lint only reads files within the working directory; paths resolved outside the working directory will be rejected. Rule overview:
| Rule ID | Detection Content |
| --- | --- |
| `hardcoded-color` | Literal colors outside custom property definitions (`--x:`), and Tailwind arbitrary colors like `bg-[#…]`; colors listed in `design.tokens.json` are allowed |
| `off-scale-px` | px values not on spacing scale basis (default basis 4px) in margin / padding / gap / font-size / border-radius / inset; Tailwind `p-[13px]` etc.; 0, 1, 2 and px values in tokens are allowed |
| `font-family-cjk` | Font stack without Chinese fonts (such as PingFang SC, Microsoft YaHei, Noto Sans SC, etc.); `var(...)`, `inherit` and monospace stacks are skipped |
| `cjk-latin-spacing` | Chinese directly adjacent to Latin letters or numbers in visible text |
| `cjk-punctuation` | Half-width `, ; : ! ? .` appearing next to Chinese |
| `cjk-line-height` | Unitless `line-height` below 1.5 on body text selectors; `leading-none/tight/snug` on `<p>`, `<li>`, etc. |
| `purple-gradient` | Gradients containing purple/magenta hue (250°–320°); Tailwind `from/via/to-purple|violet|fuchsia-*` |
| `emoji-icon` | Emoji in visible text (`©`, `™`, etc. are not counted) |
| `heading-subtitle` | Multiple "heading + short subtitle" structures, or eyebrow + heading + subtitle triples |
| `filler-copy` | Common marketing clichés (such as 一站式, 赋能, 无缝, seamless, elevate your …) |
Known limitations: CSS parsing is regex-based, not a complete AST; color keywords like `white` are not detected; contrast, click areas, and post-render font sizes are not measured — such issues require rendering-based tools (the README gives an example with [dsh-design](https://github.com/Viger1/dsh-design)'s `design_audit`).
DSH APIs used by the plugin include: `ctx.skills.register()`, `ctx.on('system-prompt/assemble', …)`, `ctx.workingDirectory.get(session)`, `ctx.tools.register(defineTool(…))`.
# Installation and Enablement
Install from GitHub under the **web** profile:
```sh
dsh plugin --profile web add github:1186258278/dsh-zh-ui
The runtime environment must meet DSH’s Node requirements (README specifies Node 22+). For local development, build artifacts can be mounted via patch:
# extra.yml
- insert:
- id: zh-ui
name: '/absolute/path/to/dsh-zh-ui/lib/index.js'
dsh web --patch ./extra.yml
Optional configuration example (excerpt from README, can trim fields like rules per project):
- id: zh-ui
name: dsh-zh-ui
config:
registerSkill: true
injectProjectSpec: true
specFiles: [DESIGN.md, design.tokens.json]
maxSpecChars: 8000
rules: [hardcoded-color, off-scale-px, font-family-cjk, cjk-latin-spacing, cjk-punctuation, cjk-line-height, purple-gradient, emoji-icon, heading-subtitle, filler-copy]
spacingBasePx: 4
allowedPx: [0, 1, 2]
minLineHeight: 1.5
maxFiles: 200
Typical Usage¶
- After installing the plugin, enable the
zh-ui-designskill in web-related DSH sessions (registered by the plugin whenregisterSkill: true), letting the agent advance interface solutions according to Chinese typography and one of the four presets. - Maintain
DESIGN.mdanddesign.tokens.jsonin the project root directory; withinjectProjectSpecenabled, each prompt assembly will automatically include project design descriptions and token color values, reducing disconnection from repository specifications. - After modifying Vue / React / static HTML files, call
zh_design_lintto scan source code within the working directory, fixing hardcoded colors, spacing scales, mixed text, and clichés issue by issue according to rule IDs. - The repository
demo/provides A/B comparison, details indemo/RESULTS.md(requires cloning the repository to view, not a necessary step for the installation package).
Use Cases and Notes¶
Who it’s for: Teams or individuals using DSH to build Chinese product sites, landing pages, or admin console prototypes, who want to encode CJK typography, design tokens, and “not like AI default sites” constraints into agent workflows.
Permissions and Security: The plugin runs with the current dsh process permissions, can read files within the working directory and register skills/tools. Before installation, review the source code and MIT license on GitHub to ensure compliance with organizational policies.
Division of labor with rendering audits: zh_design_lint is static rules, cannot replace contrast and touch size checks under real rendering; when needed, can be combined with dsh-design and other plugins with design_audit.
Conclusion¶
dsh-zh-ui bundles Chinese UI design skills, project DESIGN.md / design.tokens.json injection, and ten static lint rules into a single DSH plugin, suitable for reducing typography and “template feel” rework when working on Chinese interfaces in the Harness long-term.
- Catalog page: https://www.skillhub.cn/plugins/1186258278/dsh-zh-ui
- Source code and docs: https://github.com/1186258278/dsh-zh-ui
```