New to Claude Skills? Learn how to install them →

antfu on GitHub

Antfu Design

Free

Design interfaces efficiently with UnoCSS conventions.

by antfu5.7k stars on antfu/skills
3 views
Updated Jun 23, 2026
Get this skill

Free · Opens the source repo

What Antfu Design does

Antfu Design provides a structured approach to building interfaces using UnoCSS across various frameworks such as React, Vue, Svelte, Solid, and plain HTML. This skill emphasizes the use of semantic tokens and class-based utilities, promoting consistency and clarity in design. By following the core design principles outlined in the skill, developers can create responsive and maintainable user interfaces that adhere to best practices for both light and dark themes.

The skill encourages the use of semantic shortcuts for styling, which helps reduce clutter in markup and enhances readability. It also includes a comprehensive set of guidelines for managing z-index layers and generating class-based utilities, ensuring that the code remains clean and efficient. The focus on dual light/dark mode design allows for a seamless user experience, catering to diverse user preferences.

In addition to the core principles, Antfu Design includes best practices for anti-slop hygiene, ensuring that user-facing text is free from unnecessary characters and that design elements maintain a high standard of quality. The references provided cover a range of topics, from core tokens and combinations to advanced design protocols, making it a valuable resource for both novice and experienced developers.

This skill is particularly useful for teams looking to standardize their design processes and improve collaboration among developers and designers. By leveraging the structured approach of Antfu Design, users can streamline their workflow and enhance the overall quality of their interfaces.

When to use it

Use this skill when building or refactoring user interfaces with UnoCSS to ensure a consistent design approach across different frameworks.

When not to use it

This skill may not be suitable for projects that do not utilize UnoCSS or require highly customized design solutions outside its guidelines.

What you can build with it

Building a Landing Page

Utilize Antfu Design to create a visually appealing landing page that adheres to best practices for UI design.

Refactoring a Devtools Panel

Apply the skill's conventions to refactor an existing devtools panel, ensuring consistency and clarity in the interface.

Creating a Component Library

Leverage Antfu Design to establish a component library that follows semantic token principles for reusable UI elements.

How to install Antfu Design

View source

1. Install with the skills CLI

npx skills add antfu/skills/antfu-design --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by antfu

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.

Core Rules

  • Use semantic shortcuts (bg-base, border-base, color-active, btn-action) instead of raw utility chains in markup.
  • Design light and dark mode together. Core tokens must work in both themes.
  • Name z-index layers (z-top-nav, z-panel-content, z-drawer-content). Do not use raw z values in templates.
  • Generate class-based utilities only (class="..."). Avoid Attributify syntax in generated code.
  • Keep icon/status class strings literal so UnoCSS can statically extract them (// @unocss-include when needed).
  • Use font-mono + tabular-nums for technical values (paths, SHAs, counters, timestamps, percentages).
  • For long paths and IDs, truncate visually but keep the full value in title.
  • Read the brief and set the three dials before choosing a look (core-design-read).
  • Borders for dense or structural surfaces, layered shadows for elevated ones (features-micro-interactions).
  • Zero em-dash and en-dash characters in any user-facing text (best-practices-anti-slop).

Starter shortcuts

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',
  },
]

Core References

TopicDescriptionReference
Core PrinciplesSemantic tokens, dark mode parity, z-index naming, class-first outputcore-principles
Starter KitCopy-paste UnoCSS starter config and base light/dark stylescore-starter-kit
Tokens and CombosToken families, reusable class combinations, mobile-safe shell tokenscore-tokens-and-combinations
Design Read and DialsRead the brief, declare a design read, set variance/motion/density dialscore-design-read

Best Practices

TopicDescriptionReference
Strict Rules and Pre-FlightDo/don't checklist and the consolidated pre-flightbest-practices-strict-rules
Class over AttributifyWhy generated code uses class utilities, with conversionsbest-practices-class-utilities-over-attributify
Anti-Slop HygieneThe dash ban and the AI-tell forbidden patternsbest-practices-anti-slop
Bias CorrectionTypography, color, layout, and materiality defaults to overridebest-practices-bias-correction

Features

TopicDescriptionReference
Data PresentationPaths, icons, time, date, numbers, badges, buttonsfeatures-data-presentation
Micro-InteractionsRadius, alignment, shadows, animation, numbers, outlines, hit areasfeatures-micro-interactions
Floating Vue OverridesShared Floating Vue setup and popper stylingfeatures-floating-vue-overrides

Advanced

TopicDescriptionReference
Pattern VocabularyNamed UI patterns to recognize and reach foradvanced-pattern-vocabulary
Redesign ProtocolDetect mode, audit first, preserve IA and SEOadvanced-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 -->

Frequently asked questions about Antfu Design

Similar skills