Preface

DSH’s philosophy is that everything is a plugin, and the Web interface theme is no exception. However, to manually change a color scheme, one must deal with a batch of semantic tokens like --dsw-alias-*: filling in two sets of colors for light and dark modes, passing WCAG AA contrast for body text versus background, and ensuring that derived colors are adjusted without touching already locked items. Manual verification item by item is both slow and prone to errors.

dsh-skin-studio solves this problem: it generates, edits, audits, previews, persists, and imports/exports skins entirely locally in the browser, without writing anything to the model context at any point.

What is this

dsh-skin-studio is positioned as a “Local token-safe DSH theme generator, editor, auditor, and exporter.” It is maintained by LeemanCheung and is licensed under MIT.

It is compatible with DeepSeek Harness 0.1.2-rc.1 (compatibility range: >=0.1.2-rc.1 <0.1.3-0, effective only for the web profile).

Core Features

Skin Library & Token Editor

The entry point is Settings → Skin Studio. It provides a responsive skin library, a semantic token editor, and dual light/dark previews. It includes six built-in presets, supports locking, undo/redo, delete confirmation, and manual color adjustment.

Color Picking from Images

You can drop PNG/JPEG/WebP images in to sample color palettes. The plugin limits images to 10 MB and 40 megapixels, decodes pixels downsampled to 128px, and uses OKLab k-means to extract up to six colors. Subsequent automatic derivations will always respect locked tokens.

Contrast Audit

It performs WCAG AA audits on three color categories: body text, secondary text, and brand buttons, and automatically corrects unlocked derived tokens—including white text that must be darkened to meet standards.

Persistence & Application

It achieves persistent Host CRUD and current skin state via storageDomain and generated Typert Remotes. Save & Apply persists the current draft before applying reversible overrides.

Import, Export & Sharing

It supports strict .dshskin JSON export/import, Stop Preview, generation of Client entry source code with declared theme dependencies, and local generated PNG sharing cards.

Installation & Activation

dsh plugin --profile web add github:LeemanCheung/dsh-skin-studio

After installation, you need to restart the existing DSH Web process and refresh its page.

Typical Usage

Taking “generating a skin from an image” as an example:

  1. Enter Settings → Skin Studio and select one of the six presets as the base;
  2. Import a PNG/JPEG/WebP image for sampling (limiting to 10 MB and 40 megapixels) to get up to six OKLab k-means candidate colors;
  3. Manually adjust in the editor and light/dark previews, locking the colors that must be preserved; subsequent automatic derivations will not touch locked items;
  4. Run a WCAG AA audit; the plugin will correct unlocked derived tokens, including white text that needs darkening;
  5. Click Save & Apply after confirmation; the plugin persists the current draft first, then applies reversible overrides;
  6. Export the .dshskin JSON for backup or migration, or generate a local PNG sharing card.

Local Development & Verification

If you wish to build or modify the code yourself, run the following sequentially in the repository root directory:

corepack pnpm typecheck
corepack pnpm test
corepack pnpm build
corepack pnpm pack:check

Applicable Scenarios & Notes

It is suitable for users who want to customize the DSH Web interface color scheme but do not wish to manually maintain semantic tokens: presets and image sampling handle the draft, audit handles readability, and persistence and export handle consolidation and reuse.

There are a few boundary conditions to be clear about before use:

  • The plugin adds no model prompts, tools, messages, token usage, or KV-cache content. Color analysis and theme preview run in the browser; verified skins are persisted on the Host.
  • dshskin/v1 format limits: file size max 100 KB, max 128 semantic tokens, strict metadata, six-digit hexadecimal colors, unique locks pointing to existing tokens, and must include the current DSH core’s background/label/brand/border tokens.
  • Import parsing is pure JSON: it rejects overwriting existing skins with the same ID, unknown fields, prototype keys, deep or oversized values, illegal token names, scripts, CSS selectors, URLs, imports, expressions, and external fonts; imported data is never executed.
  • Image sampling downsamples to 128px and uses only a single frame; it does not preserve animation or image metadata.
  • The generated plugin source code is merely text available for explicit user export; Skin Studio never installs or executes it.
  • Typert Remote methods are intended for clients mounted in the same trusted DSH Web composition, not for the authorization layer of untrusted browser plugins; Remote CRUD is shared with trusted clients within the same composition, rather than isolated by individual browser package identity.

As a final reminder: plugins run with the permissions of the current dsh process. Before installing, it is recommended to check the repository source code and license (this project is MIT) and verify that the compatibility range covers your installed DSH version.

Summary

dsh-skin-studio connects skin sampling, derivation, audit, persistence, and export into a complete local workflow for DSH Web theming, without touching the model context. Repository: https://github.com/LeemanCheung/dsh-skin-studio ; Listing page: https://www.skillhub.cn/plugins/LeemanCheung/dsh-skin-studio . The directory is a community-maintained independent site with no official affiliation with DeepSeek or HF.