PluginBench
Skill
Review
Audit score 70

unocss

antfu/skills

Instant atomic CSS engine with Tailwind compatibility and flexible preset system.

What is unocss?

UnoCSS is a fast, un-opinionated atomic CSS engine that extends Tailwind CSS with presets for icons, typography, web fonts, and more. Use it to configure utility rules, shortcuts, themes, and variants in modern web projects.

  • Generate atomic CSS utilities via flexible preset system
  • Support Tailwind CSS v3/v4 syntax with Wind presets
  • Compose utilities into shortcuts and custom rules
  • Apply variants (hover, dark, responsive) to any rule
  • Extract utilities from source code with safelist/blocklist control
  • Integrate with Vite and Nuxt for automatic CSS generation

How to install unocss

npx skills add https://github.com/antfu/skills --skill unocss
Prerequisites
  • Node.js and npm/yarn/pnpm installed
  • Vite or Nuxt project (or compatible build tool)
  • uno.config.ts or unocss.config.ts file in project root
Claude Code
Cursor
Windsurf
Cline

How to use unocss

  1. 1.Check for uno.config.* or unocss.config.* in project root to understand available presets and rules
  2. 2.Choose a preset (Wind3 for Tailwind v3, Wind4 for v4, or Mini for minimal setup)
  3. 3.Define custom rules, shortcuts, and theme tokens in the config file
  4. 4.Use utility classes in HTML class attributes or enable attributify mode for attribute-based syntax
  5. 5.Apply variants (hover:, dark:, sm:, etc.) to utilities as needed
  6. 6.Run build or dev server to generate CSS automatically

Use cases

Good for
  • Configure UnoCSS in a Vite or Nuxt project with custom presets and theme tokens
  • Write custom utility rules and shortcuts in uno.config.ts for project-specific styling
  • Add icon fonts using preset-icons without external image assets
  • Apply responsive and state variants to utilities for adaptive layouts
  • Convert Tailwind CSS projects to UnoCSS by switching presets
Who it's for
  • Frontend developers building modern web applications
  • Teams migrating from Tailwind CSS to a more flexible system
  • Developers needing icon integration without asset files
  • Projects using Vite or Nuxt that want instant CSS generation

unocss FAQ

What's the difference between UnoCSS and Tailwind CSS?

UnoCSS is a superset of Tailwind with a flexible, un-opinionated core. All utilities come from presets, allowing custom rules and shortcuts. It's faster and more extensible, but requires explicit preset configuration.

Which preset should I use?

Use Preset Wind3 for Tailwind v3 compatibility (most common), Wind4 for Tailwind v4 with modern CSS, or Mini for minimal custom builds. Combine with feature presets like Icons, Attributify, or Typography as needed.

How do I add custom utilities?

Define static or dynamic rules in the config file's rules array. Static rules use regex patterns; dynamic rules use functions to generate CSS based on matched class names.

Can I use UnoCSS with existing Tailwind projects?

Yes. UnoCSS is a superset of Tailwind syntax. Start with Preset Wind3 or Wind4 and gradually add custom rules and presets as needed.

What does attributify mode do?

Attributify mode lets you group utilities in HTML attributes instead of class strings, e.g., `<div bg="blue-500" p="4">` instead of `class="bg-blue-500 p-4"`. Enable via preset-attributify.

Full instructions (SKILL.md)

Source of truth, from antfu/skills.


name: unocss description: UnoCSS instant atomic CSS engine, superset of Tailwind CSS. Use when configuring UnoCSS, writing utility rules, shortcuts, or working with presets like Wind, Icons, Attributify. metadata: author: Anthony Fu version: "2026.1.28" source: Generated from https://github.com/unocss/unocss, scripts located at https://github.com/antfu/skills

UnoCSS is an instant atomic CSS engine designed to be flexible and extensible. The core is un-opinionated - all CSS utilities are provided via presets. It's a superset of Tailwind CSS, so you can reuse your Tailwind knowledge for basic syntax usage.

Important: Before writing UnoCSS code, agents should check for uno.config.* or unocss.config.* files in the project root to understand what presets, rules, and shortcuts are available. If the project setup is unclear, avoid using attributify mode and other advanced features - stick to basic class usage.

The skill is based on UnoCSS 66.x, generated at 2026-01-28.

Core

TopicDescriptionReference
ConfigurationConfig file setup and all configuration optionscore-config
RulesStatic and dynamic rules for generating CSS utilitiescore-rules
ShortcutsCombine multiple rules into single shorthandscore-shortcuts
ThemeTheming system for colors, breakpoints, and design tokenscore-theme
VariantsApply variations like hover:, dark:, responsive to rulescore-variants
ExtractingHow UnoCSS extracts utilities from source codecore-extracting
Safelist & BlocklistForce include or exclude specific utilitiescore-safelist
Layers & PreflightsCSS layer ordering and raw CSS injectioncore-layers

Presets

Main Presets

TopicDescriptionReference
Preset Wind3Tailwind CSS v3 / Windi CSS compatible preset (most common)preset-wind3
Preset Wind4Tailwind CSS v4 compatible preset with modern CSS featurespreset-wind4
Preset MiniMinimal preset with essential utilities for custom buildspreset-mini

Feature Presets

TopicDescriptionReference
Preset IconsPure CSS icons using Iconify with any icon setpreset-icons
Preset AttributifyGroup utilities in HTML attributes instead of classpreset-attributify
Preset TypographyProse classes for typographic defaultspreset-typography
Preset Web FontsEasy Google Fonts and other web fonts integrationpreset-web-fonts
Preset TagifyUse utilities as HTML tag namespreset-tagify
Preset Rem to PxConvert rem units to px for utilitiespreset-rem-to-px

Transformers

TopicDescriptionReference
Variant GroupShorthand for grouping utilities with common prefixestransformer-variant-group
DirectivesCSS directives: @apply, @screen, theme(), icon()transformer-directives
Compile ClassCompile multiple classes into one hashed classtransformer-compile-class
Attributify JSXSupport valueless attributify in JSX/TSXtransformer-attributify-jsx

Integrations

TopicDescriptionReference
Vite IntegrationSetting up UnoCSS with Vite and framework-specific tipsintegrations-vite
Nuxt IntegrationUnoCSS module for Nuxt applicationsintegrations-nuxt