AGENT SKILL

dsh-ui

Use when building, styling, or reviewing in-harness UI — the BotHarness client plugin inside the DeepSeek Harness Web Client. Trigger on new or changed components under `packages/client`, layout or padding alignment with native DSH, tokens/primitives or theme questions, slot and shadow wiring, and any "match the native shell" request.

License 许可
MIT
最近更新
2026-11-15
Stars
★ 852
Forks
63

01 前言 Front Matter

name
dsh-ui
description
Use when building, styling, or reviewing in-harness UI — the BotHarness client plugin inside the DeepSeek Harness Web Client. Trigger on new or changed components under `packages/client`, layout or padding alignment with native DSH, tokens/primitives or theme questions, slot and shadow wiring, and any "match the native shell" request.

02 资源文件 2

03 SKILL.md 正文

DSH-native UI

The in-harness UI is part of the shell, not a standalone app (ADR-0028): style with --dsw-* tokens, compose with ui-primitives, and copy the native layout contract instead of inventing spacing. Measure the running shell; do not guess.

Before designing or reviewing a changed surface, apply the shared UI design standard and its review gate: layout, icons and interaction carry the task; prose supplies only necessary context.

Build order

  1. Slot wiring — register through the documented seams: sidebar.footer.action for the persistent entry; shadow sidebar.workspaces and main key=conversation only while a mode is active, reconciling from one store and disposing on exit. Desktop Bot mode also shadows the whole sidebar slot at -1 to draw the Bot mode sidebar (ADR-0203); a shadow cannot re-render the native sidebar.* sub-slots, so it must provide its own way out of Bot mode. Keep one entry per concept. Done when the entry appears in the running shell and the shipped UI returns intact when the mode is off.
  2. Tokens — every colour, font, and radius reads from --dsw-* (static/alias/specific layers); dark arrives through body[data-ds-dark-theme]. Brand accents stay inside the ≤3-entry alias block. Done when the styles-tokens guard passes and a dark pass shows no unreadable text.
  3. Design system — build Bot-mode surfaces from packages/client/src/client/ds/ (ADR-0194): SettingsDialog, SettingsSection, SettingsRow, Select, NumberStepper, Note, EmptyState, styled with StyleX and the tokens in ds/tokens.stylex.ts. Follow its content rules: one title and one control per row, with an optional short description only when it adds a needed fact; switches, choices and steppers apply on change; one text field saves on Enter or blur; at most one primary button; internal ids and revisions stay out of the default view. Visible text follows UI copy. Done when the design-system-tokens guard passes and no new bh- rule duplicates a component.
  4. Composition — for a net-new surface or control, pick the closest precedent in references/design-references.md before choosing layout; borrow composition, hierarchy, and states, not styling. Done when the PR names the borrowed pattern and every deliberate deviation.
  5. Layout — apply the native inset contract in references/native-contract.md. Done when top-level content measures 16px from both sidebar edges and list-row backgrounds reach the scrollbar gutter.
  6. Primitives & icons — use the exported set (Input, Tag, Pill, StateDot, Tooltip, …) and Icon*Outline16 glyphs where geometry matches; keep a custom icon only where the set has no analogue. Done when controls sit on the shell's grid; record every deliberate omission (for example the 36px capsule Button) in the PR.
  7. Verify & ship — pnpm format && pnpm lint && pnpm typecheck && pnpm test && pnpm build; confirm the client bundle requires only react-family plus declared baseline modules; check the web-dev profile in light and dark. Done when the bundle revision changed and both themes pass by eye.

