PluginBench
Skill
Pass
Audit score 90

unocss

antfu/skills

Instant atomic CSS engine—flexible Tailwind CSS superset with presets for icons, attributify, and more.

What is unocss?

UnoCSS is an un-opinionated atomic CSS engine that generates utility classes on-demand. Use it when you need to configure custom CSS utilities, set up presets (Wind, Icons, Attributify), define shortcuts, or integrate atomic CSS into a project. It's compatible with Tailwind CSS syntax but offers greater flexibility through presets and transformers.

  • Generate atomic CSS utilities via presets (Wind3, Wind4, Mini, Icons, Attributify, Typography, Web Fonts, Tagify)
  • Define static and dynamic rules, shortcuts, and theme tokens for custom utility generation
  • Apply variants (hover, dark, responsive) and CSS layers for organized output
  • Extract utilities from source code and support safelist/blocklist for forced inclusion or exclusion
  • Transform CSS with directives (@apply, @screen, theme(), icon()) and variant grouping
  • Integrate with Vite and Nuxt for seamless build-time CSS generation

How to install unocss

npx skills add https://github.com/antfu/skills --skill unocss
Prerequisites
  • Node.js and npm/yarn/pnpm installed
  • A project with a build tool (Vite, Nuxt, or compatible bundler)
  • Optionally, an existing uno.config.* or unocss.config.* file to understand project presets
Claude Code
Cursor
Windsurf
Cline

How to use unocss

  1. 1.Check the project root for uno.config.* or unocss.config.* to understand available presets and rules
  2. 2.Choose a preset (Wind3 for Tailwind v3 compatibility, Wind4 for v4, Mini for minimal setup)
  3. 3.Define custom rules, shortcuts, and theme tokens in the config file if needed
  4. 4.Use utility classes in HTML or JSX (e.g., class="flex gap-4 text-red-500")
  5. 5.For advanced features, enable transformers (variant grouping, directives, attributify) in config
  6. 6.Run your build tool (Vite dev server, Nuxt dev, etc.) to generate CSS on-demand

Use cases

Good for
  • Configure a custom UnoCSS preset with project-specific design tokens and utility rules
  • Add icon utilities to a project using the Icons preset with Iconify icon sets
  • Set up attributify mode to write utilities as HTML attributes instead of class names
  • Create shortcuts to combine multiple utilities into reusable single-class patterns
  • Migrate from Tailwind CSS v3 to v4-compatible utilities using the Wind4 preset
Who it's for
  • Frontend developers building custom atomic CSS systems
  • Teams migrating from Tailwind CSS who need greater flexibility
  • Projects requiring icon utilities, typography presets, or advanced transformers
  • Developers using Vite or Nuxt who want zero-config or minimal-config CSS generation

unocss FAQ

How do I check what utilities are available in my project?

Look for uno.config.* or unocss.config.* in the project root to see which presets are enabled. Each preset (Wind3, Icons, Attributify, etc.) provides different utilities. Refer to the preset reference docs for a complete list.

Can I use UnoCSS if my project currently uses Tailwind CSS?

Yes. UnoCSS is a superset of Tailwind CSS, so basic class syntax is identical. Start with the Wind3 preset for Tailwind v3 compatibility or Wind4 for v4. You can gradually adopt UnoCSS-specific features like shortcuts and custom rules.

What's the difference between Wind3 and Wind4 presets?

Wind3 is compatible with Tailwind CSS v3 and Windi CSS. Wind4 is compatible with Tailwind CSS v4 and includes modern CSS features. Choose based on your project's Tailwind version.

How do I add custom utilities or shortcuts?

Edit your uno.config.* file to add rules (static or dynamic) and shortcuts. Rules define how utilities are generated; shortcuts combine multiple utilities into a single class name. See the core-rules and core-shortcuts references.

Can I use UnoCSS without a config file?

Yes, UnoCSS works with sensible defaults using the Wind3 preset. However, checking for an existing config file is recommended to avoid conflicts and understand what's already set up.

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.9.25" 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 v66.10.5, generated at 2026-09-25.

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
ProcessorsTransform generated CSS layers (incl. Lightning CSS)core-processors

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