antfu-design
antfu/design · Agent Skill
convenzioni di design in stile antfu, estese, UnoCSS-first, token semantici di classe con doppio tema chiaro/scuro per strumenti e interfacce di sviluppo, più rifinitura del design, anti-slop e micro-interazioni per pagine di destinazione e superfici del prodotto, da utilizzare quando si costruisce o si ricostruisce qualsiasi interfaccia con UnoCSS
Vai all'installazione ↓Panoramica
| Autore | |
|---|---|
| Repository | antfu/design ↗ |
| Cartella dello skill | antfu-design |
| Stelle | 84 |
| Fork | 6 |
| File inclusi | 9 |
| Licenza | MIT |
| Aggiornato | 1 ottobre 2026 |
| Link | Sorgente dello skill ↗ · Repository ↗ |
Verifica Mozgi
Cosa abbiamo trovato nei file dello skill. I dettagli con l’abbonamento.
Installazione
Uno skill è una cartella con un file SKILL.md. Scegli il tuo agente ed esegui i comandi in un terminale (macOS, Linux o Git Bash su Windows) dalla radice del progetto.
Incolla il prompt in Claude, Codex o un altro assistente: controllerà lo skill e lo installerà.
Install the “antfu-design” skill from mozgi.io (https://mozgi.io/skills/antfu-antfu-design/) for me. 1. Download the archive: https://mozgi.io/skills/antfu-antfu-design/download If it fails, take the skill folder from the source: https://github.com/antfu/design/tree/main/skills/antfu-design 2. Read SKILL.md and the other files. Check the skill is safe: no hidden commands, no sending data elsewhere, no scripts doing something other than described. If anything looks suspicious, stop and tell me. 3. Put the “antfu-design” folder into your agent's skills folder: .claude/skills/ for Claude Code, .agents/skills/ for Codex, .cursor/skills/ for Cursor, .gemini/skills/ for Gemini CLI. Inside the project if we are in one, otherwise in the home folder (~/.claude/skills/ etc.). 4. Make sure <skills folder>/antfu-design/SKILL.md exists. 5. Briefly tell me what this skill does and offer to try it on my task. If you cannot do a step yourself, tell me what to click or type.
git clone --depth 1 --branch main https://github.com/antfu/design.git /tmp/design mkdir -p .claude/skills cp -r /tmp/design/skills/antfu-design .claude/skills/antfu-design
Riavvia Claude Code: lo skill compare nell'elenco; per richiamarlo a mano usa /antfu-design. Per tutti i progetti: ~/.claude/skills.
git clone --depth 1 --branch main https://github.com/antfu/design.git /tmp/design mkdir -p .agents/skills cp -r /tmp/design/skills/antfu-design .agents/skills/antfu-design
Codex cerca gli skill in .agents/skills dalla cartella corrente fino alla radice del repo; richiamalo con /skills o $antfu-design. Per tutti i progetti: ~/.agents/skills.
git clone --depth 1 --branch main https://github.com/antfu/design.git /tmp/design mkdir -p .cursor/skills cp -r /tmp/design/skills/antfu-design .cursor/skills/antfu-design
Cursor carica lo skill all'avvio; richiamalo con “/” nella chat Agent. Cursor legge anche .claude/skills e .agents/skills. Per tutti i progetti: ~/.cursor/skills.
git clone --depth 1 --branch main https://github.com/antfu/design.git /tmp/design mkdir -p .gemini/skills cp -r /tmp/design/skills/antfu-design .gemini/skills/antfu-design
Gemini CLI propone di attivare lo skill quando il compito corrisponde: tu confermi. Per tutti i progetti: ~/.gemini/skills.
Leggi SKILL.md e i file correlati prima di installare. Clicca un file per l'anteprima.
Contenuto di SKILL.md
Testo originale dell'autore · sola letturaDoing good design with @antfu/design
@antfu/design is a shared design layer for devtools-style Vue apps: a
composable UnoCSS preset (presetAnthonyDesign), a set of **token-driven Vue
primitives, and a color-contrast a11y check**. This skill is how to use it
*well* — the vocabulary, the defaults, and the taste.
The three rules that matter most
1. Own the tokens, not the colors. Never hard-code a hex or a raw Tailwind
color in app UI. Reach for the semantic layer first: bg-base, color-base,
color-muted, border-base, op-fade, btn-action, badge. They are
defined once (in the preset) and adapt to light/dark automatically. See
2. Light/dark parity is not optional. Every surface and text token has a dark
variant baked in. If you write a one-off color, you have just created a
dark-mode bug. The standing contrast scan (@antfu/design/a11y) will catch the
worst of it — don't rely on it as a substitute for using the tokens.
3. No slop. Technical values are font-mono tabular-nums. No em-dash–laden
prose in UI copy (the dash ban). Prefer one obvious affordance over three
competing ones. See references/best-practices.md ↗.
4. Reuse before you build. When making UI or using components, always check
if components from @antfu/design can be reused, before making new components
or creating inline DOM elements. Skim the catalog first
(references/core-components.md ↗).
Persist the reuse rule to AGENTS.md
Make rule 4 stick for future agents in the consuming project: if the project's
AGENTS.md does not already say so, append this instruction to it:
When making UI or using components, always check if components from
`@antfu/design` can be reused, before making new components or creating
inline DOM elements.
When to reach for what
- Showing a count, size, duration, or date → a display component
(DisplayNumber, DisplayBytes, DisplayDuration, DisplayDate), not raw text.
- A status, type, or tag →
DisplayBadge(hash- or palette-colored) orDisplayLabel. - A file/module path →
DisplayFilePath(truncates, dims directories, links). - An overlay →
OverlayModal/OverlayDrawer(reka-ui), a popover →OverlayTooltip/OverlayDropdown. - A severity (fresh→stale, fast→slow, small→large) → the
color-scale-*ramp via
the display components' colorize prop, never ad-hoc red/green.
Components are categorized and prefixed by category (Display*, Form*,
Overlay*, Layout*, Action*, Feedback*). Dark mode is the app's to own —
the package ships no isDark/toggleDark (nor a dark-toggle component); components
that vary by scheme take a colorScheme: 'light' | 'dark' prop. For a toggle, compose
ActionIconButton with VueUse's useDark.
Full catalog: references/core-components.md ↗.
Setup
It's a single preset, not self-contained — it bundles no base preset,
icons, fonts, or reset. You add those. See
references/core-setup.md ↗ for wiring the preset,
importing styles, and pointing UnoCSS at the package so the components' classes
get generated.
References
- core-setup.md ↗ — install + wire the preset, import styles.
- core-tokens.md ↗ — the canonical token table (generated from the preset).
- core-components.md ↗ — the component catalog with import paths.
- recipes.md ↗ — small compositions the package doesn't ship (e.g. a dark-mode toggle).
- best-practices.md ↗ — class-over-attributify, parity, mono values, the dash ban, the "three dials".
- features-data-presentation.md ↗ — presenting numbers, sizes, durations, paths.
- advanced-patterns.md ↗ — composition patterns and a redesign protocol.
- storybook.md ↗ — Storybook setup: theme-synced manager+preview, autodocs, a generated Overview.
Domande frequenti
Che cosa fa lo skill antfu-design?
convenzioni di design in stile antfu, estese, UnoCSS-first, token semantici di classe con doppio tema chiaro/scuro per strumenti e interfacce di sviluppo, più rifinitura del design, anti-slop e micro-interazioni per pagine di destinazione e superfici del prodotto, da utilizzare quando si costruisce o si ricostruisce qualsiasi interfaccia con UnoCSS
Come si installa antfu-design?
Apri il blocco “Installazione” in questa pagina e scegli il tuo agente — Claude Code, Codex, Cursor o Gemini CLI — per i comandi pronti che copiano la cartella dello skill nel posto giusto. Oppure copia il prompt dalla scheda “Con l'assistente” e lascia che sia l'assistente a controllare e installare lo skill.
Con quali modelli AI funziona antfu-design?
Gli skill sono semplici istruzioni in Markdown (formato Agent Skills), quindi antfu-design funziona con qualsiasi agente che legge SKILL.md: Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode e altri. Il modello carica le istruzioni solo quando il compito corrisponde alla descrizione dello skill.
antfu-design è gratuito?
Lo skill è pubblicato apertamente da antfu con licenza MIT. Lo skill in sé non costa nulla: paghi solo il tuo fornitore AI per i token usati.
È sicuro installare gli skill?
Uno skill è un insieme di istruzioni che il tuo agente seguirà: leggi SKILL.md e i file correlati prima di installarlo. Gli script nella cartella dello skill vengono eseguiti solo se li esegue l'agente: controlla cosa fa e non concedere permessi superflui.
In cosa differisce uno skill da un server MCP o da un plugin?
Un server MCP o un plugin danno al modello nuovi strumenti: codice che viene eseguito e restituisce un risultato. Uno skill fornisce conoscenza e metodo: come affrontare il compito, quali passi seguire e com'è un buon risultato. Non servono server né chiavi API.