Rules

  • Native lookups beat intuition: extract the shipped CSS from the installed packages before adding spacing or a control (references/native-contract.md has the recipe).

  • One authority per concept: one mode entry, one projection of state; a second entry point reads as a second feature.

  • Tokens over literals; design-system-tokens.test.ts enforces it. StyleX styles and the plain CSS stylesheets (styles.ts, *-styles.ts, the Browser and Computer sheets) read spacing, type, radius, size, edge width and colour from ds/tokens.stylex.ts, interpolating the constants into CSS strings; no feature-local alias tables. The scale is small on purpose: three type sizes (12/16, 13/20, 14/20) at weights 400 and 500, radii xs/sm/md/lg/panel that read --dsw-radius-*, edges hairline and focus, and three edge colours (divider inside a surface, border for outer edges and inputs, borderStrong for hover and emphasis). Separate with spacing and background before reaching for a border. A value off the scale either snaps to it (≤2px) or gets a named allowlist entry with a reason in that test; content-fixed colours (video letterbox) live in a separate delimited block with rationale.

  • Layers match mobile (apps/mobile/DESIGN.md, "Layers and states"): Bot bubbles and cards are color.surface with no edge, a recessed area inside them (option lists, command previews) is color.well, and the Human's pick on a well is color.accentTint. A DM's Human bubble takes the Bot's primary colour through humanBubbleColors, the same rule as the mobile withAccent. Action-card buttons are borderless pills: primary is fg with a base label (bh-request-primary), secondary is the opaque --bh-surface-selected, and danger is --bh-on-surface-danger on --bh-surface-danger; never a translucent role as a fill.

  • Baseline externals only in the client bundle; adding one updates the bundle contract test in the same commit.

  • Modes unwind: shadows and listeners reconcile from a single store and dispose cleanly.

  • Pointer menus have one positioning owner: use ds/PointerMenu for every application right-click menu. Pass unmodified clientX/clientY; never add feature-local offsets or construct a coordinate proxy anchor. See the coordinate contract in references/native-contract.md. Native anchored dropdowns continue to use Menu, except the measured compact Settings picker and shared ds/Select under whole-window zoom; its owning-Modal container contract is recorded in the native-contract reference.

Reference

  • references/native-contract.md — measured sidebar geometry, the shipped-CSS extraction recipe, and the headless measurement script.
  • references/design-references.md — external precedents (coss.com/ui, Beautiful UI, shadcn/ui, Lucide): what to borrow and what stays out.
  • docs/adr/0194-deepseekbot-design-system-is-stylex-tokens-over-dsh.md records the design system, its content rules and why tokens are defineConsts.
  • docs/adr/0028-in-harness-ui-uses-dsh-design-system.md and docs/research/2026-09-18-dsh-design-tokens-vs-coss.md hold the decision and the token inventory.

04 同仓库更多 Skills

BotHarness
BotHarness/DeepSeekBot

slide-authoring

Technical reference for writing or editing open-slide pages — file contract, 1920×1080 canvas, type scale, layout, palette/visual direction, assets, speaker notes, stepped reveals, page transitions, and morph transitions. Consult this whenever you are about to write or modify any file under `slides/<id>/`, including from inside the `create-slide` or `apply-comments` workflows, or for any ad-hoc slide edit. Triggers on phrases like "edit slide", "tweak this page", "fix the layout", "change the palette", "reveal one by one", "add a transition", "morph transition", "write the speaker notes", "generate the script / talk track", "investigate the slide framework", "how do slides work here".

★ 852
BotHarness
BotHarness/DeepSeekBot

current-slide

Resolve which slide, page, and (optionally) selected element the user is currently viewing in the open-slide dev server. Consult this whenever the user references "this page", "this slide", "this element", "the slide I'm on", "the current page", or any deictic reference to slide content without naming it. Re-read `node_modules/.open-slide/current.json` at the start of every such turn — the user navigates between turns, so a value you read earlier in the conversation is almost certainly stale.

★ 852
BotHarness
BotHarness/DeepSeekBot

create-theme

Use this skill when the user wants to create, draft, author, or extract a slide theme in this open-slide repo. Triggers on phrases like "create a theme", "make a theme called X", "extract a theme from <slide>", "build a theme from these images". Produces two paired files under `themes/` — `<id>.md` (palette, typography, layout, fixed Title/Footer components, motion) and `<id>.demo.tsx` (a runnable demo slide that the dev-UI Themes panel previews). Do NOT use for editing real slides — only for authoring the theme bundle.

★ 852
BotHarness
BotHarness/DeepSeekBot

create-slide

Use this skill when the user wants to create, draft, author, or generate new slides / a presentation in this open-slide repo. Triggers on phrases like "make slides about X", "make a deck about X", "create a presentation", "draft slides for", "new slide", "a deck with speaker notes / a script", or when the user asks to add content under `slides/`. Do NOT use for editing the framework itself — only for authoring content inside `slides/<id>/`.

★ 852
BotHarness
BotHarness/DeepSeekBot

apply-comments

Apply pending @slide-comment markers written by the open-slide inspector tool. Use when the user asks to "apply comments", "process slide comments", "apply the inspector comments", or references markers left inside `slides/<id>/index.tsx`.

★ 852
BotHarness
BotHarness/DeepSeekBot

writing-shape

Writing, exploit: shape raw material into an article, paragraph by paragraph.

★ 852