dsh-skin: A Visual Foundation for DeepSeek Harness Based on Official Theme Tokens

Introduction

In DeepSeek Harness (DSH), if you customize the look by directly modifying component class names, the styles will silently break the moment a frontend refactor lands. A more robust approach is to override the officially defined theme tokens (such as accent color, focus ring, border radius, and shadows). dsh-skin is a visual foundation plugin designed exactly for this purpose — it relies solely on the documented --dsw-* theme tokens from DSH and applies site-wide styling through CSS variable overrides.

What Is This

dsh-skin is a plugin that provides color and geometric hierarchy for DSH, developed by maintainer frankfurtiln. It works by overriding the default values of official theme tokens to uniformly control links, selected states, focus rings, border radii, and shadows. It does not handle layout, spacing, or mobile experience — those responsibilities are covered by plugins like dsh-mobile-ux.

Core Features

  • Official token-based overrides: Changes appearance exclusively by overriding the --dsw-* series of theme tokens, minimizing direct dependency on component class names.
  • One-click style configuration: Adjust the site-wide theme color, selected-state intensity, radius step, and shadow tint by editing the four CSS variables at the top of styles/skin.css.
  • Light/dark theme support: Defines dark-mode values inside the body[data-ds-dark-theme] block to align with the official dark theme token specificity.
  • Build and validation gates: Provides three scripts — npm run build, npm run check, and npm test — to ensure the generated client code matches the source, that theme token names exist, and that style selectors never target class names.
  • Browser-side status inspection: Use window.__dshSkin.status() to verify whether the styles have been mounted to <head> and what scope they are in.

Installation & Activation

The commands below assume the plugin is checked out at /opt/dsh/dsh-skin; substitute your actual path if it differs.

dsh plugin --profile web add /opt/dsh/dsh-skin
# add "dsh-skin" to dsh.profile.bundles in the Web profile's package.json
systemctl restart deepseek-harness.service
curl -s http://127.0.0.1:3080/skin/status

After restarting the service, refresh the page in your browser and the plugin will automatically mount its client bundle.

Typical Usage

Once installed, the plugin loads its styles automatically. If a host theme reload causes the styles to be lost, you can re-mount them from the browser console:

__dshSkin.remount()

Calling window.__dshSkin.status() in the browser console lets you confirm whether the stylesheet has been inserted into <head> and inspect its scope information.

Configuration & Build

styles/skin.css is the only style file you need to edit. Four CSS variables at the top of the file control the overall appearance:

--skin-accent: #3b6fe0;          /* links, focus ring, selected state */
--skin-accent-soft: 24%;         /* strength of the selected background */
--skin-radius-step: 2px;         /* added to every radius token */
--skin-shadow-slate: 15 23 42;   /* rgb components of the shadow tint */

Dark theme values should be placed inside the body[data-ds-dark-theme] block, because the official dark tokens have higher specificity than :root.

After modifying styles, run the following commands to rebuild and validate:

npm run build     # writes client.js
npm run check     # client.js matches the source, token names exist
npm test          # stylesheet never selects on class names

Use Cases & Caveats

  • Ideal for developers who want a unified visual style across DSH while relying on official theme tokens as much as possible.
  • The plugin runs with the permissions of the current DSH process. Review the source code and license before installing (this project is MIT-licensed).
  • If you need to switch between multiple themes, consider splitting them into separate plugins rather than maintaining multiple themes within this one.
  • The plugin does not provide runtime configuration (environment variables or a settings page); all visual adjustments require editing the CSS and rebuilding.

Closing

dsh-skin provides a maintainable, verifiable visual foundation by overriding official theme tokens, making theme customization more robust. The project repository and source code are available at: https://github.com/frankfurtlin/dsh-skin

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye