Skill library

Agent skill UI design

Antfu Design

Shape a web interface around a coherent visual direction.

  • UI design

Install the skill

Installation method

Run the command from your project root with Node.js and npm.

npx skills@latest add antfu/design --skill antfu-design --agent claude-code --yes

Check this file in your project.claude/skills/antfu-design/SKILL.md

Other ways to install
  • Choose an assistant interactively

    npx skills@latest add antfu/design --skill antfu-design

    Select your assistant and choose the project installation scope.

    Official instructions

The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. A Vue build, an UnoCSS base preset and directives transformer, project theme ownership, and a real counter or status display to update.

View operation manual

What this skill helps with

  • Shape a web interface around a coherent visual direction.

Good for

  • Visual direction
Task
Use the Antfu Design preset and existing components on a Vue data screen
Inputs
A Vue build, an UnoCSS base preset and directives transformer, project theme ownership, and a real counter or status display to update.
Output
A themed data screen using semantic surface styles and a readable, correctly formatted numeric component.
Skill name
antfu-design
Repository
antfu/design

Follow the publisher’s build workflow

An underspecified approach

Add the design preset in vite.config and hand-style the dark colors.

The preset is delivered as TypeScript, needs a base preset, and includes token directives in its styles. Theme-specific hex values duplicate existing roles.

A verifiable workflow

  1. The Vite app and the separate UnoCSS config compile the package’s raw Vue and TypeScript sources.
  2. A real count is formatted with stable digit widths and follows the existing theme.
  3. Both computed colors change correctly and keyboard focus survives a theme switch.

Antfu Design operation manual

A themed data screen using semantic surface styles and a readable, correctly formatted numeric component.

A Vue build, an UnoCSS base preset and directives transformer, project theme ownership, and a real counter or status display to update.

  1. Wire a compatible Vue and UnoCSS pipeline

    The Vite app and the separate UnoCSS config compile the package’s raw Vue and TypeScript sources.

    Prompt · Step 1
    Inspect [Vue app and build config] before changing dependencies. Install @antfu/design and UnoCSS using the project package manager. In uno.config.ts use presetAnthonyDesign with our existing compatible base preset or presetWind4 and @unocss/transformer-directives. Keep Vue and the UnoCSS plugin wired into Vite and import virtual:uno.css and @antfu/design/styles.css. If the preset import reports a missing colorjs.io peer dependency, install the range declared by the actual design package.
  2. Use semantic surfaces and reuse the numeric component

    A real count is formatted with stable digit widths and follows the existing theme.

    Prompt · Step 2
    For [data screen and one numeric value], use bg-base and color-base for the surface and text. Check the package catalog before creating a component. Use the documented full import for DisplayNumber from @antfu/design/components/Display/DisplayNumber.vue with its actual numeric value. Use the app’s own dark class controller and preserve the current locale.
  3. Verify theme parity and input on the actual preview

    Both computed colors change correctly and keyboard focus survives a theme switch.

    Prompt · Step 3
    Build [local preview] and open it the same way as the production app. Compare actual computed background and text colors in light and dark, check the formatted number and stable digit width, and switch the theme using the keyboard. Confirm scoped directives expand in any used overlay styles and inspect any named stacking layer the app needs.

Look up build and troubleshooting

Use the actual project configuration and published scripts.

The preset import errors in vite.config. Where does it go?SKILL.md
Command or reference
presetAnthonyDesign · presetWind4 · transformerDirectives
Examples
Use the documented uno.config.ts and load it with the UnoCSS Vite plugin. The package ships raw TypeScript and Vue. Your app’s compilation chain needs to process them. Resolve reported peer dependency gaps according to the installed package metadata.

Troubleshooting and FAQ

The preset import errors in vite.config. Where does it go?

Use the documented uno.config.ts and load it with the UnoCSS Vite plugin. The package ships raw TypeScript and Vue. Your app’s compilation chain needs to process them. Resolve reported peer dependency gaps according to the installed package metadata.