# @antfu/design: a Vue design system guide for agents (antfu/design) — skill card for AI agents

> AgentGid skill card. Checked on 2026-11-22 against commit 2df66b0 (version 0.6.0).
> Every fact comes from the pack's own files at that commit. Numbers marked "as reported" are the author's.
> Human page: https://agentgid.com/skills/antfu/design/

## Explain it to a non-programmer
A design guide for your AI assistant that comes with a ready Vue component kit. It is for screens of developer tools built in Vue. Your assistant uses the kit's named colours, its ready parts for badges, buttons, file paths and dialogs, and a few strict taste rules. The aim is a calm, dense look that works in light and dark.

## Who it is for
- You build developer tool screens (dashboards, inspectors, panels) in Vue 3
- Your project uses, or will use, the @antfu/design kit and UnoCSS
- You want your assistant to reuse ready parts instead of inventing new buttons and colours each time
- Not for: Your app is in React, Svelte or plain HTML: the guide is about this Vue kit
- Not for: You want a marketing or landing page look: the kit is made for devtools style screens

## What it is
- Kind: knowledge
- License: MIT
- Repository: https://github.com/antfu/design

## What it does
- Own the tokens, not the colors: use the named colour and surface classes, never a raw hex value
- Light and dark parity: every surface and text token has a dark version, so one-off colours count as dark mode bugs
- No slop: technical values in mono with aligned digits, no em dash prose, one obvious action per screen
- Reuse before you build: check the kit's catalog of parts before making a new one
- Redesign protocol for old screens: map colours to tokens, swap raw elements for kit parts, run the contrast scan, tune density, hierarchy and affordance

## Skills
| Skill | Call | Changes code? | In plain words |
|---|---|---|---|
| antfu-design | plain language ("Build this panel with @antfu/design") | yes | Guides your assistant to build or restyle Vue devtools screens with the kit's tokens and parts |

### antfu-design
- Asks for: A Vue 3 project with @antfu/design and UnoCSS
- Asks for: The screen to build or the existing screen to restyle
- Asks for: Your primary colour, if not the default green
- Gives: Screens made of the kit's parts (Display, Form, Overlay, Layout, Action, Feedback)
- Gives: Colours through named tokens that work in light and dark
- Gives: A setup for the UnoCSS preset, styles and named z-index layers
- Gives: A line added to your project's AGENTS.md about reusing kit parts
- Gives: For restyles: a step by step move onto the kit with a contrast scan
- Say: "Restyle this settings panel with @antfu/design and keep light and dark in parity"

## Know before installing
- It edits a file outside the screen you asked about: the skill tells your assistant to add a reuse rule to your project's AGENTS.md if it is not there yet.
- It is tied to one kit: the guide assumes the @antfu/design package is in your project.
- The kit is not self-contained: you add the base UnoCSS preset, icons, fonts and a style reset yourself.
- Dark mode is yours to wire: the kit ships no dark mode switch; the guide shows how to build one with VueUse.
- The author calls the whole thing an experiment in steering agents toward one person's design taste.

## Install (official commands)
- Any assistant via skills-npm: `pnpm add @antfu/design unocss` — Then share the package's bundled skill with your assistant through skills-npm (see that tool's own docs). The published package ships the skills folder. Remove: `remove the @antfu/design package and the shared skill folder`.
- Any assistant via the skills CLI: The repository's skills folder is the source the skills CLI reads; copy skills/antfu-design into your assistant's skills folder.

## What runs on the user's machine
- Code on the machine: yes (The skill itself is markdown. The @antfu/design package it guides you to install ships Vue components, a UnoCSS preset and an optional contrast scanner that your build or your assistant runs. Install scripts run only if you clone and install the whole repository.)
- Network: optional
- Install: One SKILL.md and eight reference markdown files. No hooks, no scripts in the skill folder.
- Installing the cloned repository (contributors only): The root prepare script points git hooks at .githooks, sets up a pre-commit hook that runs the linter with fixes, and runs skills-npm.
- Setup: The guide tells your assistant to add the package from the npm registry and wire it into uno.config.ts.
- First use in a project: Your assistant appends a reuse rule to the project's AGENTS.md if it is missing.
- Redesign protocol: A contrast scan opens a URL you give in a headless Playwright browser, in light and dark, and prints violations.
- Your app shows DisplayIconifyRemoteIcon: That one component fetches icon SVGs from api.iconify.design at run time.

## Settings
- `primary`: Primary colour, a string or a full colour scale (default antfu green)
- `darkBackground`: Near black for dark surfaces
- `blocklists.plainZIndex`: Set to false to allow plain z-index utilities

## Examples (from the pack's own files)
- Dark mode toggle recipe: output format defined in skills/antfu-design/references/recipes.md

## Mistakes to avoid
- Not: Install the skill in a React or plain HTML project. Instead: Use it in a Vue 3 project that depends on @antfu/design. Why: Every rule refers to this kit's tokens and Vue parts
- Not: Add only presetAnthonyDesign to uno.config.ts. Instead: Also add a base preset (presetWind4, presetWind3 or presetMini) and the directives transformer. Why: Without a base preset the shortcuts have nothing to expand into, and without the transformer overlay styles are dropped
- Not: Write plain z-50 on an overlay. Instead: Define named layers (z-nav, z-dropdown, z-modal-content …) in your own UnoCSS shortcuts. Why: The preset blocks plain z-index and ships no z-index values
- Not: Use bg-base on a card nested in a glass panel. Instead: Use bg-raised or bg-sunken for nested layers; bg-base only for things that must hide what is behind. Why: The opaque surfaces punch a solid rectangle through a translucent parent

## What leaves the machine
- The page at the URL you scan → A local headless Playwright browser (the URL you pass), Only when the contrast scan is run during the redesign protocol. Opt out: Skip the scan
- Icon names requested by your app's users → api.iconify.design, Only if your app uses DisplayIconifyRemoteIcon. Opt out: Use UnoCSS icon classes from an installed icon set instead

## Lines in the pack aimed at agents (ask the person first)
- "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:" (skills/antfu-design/SKILL.md): The skill asks the agent to write into the project's AGENTS.md. Tell the person before editing that file.

## May I use it like this?
- commercial-app: yes (MIT)
- client-work: yes (MIT)
- redistribute-files: conditions (MIT: keep the copyright and permission notice in copies)
- inside-app-bundle: yes (MIT: keep the notice)

## Which one to pick
- If You build Vue devtools screens on the @antfu/design kit and want the agent to reuse its parts and tokens: skill:antfu/design
- If You want design vocabulary and review commands for any interface, not tied to one component kit: skill:pbakaus/impeccable
- If You want art direction and taste rules for any stack, checked in a browser: skill:Leonxlnx/taste-skill
- If You only want rules that filter out generic AI looking UI and text: skill:miqdadbadjuber/anti-slop

## Works well with
- tool:unocss: The kit is a UnoCSS preset; the skill wires it into uno.config.ts
- tool:vueuse-core: The skill's dark mode recipe uses VueUse's useDark and useToggle
- tool:storybook: references/storybook.md documents the kit's parts in Storybook with a theme synced toggle
- tool:axe-core-playwright: The contrast scan in the redesign protocol runs axe-core through Playwright

## Works in and needs
- Works in Any assistant that reads skill folders: skills folder via skills-npm
- Works in Any assistant that reads skill folders: skills folder via the skills CLI
- Needs Vue 3: The kit's parts are Vue components
- Needs UnoCSS with a base preset and transformer-directives: The design layer is a UnoCSS preset that is not self-contained
- Needs Playwright and @axe-core/playwright (optional): Only for the contrast scan

## How to tell it works
In a Vue 3 project with @antfu/design set up, ask: "Build a panel that lists packages with their version, size and last update, using @antfu/design." It works if the result uses DisplayPackageName, DisplayVersion, DisplayBytes and DisplayDate with named colour tokens and no raw hex values.

## Related
- antfu/skills-npm
