external/antfu-skills/antfu-design/SKILL.md
antfu-style design conventions, broadened. UnoCSS-first, class-based semantic tokens with dual light/dark for tooling and devtools UIs, plus design-read, anti-slop, and micro-interaction polish for landing pages and product surfaces. Use when building or refactoring any interface with UnoCSS.
npx skillsauth add seikaikyo/dash-skills antfu-designInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this when building interfaces with UnoCSS in any framework (React, Vue, Svelte, Solid, or plain HTML), from dense devtools panels to landing pages. Read core-design-read first to set the direction, then apply the token system plus the polish and anti-slop rules.
bg-base, border-base, color-active, btn-action) instead of raw utility chains in markup.z-top-nav, z-panel-content, z-drawer-content). Do not use raw z values in templates.class="..."). Avoid Attributify syntax in generated code.// @unocss-include when needed).font-mono + tabular-nums for technical values (paths, SHAs, counters, timestamps, percentages).title.A minimal semantic core. See core-starter-kit for the full uno.config.ts and base styles.
shortcuts: [
{
'color-base': 'color-neutral-800 dark:color-neutral-200',
'bg-base': 'bg-white dark:bg-#111',
'bg-secondary': 'bg-#eee dark:bg-#222',
'border-base': 'border-#8882',
'bg-active': 'bg-#8881',
'color-active': 'color-primary-600 dark:color-primary-300',
'border-active': 'border-primary-600/25 dark:border-primary-400/25',
'btn-action': 'inline-flex items-center gap-2 rounded border border-base px2 py1 op75 hover:op100 hover:bg-active disabled:pointer-events-none disabled:op30!',
'op-fade': 'op65 dark:op55',
'op-mute': 'op30 dark:op25',
'z-top-nav': 'z-60',
'z-panel-content': 'z-70',
'z-drawer-content': 'z-100',
},
]
| Topic | Description | Reference | |-------|-------------|-----------| | Core Principles | Semantic tokens, dark mode parity, z-index naming, class-first output | core-principles | | Starter Kit | Copy-paste UnoCSS starter config and base light/dark styles | core-starter-kit | | Tokens and Combos | Token families, reusable class combinations, mobile-safe shell tokens | core-tokens-and-combinations | | Design Read and Dials | Read the brief, declare a design read, set variance/motion/density dials | core-design-read |
| Topic | Description | Reference | |-------|-------------|-----------| | Strict Rules and Pre-Flight | Do/don't checklist and the consolidated pre-flight | best-practices-strict-rules | | Class over Attributify | Why generated code uses class utilities, with conversions | best-practices-class-utilities-over-attributify | | Anti-Slop Hygiene | The dash ban and the AI-tell forbidden patterns | best-practices-anti-slop | | Bias Correction | Typography, color, layout, and materiality defaults to override | best-practices-bias-correction |
| Topic | Description | Reference | |-------|-------------|-----------| | Data Presentation | Paths, icons, time, date, numbers, badges, buttons | features-data-presentation | | Micro-Interactions | Radius, alignment, shadows, animation, numbers, outlines, hit areas | features-micro-interactions | | Floating Vue Overrides | Shared Floating Vue setup and popper styling | features-floating-vue-overrides |
| Topic | Description | Reference | |-------|-------------|-----------| | Pattern Vocabulary | Named UI patterns to recognize and reach for | advanced-pattern-vocabulary | | Redesign Protocol | Detect mode, audit first, preserve IA and SEO | advanced-redesign-protocol |
<!-- Source references: - https://github.com/antfu/node-modules-inspector - https://github.com/vitejs/devtools/tree/main/packages/rolldown - https://github.com/eslint/config-inspector - https://github.com/antfu/vite-plugin-inspect - https://github.com/antfu/agent-container - https://github.com/Leonxlnx/taste-skill - https://github.com/jakubkrehel/make-interfaces-feel-better -->development
拋棄式 HTML mockup 比稿:產出 2 到 3 個設計立場不同的變體(密度 / 版式 / 強調軸,不是換色),各附取捨說明,最後給有立場的對比結論。適用:「畫個草圖」「比較 A 版 B 版」「先看方向再做」「給我看幾種做法」。要 production 元件或設計已定案時不適用。
tools
需求不明時的意圖萃取訪談:一次一題、每題附上自己的猜測、聽出「真正想要 vs 覺得應該要」,直到能預測使用者反應(約 95% 信心)才動工。適用:需求缺少對象 / 動機 / 成功標準 / 約束,或使用者點名「訪談我」「先確認一下」「我們確定嗎」。明確自足的指示、純資訊查詢、機械性操作不適用。
development
對非平凡決策啟動新鮮 context 對抗審查(找碴不背書),在修正還便宜的時候抓出錯誤方向。適用:高風險改動(production、資安敏感邏輯、不可逆操作)、不熟的程式碼、要宣稱「這樣是安全的 / 可行的」之前。機械性操作與一行修改不適用。
testing
Reference for writing and editing agent skills well — the vocabulary and principles that make a skill predictable. Consult when authoring, reviewing, or pruning a SKILL.md.