Unocss

From Esposter/Esposter · View interactive version

Unocss is an AI agent skill from the GitHub repository Esposter/Esposter. Apply when editing uno.config.ts, adding a colour, utility or shortcut, choosing between two spellings of one utility, or when a utility generates nothing or loses to another rule. Esposter's UnoCSS configuration in apps/web, its colours, its extraction and its canonical spellings.

How to use this skill

Skill file

UnoCSS Configuration

Colours

Two sources, and only two:

Nothing is safelisted

A utility is generated only from what the extractor reads, and a :class literal is read like an attribute — :class="isActive ? 'bg-accent' : 'bg-panel'" generates both. So a class is written whole in the file that uses it rather than assembled at runtime and safelisted to cover the gap (the ui-library skill, references/icons.md). A safelist entry would also come back in matched from every uno.generate(token), whatever the token was, and apps/web/app/templates.test.ts asks whether a token is a utility by looking it up in matched — so a caller there looks the token up rather than counting the set.

CSS layer name mapping

Every layer but properties is uno-<layer>, and apps/web/app/assets/css/layers.css orders them chrome first, utilities last (references/css-layers.md).

Every template scanned at startup

Every .vue under app/, and every .ts carrying @unocss-include, is scanned at dev startup, and a template comment is blanked before attributify reads it (references/extraction.md).

Shortcuts for recurring utility pairs

When the same attributify utility combination recurs across components, define a named shortcut in uno.config.ts and use it everywhere instead of the raw pair, as the library's ui-* shortcuts do. Adding one moves the resolved-config snapshot (references/config-snapshot.md).

One spelling per utility — the blocklist

BLOCKED_SPELLINGS in uno.config.ts is the one source of which spelling is canonical — unocss/blocklist reports the rest (references/blocklist.md).

The resolved-config snapshot

uno.config.test.ts snapshots the resolved config so an unocss bump shows what upstream moved — read the diff before regenerating (references/config-snapshot.md).

Reference pages

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.