Token导航 LogoToken导航

Agent Skill · 前端设计

dui(酒驾)

dui 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

dui 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描有提醒项,按安装量在前端设计类的 10,216 个 Skill 里排第 7,570。

总安装 364周安装 15GitHub Stars 公开资料未说明下载 119核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:dui(酒驾)
来源仓库:https://github.com/deepfuturenow/dui
仓库路径:skills/dui
安装命令:
npx skills add https://github.com/deepfuturenow/dui --skill dui
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/deepfuturenow/dui --skill dui

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

提供基于 Lit 框架的无样式 Web 组件基础库及其装饰层实现。组件自动注册无需配置,支持深度未来设计系统的 token 继承机制。包含两层架构:原始行为组件 + 样式扩展,便于定制主题外观。使用前需检测项目是否已安装 @deepfuture/dui-components 依赖包。

dui 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/dui

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/deepfuturenow/dui --skill dui;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

dui 怎么安装?

在终端执行 npx skills add https://github.com/deepfuturenow/dui --skill dui。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

dui 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

dui 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

dui 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

dui 用的人多吗?

公开数据是累计安装 364 次,近一周安装 15 次,下载 119 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

dui 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
dui

酒驾 · 本页

364—操作浏览器未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

DUI

DUI is a styled Lit web component library built on two-layer inheritance. Unstyled primitives (in a separate repo) provide structure and behavior; styled components extend them with aesthetic CSS and design tokens. Components self-register on import — no setup function, no configuration.

Project detection

Before writing any DUI code, check the project's DUI status:

  1. Check package.json for @deepfuture/dui-components deps, or deno.json for @dui/components/* import map entries
  2. If found, note which packages are installed — components self-register on import, so look for import "@deepfuture/dui-components/button" or import "@dui/components/button" patterns
  3. If DUI is not installed, follow the install instructions below
  4. Check whether @deepfuture/dui-inspector (or @dui/inspector) is available — if so, use the inspector workflow below

Principles

  1. Use DUI components first. Before writing custom markup, check if a DUI component exists. Read references/components.md for the full catalog.
  2. Inspect before styling or debugging. Before overriding any DUI token or adding custom CSS to a DUI component, run __dui_inspect('dui-component-name') to see available tokens, parts, slots, and current values. Do the same when debugging unexpected behavior. The inspector is the ground truth.
  3. Style via CSS custom properties, not DOM manipulation. Components expose --token-name custom properties as their styling API. Don't reach into shadow DOM.
  4. Use ::part(root) for CSS properties that don't have a token. Every component exposes a root part for full CSS expressiveness (backdrop-filter, transforms, box-shadow, etc.).
  5. Use semantic design tokens. Use tokens (e.g. --foreground, --background, --accent) before hardcoded colors like #3b82f6.
  6. Compose, don't reinvent. A settings page = dui-tabs + dui-input + dui-select + dui-switch. A dashboard = dui-sidebar + dui-data-table + layout primitives.

Installation

npm

npm install @deepfuture/dui-components

CDN (zero setup)

<script type="module" src="https://cdn.jsdelivr.net/npm/@deepfuture/dui-cdn/dui.min.js"></script>

The CDN bundle registers all components automatically.

Deno (from source)

Add @dui/* entries to your app's deno.json import map:

{
  "imports": {
    "@dui/components/button": "../dui/packages/components/src/button/index.ts"
  }
}

Usage

Components self-register on import. No setup function, no configuration:

// À la carte — import only what you use
import "@deepfuture/dui-components/button";
import "@deepfuture/dui-components/dialog";

// Or register everything
import "@deepfuture/dui-components";

Each import registers the component and all its sub-components. Importing dialog registers dui-dialog, dui-dialog-trigger, dui-dialog-popup, and dui-dialog-close.

Templates

Templates are pre-composed UI patterns. Install alongside the components:

npm install @deepfuture/dui-templates
import "@deepfuture/dui-templates/feed";  // registers dui-feed-item etc.

Typography & spacing

DUI applies text-box: trim-both cap alphabetic to all prose elements (h1–h6, p, li, blockquote, dt, dd). This trims the invisible leading/trailing space from text boxes so glyphs sit on exact pixel boundaries. Combined with the global margin reset, text elements have zero implicit spacing — no default margins, no line-height padding above or below.

This means you must explicitly create all vertical rhythm between text elements. Without it, headings and paragraphs will visually collide.

The rule

**Every group of text elements needs explicit spacing via gap (on a flex/grid parent) or margin-bottom using --space-* tokens.** Never rely on default browser margins or line-height to separate text.

Recommended approach

Wrap related text in a flex column with gap:

.page-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);           /* breathing room between title and subtitle */
  margin-bottom: var(--space-6); /* space before the next section */
}
<div class="page-header">
  <h1>Dashboard</h1>
  <p>Overview of recent order activity and key metrics.</p>
</div>

Inside cards and panels, the same pattern applies:

.stat-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--text-2);
}

.stat-value {
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-semibold);
}

.stat-change {
  font-size: var(--text-sm);
  color: var(--accent);
}

