dsh-web-skin
中文 | English
Six-in-one skin pack for the DeepSeek Harness web GUI: Minimal / Brutalism / Morandi / Pixel / Solarized / Dracula, plus a Native (off) option that hands the interface back to the stock theme. Install one plugin, switch skins from Settings → General → Interface skin with a single click — no refresh, no restart. Every skin ships light + dark variants and follows the light/dark/system appearance setting; the choice persists in localStorage.
Features
- Six skins in one package — Minimal (paper-white neutral gray), Brutalism (hard borders, zero radius), Morandi (muted warm grays), Pixel (Game Boy greens), Solarized (canonical sixteen-color port), Dracula.
- Native / off option — the first button is Native: it disposes the token layer, removes the injected style layer and restores the stock theme. Native is the default when nothing has been saved yet.
- Settings-page switcher — seven buttons (Native + six swatches) under Settings → General → Interface skin; click to switch instantly, no reload.
- Light / dark / system — every palette carries paired
{ light, dark }token values and follows the official appearance setting. - No first-frame flash — the host half injects a parser-blocking boot script that reads the saved real skin and paints the canvas color before first paint. With Native selected (or nothing saved) the script writes nothing and leaves the stock theme untouched.
- Yields to the Skin Center — when the community Skin Center (
@linxin666/dsh-client-ui-skin-center) is active (html[data-dsh-skin]/html[data-dsh-custom-theme]), this pack releases its token layer, drops the style layer and the boot marker instead of fighting it. Your pending choice is saved and re-applied as soon as the Skin Center turns off. - Zero runtime dependencies — React and
defineStoreare shared through the client ModuleLoader; palettes are layered onto the official theme viactx.theme.overrideTokens(), so disabling the plugin instantly restores the stock theme. - WCAG-checked palettes —
npm run checkvalidates token shape and key text/background contrast pairs for every skin.
Compatibility
| Plugin version | DSH version (tested) |
|---|---|
| v0.2.1 (six-in-one, native option + Skin Center yield) | dsh v0.2.2-rc.5 |
| v0.1.0 (single Minimal skin) | dsh v0.2.1-rc.5 |
The settings row depends on the official settings.general.item slot and the shared React injection; if that slot changes upstream, skins themselves keep working — only the settings row disappears (with a console warning).
The native option and the Skin Center yield were verified against dsh v0.2.2-rc.5.
Install
Published releases carry the compiled, palette-injected lib/ output, so the
tarball needs no build:
dsh plugin --profile web add "https://github.com/omdsh-dev/dsh-web-skin/releases/latest/download/pkg.tgz"
For local development:
npm install --legacy-peer-deps && npm run build # first time only: tsc + palette injection
dsh plugin --profile web add /path/to/dsh-web-skin
Restart DSH once (or wait for live reload to regroup), then refresh the page.
Configure / Usage
- Switch skin: Settings → General → Interface skin — click any of the six swatch buttons.
- Back to stock: click Native (the first button) to dispose the palette and remove the injected style layer; nothing is written to the theme.
- With Skin Center installed: while the Skin Center is active this plugin only saves your choice and shows a one-line note; it does not apply the skin. Turn the Skin Center off and the saved choice is restored automatically.
- Light/dark: Settings → Appearance → light/dark/system; every skin has both variants.
- Uninstall:
dsh plugin --profile web remove dsh-web-skin, or comment out theinsertblock incordis.patch.ymland restart.
Development
Source is TypeScript (src/); lib/ is generated — tsc output with palette data injected by tools/build.mjs (npm run build runs both, in that order). Never edit lib/ by hand.
dsh-web-skin/
├── package.json # dsh plugin manifest (inject store/locale/ui-theme/ui-slots)
├── cordis.patch.yml # profile plugin-stack insert row (comment out to disable)
├── tsconfig.json # tsc config (strict)
├── icon.svg
├── palettes/ # ★ single source of truth for palettes, one file per skin
│ ├── minimal.mjs # { id, name, swatch, selection, tokens }
│ ├── brutalism.mjs # …6 skins total
│ ├── index.d.ts # TypeScript declarations for the palette shape
│ └── …
├── src/ # ★ TypeScript source (edit code here)
│ ├── client.ts # client: skin row + overrideTokens + style layer
│ └── index.ts # host: first-frame boot (script reads choice + style rules)
├── lib/ # ★ generated output (do not edit)
├── locale/{zh,en}.json
└── tools/
├── build.mjs # palettes/*.mjs → inject into lib/* placeholders
└── check-palette.mjs # shape + WCAG contrast + boot-table consistency (npm run check)
Editing colors / adding a skin
# 1. Edit tokens in palettes/<id>.mjs (or copy one and rename it)
# 2. Regenerate (tsc compiles src/, then palette data is injected into lib/)
npm run build
# 3. Self-check (shape / contrast / boot-table consistency)
npm run check
With a link install the checked-out files are the live ones: rebuild and refresh the page to see changes. During development you can also use npm run dev (tsc watch) plus node tools/build.mjs, and npm run typecheck for a no-emit strict check.
How skinning works
- Palettes are layered via
ctx.theme.overrideTokens(); switching skins = overriding again from the same source (the theme service guarantees the old layer is replaced), and disabling the plugin restores the stock theme. Native disposes the layer instead of overriding it. - A
MutationObserverwatcheshtml[data-dsh-skin]/html[data-dsh-custom-theme]: while either is present the palette, the style layer and thedata-dsh-web-skinboot marker are released; when both disappear the saved selection is re-applied. - The skin row hangs off the official
settings.general.itemslot; React /defineStoreare shared through the client ModuleLoader, so the package has zero runtime dependencies. - The skin choice lives in
localStorage["dsh-web-skin:skin"]; the first-frame boot script (host-injected, parser-blocking) reads the same key so startup never flashes the wrong color. It only acts on a real skin id: fornativeor an unknown id it removesdata-dsh-web-skinand writes no variables, and every boot CSS rule is gated onhtml[data-dsh-web-skin]so the fallback color can never tint the stock theme.
Acknowledgments
- Mechanism design inspired by dsh-leafy-skin (token override layer +
:where()zero-specificity style layer + first-frame boot). - The settings row and store usage follow the official
@deepseek-ai/dsh-client-ui-themeAppearance row and dsh-ui-appearance.
还没有评论,来写第一条。