unocss
antfu/skills · Agent Skill
UnoCSS atomic CSS engine guidance for rules, shortcuts, and presets like Wind, Icons, and Attributify.
Jump to install ↓Overview
| Publisher | |
|---|---|
| Repository | antfu/skills ↗ |
| Skill folder | unocss |
| Stars | 6,011 |
| Forks | 338 |
| Bundled files | 26 |
| License | MIT |
| Last updated | October 23, 2026 |
| Links | Skill source ↗ · Repository ↗ |
Mozgi check
What we found in the skill files. Details come with a subscription.
Installation
A skill is a folder with a SKILL.md file. Pick your agent and run the commands in a terminal (macOS, Linux or Git Bash on Windows) from your project root.
Copy the prompt into Claude, Codex or another assistant: it will review the skill and install it for you.
Install the “unocss” skill from mozgi.io (https://mozgi.io/skills/antfu-unocss/) for me. 1. Download the archive: https://mozgi.io/skills/antfu-unocss/download If it fails, take the skill folder from the source: https://github.com/antfu/skills/tree/main/skills/unocss 2. Read SKILL.md and the other files. Check the skill is safe: no hidden commands, no sending data elsewhere, no scripts doing something other than described. If anything looks suspicious, stop and tell me. 3. Put the “unocss” folder into your agent's skills folder: .claude/skills/ for Claude Code, .agents/skills/ for Codex, .cursor/skills/ for Cursor, .gemini/skills/ for Gemini CLI. Inside the project if we are in one, otherwise in the home folder (~/.claude/skills/ etc.). 4. Make sure <skills folder>/unocss/SKILL.md exists. 5. Briefly tell me what this skill does and offer to try it on my task. If you cannot do a step yourself, tell me what to click or type.
git clone --depth 1 --branch main https://github.com/antfu/skills.git /tmp/skills mkdir -p .claude/skills cp -r /tmp/skills/skills/unocss .claude/skills/unocss
Restart Claude Code — the skill appears in the list; call it manually with /unocss. For all projects use ~/.claude/skills.
git clone --depth 1 --branch main https://github.com/antfu/skills.git /tmp/skills mkdir -p .agents/skills cp -r /tmp/skills/skills/unocss .agents/skills/unocss
Codex looks for skills in .agents/skills from the current folder up to the repo root; call one with /skills or $unocss. For all projects use ~/.agents/skills.
git clone --depth 1 --branch main https://github.com/antfu/skills.git /tmp/skills mkdir -p .cursor/skills cp -r /tmp/skills/skills/unocss .cursor/skills/unocss
Cursor picks the skill up on start; call it with “/” in Agent chat. Cursor also reads .claude/skills and .agents/skills. For all projects use ~/.cursor/skills.
git clone --depth 1 --branch main https://github.com/antfu/skills.git /tmp/skills mkdir -p .gemini/skills cp -r /tmp/skills/skills/unocss .gemini/skills/unocss
Gemini CLI offers to activate the skill when a task matches — you approve it. For all projects use ~/.gemini/skills.
Read SKILL.md and any companion files before deciding whether to install. Click a file to preview it.
SKILL.md contents
Original author text · read-onlyUnoCSS 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
| Topic | Description | Reference |
|-------|-------------|-----------|
| Configuration | Config file setup and all configuration options | core-config ↗ |
| Rules | Static and dynamic rules for generating CSS utilities | core-rules ↗ |
| Shortcuts | Combine multiple rules into single shorthands | core-shortcuts ↗ |
| Theme | Theming system for colors, breakpoints, and design tokens | core-theme ↗ |
| Variants | Apply variations like hover:, dark:, responsive to rules | core-variants ↗ |
| Extracting | How UnoCSS extracts utilities from source code | core-extracting ↗ |
| Safelist & Blocklist | Force include or exclude specific utilities | core-safelist ↗ |
| Layers & Preflights | CSS layer ordering and raw CSS injection | core-layers ↗ |
| Processors | Transform generated CSS layers (incl. Lightning CSS) | core-processors ↗ |
Presets
Main Presets
| Topic | Description | Reference |
|-------|-------------|-----------|
| Preset Wind3 | Tailwind CSS v3 / Windi CSS compatible preset (most common) | preset-wind3 ↗ |
| Preset Wind4 | Tailwind CSS v4 compatible preset with modern CSS features | preset-wind4 ↗ |
| Preset Mini | Minimal preset with essential utilities for custom builds | preset-mini ↗ |
Feature Presets
| Topic | Description | Reference |
|-------|-------------|-----------|
| Preset Icons | Pure CSS icons using Iconify with any icon set | preset-icons ↗ |
| Preset Attributify | Group utilities in HTML attributes instead of class | preset-attributify ↗ |
| Preset Typography | Prose classes for typographic defaults | preset-typography ↗ |
| Preset Web Fonts | Easy Google Fonts and other web fonts integration | preset-web-fonts ↗ |
| Preset Tagify | Use utilities as HTML tag names | preset-tagify ↗ |
| Preset Rem to Px | Convert rem units to px for utilities | preset-rem-to-px ↗ |
Transformers
| Topic | Description | Reference |
|-------|-------------|-----------|
| Variant Group | Shorthand for grouping utilities with common prefixes | transformer-variant-group ↗ |
| Directives | CSS directives: @apply, @screen, theme(), icon() | transformer-directives ↗ |
| Compile Class | Compile multiple classes into one hashed class | transformer-compile-class ↗ |
| Attributify JSX | Support valueless attributify in JSX/TSX | transformer-attributify-jsx ↗ |
Integrations
| Topic | Description | Reference |
|-------|-------------|-----------|
| Vite Integration | Setting up UnoCSS with Vite and framework-specific tips | integrations-vite ↗ |
| Nuxt Integration | UnoCSS module for Nuxt applications | integrations-nuxt ↗ |
Frequently asked questions
What does the unocss skill do?
UnoCSS atomic CSS engine guidance for rules, shortcuts, and presets like Wind, Icons, and Attributify.
How do I install unocss?
Open the “Installation” block on this page and pick your agent — Claude Code, Codex, Cursor or Gemini CLI — for ready-made commands that copy the skill folder to the right place. Or copy the prompt from the “Via assistant” tab and let the assistant review and install the skill.
Which AI models work with unocss?
Skills are plain Markdown instructions (the Agent Skills format), so unocss works with any agent that reads SKILL.md: Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and more. The model loads the instructions only when a task matches the skill's description.
Is unocss free?
The skill is published openly by antfu under the MIT license. The skill itself costs nothing — you only pay your AI provider for the tokens you use.
Is it safe to install skills?
A skill is a set of instructions your agent will follow, so read SKILL.md and its companion files before installing. Scripts in the skill folder only run if your agent runs them — keep an eye on what it does and do not grant unnecessary permissions.
How is a skill different from an MCP server or a plugin?
An MCP server or plugin gives the model new tools — code that runs and returns a result. A skill gives it knowledge and process: how to approach a task, which steps to follow and what good output looks like. It needs no server or API key.