Spacing guidelines

RelationshipSpacing
Title → subtitle / descriptionvar(--space-1) to var(--space-2)
Heading → body content belowvar(--space-3) to var(--space-4)
Between sections / groupsvar(--space-5) to var(--space-6)
Label → value (inside cards)var(--space-1) to var(--space-3)
Between items in a list / stackvar(--space-2) to var(--space-4)

dui-prose for long-form content

For rendered markdown or CMS content where you want automatic spacing, apply class="dui-prose" to the container. This restores heading margins, paragraph spacing, list indentation, and other typographic defaults — all using design tokens.

<div class="dui-prose">
  <h1>Release Notes</h1>
  <p>Version 2.0 brings major improvements...</p>
</div>

dui-prose is for long-form content only. For app UI (dashboards, forms, settings), use explicit flex/gap spacing as shown above.

See references/rules.md for incorrect/correct code pairs.

Critical rules

Styling

  • CSS custom properties are the styling API. Override --button-bg, --button-radius, etc. — not internal shadow DOM elements.
  • ::part(root) for everything else. Filters, transforms, backdrop-filter, box-shadow — anything not covered by a token.
  • No !important. If you need !important, you're fighting the system — use the right token or part instead.
  • Semantic tokens for colors. --foreground, --background, --accent, --surface-1/--surface-2 — never raw color values, unless absolutely necessary.
  • Dark mode via data-theme="dark" on <html>. The token stylesheet handles the rest via custom property overrides. Never add manual dark-mode color logic.

Composition

  • Slots are the composition API. Pass content into components via slots, not by wrapping in divs.
  • Compound components stay together. dui-dialog-trigger belongs inside dui-dialog. dui-select-option belongs inside dui-select. Don't restructure compound component hierarchies.
  • Never reach into shadow DOM. Don't use querySelector on a component's shadowRoot from outside. Use CSS custom properties, ::part(root), or the inspector API instead.
  • Use standard CSS for layout. Use flexbox and grid directly for layout (rows, columns, centering, page margins). DUI does not provide layout wrapper components — layout is CSS's job.

Icons

  • dui-icon with currentColor convention. The icon inherits text color from its parent. Override with --icon-color and --icon-size custom properties.
  • Slot-based content. Pass SVG or img into dui-icon's default slot.

See references/rules.md for incorrect/correct code pairs for every rule above.

Component selection

Read references/components.md for the full catalog. Quick lookup:

NeedUse
Button / actiondui-button with variant and size
Split button with dropdowndui-split-button
Form inputsdui-input, dui-textarea, dui-select, dui-combobox, dui-checkbox, dui-radio-group, dui-switch, dui-slider, dui-number-field, dui-stepper, dui-dropzone
Form field with label/errordui-field wrapping a form control
Form field groupingdui-fieldset
Toggle between optionsdui-toggle-group
Data displaydui-data-table, dui-badge, dui-avatar, dui-calendar, dui-progress, dui-spinner
Navigationdui-sidebar-provider, dui-breadcrumb, dui-tabs
Overlaysdui-dialog (modal), dui-alert-dialog (confirmation), dui-popover, dui-tooltip, dui-menu, dui-command
Disclosuredui-accordion, dui-collapsible
Content containersdui-card, dui-card-grid
Layoutdui-scroll-area, dui-separator — for rows/columns/centering/page margins, use standard CSS flexbox and grid
Textdui-trunc (truncation with max-lines or max-width)
Utilitydui-icon, dui-portal, dui-link
Mapsdui-map + dui-map-marker, dui-map-controls, dui-map-route, dui-map-region, dui-map-heatmap, dui-map-cluster-layer
Chartsdui-chart (Observable Plot wrapper)

Choosing between overlays

Use caseComponent
Focused task requiring inputdui-dialog
Destructive action confirmationdui-alert-dialog
Small contextual content on clickdui-popover
Brief hint on hoverdui-tooltip
Action menu / context menudui-menu
Search / command palettedui-command
Rich preview on hoverdui-preview-card

Use DUI components, not custom markup

Instead of...Use
<hr> or border divsdui-separator
Custom styled <span> for tags/statusdui-badge
Custom animate-spin divdui-spinner
Custom progress bar divdui-progress
Raw <svg> with manual sizingdui-icon with SVG in its slot
overflow: auto divdui-scroll-area
Raw <a> tagdui-link
Custom card div with header/footerdui-card
Label + input + error divdui-field wrapping the input

See references/rules.md for incorrect/correct code pairs for every rule.

Theming

DUI's color system is built on 4 OKLCH primitives with compositional derivation:

TokenRole
--backgroundPage/app background
--foregroundPrimary text/foreground
--accentAccent/brand color
--destructiveDanger/error color

Everything else is derived: --surface-1/2/3 (elevated surfaces via lightness offsets), --text-1/2/3 (text tiers via alpha), --border/--border-strong (foreground at reduced alpha), --accent-subtle, --destructive-subtle. Customizing the palette means changing 4 values.

Design tokens are injected into document.adoptedStyleSheets at import time. They cascade into shadow DOM via CSS custom property inheritance.

Dark mode

<html data-theme="dark">
  <!-- All DUI components render in dark mode -->
</html>

Toggle by setting/removing data-theme="dark" on <html>. The token stylesheet redefines the 4 primitives for dark mode; all derived tokens update automatically.

// Toggle dark mode
document.documentElement.setAttribute("data-theme", "dark");
// Revert to light
document.documentElement.removeAttribute("data-theme");

Customizing the palette

Override the 4 primitives on :root:

:root {
  --accent: oklch(0.6 0.2 280);        /* purple accent */
  --background: oklch(0.96 0.01 80);   /* warm canvas */
}

All derived tokens update automatically.

Two-layer styling

LayerMechanismBest for
CSS variablesdui-button {--button-bg:...}Colors, sizes, spacing
::part(root)dui-button::part(root) {...}Filters, transforms, shadows, clip-paths

Variables cascade from ancestors. ::part() must target the element directly.

Theme attributes vs properties

Some attributes like variant, appearance, and size are theme attributes — they're reflected HTML attributes that the styled CSS layer selects on (:host([variant="primary"])). They appear as attributes in markup:

<dui-button variant="primary" size="lg">Save</dui-button>
<dui-badge variant="danger" appearance="soft">Error</dui-badge>

Behavioral properties like disabled, open, value are reactive Lit properties that affect component behavior and DOM structure.

Event handling

dui-navigate for link buttons

When <dui-button href="..."> is clicked (without modifier keys), it fires dui-navigate. Wire into your router:

document.addEventListener("dui-navigate", (e: CustomEvent<{ href: string }>) => {
  router.navigate(e.detail.href);
});

Component events

Listen on the element:

html`
  <dui-switch @checked-change=${(e: CustomEvent<{ checked: boolean }>) => {
    console.log("Switch toggled:", e.detail.checked);
  }}></dui-switch>
`;

Inspector workflow

When @dui/inspector (or @deepfuture/dui-inspector) is installed, use the inspector to discover, verify, and prototype with DUI components at runtime. This is the most accurate way to understand what's available and how components behave.

CRITICAL: Use the inspector BEFORE writing any DUI styling code — not just for debugging. Run __dui_inspect('dui-sidebar-menu-button') before overriding sidebar tokens. Run __dui_inspect('dui-data-table') before customizing table appearance. The inspector shows which tokens actually exist, what they're called, and their current values. Guessing at token names wastes iterations.

The inspector provides console globals. If the project has a running dev server with a browser, use these in the browser console or via a Playwright/Puppeteer script.

Discovery

// See all DUI components on the page + full catalog of registered types
__dui_inspect()

// Inspect a specific component — get properties, tokens, slots, parts, events
__dui_inspect('dui-button')
__dui_inspect('[data-dui-id="5"]')

The catalog field from __dui_inspect() lists every registered dui-* tag with its property schema, slots, and parts — including components not currently rendered.

Prototyping

// Insert a component into the page
__dui_mutate.insertComponent('[data-dui-id="3"]', 'beforeend', 'dui-button',
  { variant: 'primary' }, 'Click me')

// Set a property
__dui_mutate.setProp('[data-dui-id="5"]', 'variant', 'danger')

// Change a design token globally
__dui_mutate.setToken('--radius-md', '1rem')

// Change a token on one instance
__dui_mutate.setComponentToken('[data-dui-id="5"]', '--button-bg', 'red')

// Replace slot content
__dui_mutate.setSlotContent('[data-dui-id="5"]', '', '<span>New label</span>')

// Remove or move components
__dui_mutate.removeComponent('[data-dui-id="5"]')
__dui_mutate.moveComponent('[data-dui-id="5"]', '[data-dui-id="10"]', 'beforeend')

Verify → export → write

// Export all mutations as structured source file changes
__dui_export()
// → [{ file: "...", changeType: "token"|"template", description: "...", ... }]

Typical agent workflow

1. __dui_inspect()                              → discover available components via catalog
2. __dui_mutate.insertComponent(...)             → build the UI
3. __dui_mutate.setProp(selector, prop, value)   → configure components
4. __dui_inspect(selector)                       → verify state
5. __dui_export()                                → get structured source changes
6. Write changes to source files                  → done

When the inspector is not available, fall back to the static component reference in references/components.md and write code directly.

Detailed references

  • references/components.md — Full catalog of all 57 component families with properties, theme attributes, slots, parts, and CSS custom properties
  • references/rules.md — Incorrect/correct code pairs for every critical rule
  • references/blocks.md — Real-world composition examples: settings forms, chat inputs, dashboards, maps, data tables, and more. Each entry summarizes the pattern and key CSS/layout techniques, with a pointer to the full source. Read a block's source file when building something similar.
  • references/inspector.md — Complete inspector API reference

平台分布

Codex

37.2%
按下载量换算44

Claude

30.15%
按下载量换算36

Cursor

19.92%
按下载量换算24

Gemini CLI

9.95%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills