plugin-ui
БесплатноБез исполняемых скриптовНе проверенBuild and style DSH plugin UI with @dshfiles/plugin-ui (shadcn/ui on Tailwind v4, `dshx:` prefix), add shadcn registry components to the kit, and rebuild the…
от astahmer★ 21 звезда на GitHubОб этом скилле
Plugin UI kit
plugins/@dshfiles/plugin-ui is shadcn/ui on Tailwind v4 for every owned plugin. Its README.md is the reference
(wiring, component list, Table/Chart/Diff); this skill holds the rules that bite.
Writing classes
import { Button } from '@dshfiles/plugin-ui/components/ui/button'
import { RefreshCwIcon } from '@dshfiles/plugin-ui/icons'
import { cn } from '@dshfiles/plugin-ui/lib/utils'
<section className={cn('dshx-root dshx:flex dshx:flex-col dshx:gap-4', busy && 'dshx:opacity-60')}>
<Button variant="outline" size="sm"><RefreshCwIcon /> Refresh</Button>
<input className="dshx:font-mono! dshx:text-sm" />
</section>
- Prefix every utility, variants included:
dshx:hover:bg-accent,dshx:sm:max-w-2xl. Write complete static strings — no`dshx:text-${tone}`; Tailwind only sees literal classes. dshx-rooton each surface root you render (scoped Preflight applies under it and inside shadcn portal content).- Semantic colors only (
bg-background,text-muted-foreground,border-border,bg-destructive,text-success…);styles.cssmaps them to the Host--dsw-*tokens.dark:matchesbody[data-ds-dark-theme]. - The Host ships unlayered
button,input,select,textarea{font-family:inherit}, which beats layered utilities: usedshx:font-mono!on controls. - The touch baseline in
ui-styles/src/client.cssis the one deliberate page-global element rule set (touch-actionon native controls, coarse-pointer selection and a 16px field floor). Keep it inside@layer base, sodshx:utilities still override it, and record any new page-global rule there the same way. - Stacking: Host modals are
z-index: 1000; kit dialogs/sheets 1050; floating layers (select, popover, menu, tooltip, hover card) 1100. Keep new overlays in those bands. - Scoped Preflight never targets bare
[data-slot]— DSH tags its own outlets withdata-slot. - Icons from
@dshfiles/plugin-ui/icons(lucide re-export); diffs via@dshfiles/plugin-ui/diffPatchView(@pierre/diffs, slim Shiki — add grammars insrc/shiki-slim.ts). - Prefer Host utilities from
@deepseek-ai/dsh-client-ui-primitivesover local copies:relativeTime,writeClipboard,rankByName.
Small views: container queries, not viewport breakpoints
Plugin surfaces render in 360–480 px panes, split layouts and the composer, so size them by their own width:
<main className="dshx-root dshx:@container dshx:flex dshx:flex-col dshx:gap-4 dshx:p-5 dshx:@max-pane-narrow:p-3">
<div className="dshx:flex dshx:flex-wrap dshx:gap-2 dshx:@max-pane-narrow:flex-nowrap dshx:@max-pane-narrow:overflow-x-auto">…</div>
</main>
dshx:@containeron the surface root (page, panel, card); children query it withdshx:@max-pane-narrow:(< 28rem, phones and 360–480 px panes) anddshx:@max-pane-compact:(< 42rem, split layouts). The tiers live instyles.css.- Never
sm:/md:/xl:inside a panel: those follow the viewport, not the pane. - Declare a collapse order per surface and keep it in this order: labels become icons (
sr-onlykeeps the accessible name), secondary chips hide, then the primary text truncates (min-w-0 truncate), and only then does a row wrap. min-w-0on every flex child that holds text, andshrinkon aButton(its base class isshrink-0).- A container's inline size cannot come from its content: give it a width (
w-80 max-w-full) or let a parent size it. It also cannot query itself: put@max-*classes on its children, not on the@containerelement. - The composer row is a native container: composer slots query it directly. Order there: Drafts and Prompts lose their
labels (
@max-pane-compact, or as soon as the row setsdata-model-compact), the jj dock chips collapse to the working-copy chip, the model name truncates (100cqw), and the row's owndata-model-compact(query it withdshx:in-data-model-compact:) hides the reasoning effort, never the model name. - Check 360, 480, 768 and 1024 px plus a split layout (see
verify-dsh).
Rebuild the sheet owner after any class change
@dshfiles/ui-styles is the one bundle that compiles and injects the Tailwind sheet: its src/client.css imports
@dshfiles/plugin-ui/styles.css, whose @source '../..' scans every owned plugin, so the union of all plugin classes
exists in exactly one ordered rule set. Every other plugin dropped the sheet import, so it ships no stylesheet of its
own; jujutsu and memory keep a src/client.css with only their extra rules. A class change is in that union, so
rebuild the owner — its dist carries the sheet — plus the plugin you changed, whose own JavaScript moved:
# from the repository root
pnpm --dir plugins/@dshfiles/ui-styles build
pnpm --dir plugins/@dshfiles/<changed> build
No other plugin needs rebuilding: the owner is the only sheet-derived byte any of them read. Two divergent sheets in the DOM remain the regression — same-specificity rules
Установить plugin-ui в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл plugin-ui?
Build and style DSH plugin UI with @dshfiles/plugin-ui (shadcn/ui on Tailwind v4, `dshx:` prefix), add shadcn registry components to the kit, and rebuild the shared-sheet owner after class changes. Use when writing or restyling any client component under plugins/@dshfiles/*, touching plugin-ui, or debugging plugin CSS (lost variants, wrong z-index, wrong font).
Как установить скилл plugin-ui?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл plugin-ui запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic