All skills
onmax avatar

/unocss

@de09c7b official
by Maxonmax/nuxt-skills715 stars
38

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.

Use this Skill: https://skilld.dev/gh/onmax/nuxt-skills/unocss

This session only. Nothing lands on disk.

referencescore-layers.md

≈418 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Layers and Preflights

Control CSS output order and inject global CSS.

Layers

Set layer on rules:

rules: [
  [/^m-(\d)$/, ([, d]) => ({ margin: `${d / 4}rem` }), { layer: 'utilities' }],
  ['btn', { padding: '4px' }], // default layer
]

Layer Ordering

layers: {
  'components': -1,
  'default': 1,
  'utilities': 2,
}

Import Layers Separately

import 'uno:components.css'
import 'uno.css'
import './my-custom.css'
import 'uno:utilities.css'

CSS Cascade Layers

outputToCssLayers: true

// Or with custom names
outputToCssLayers: {
  cssLayerName: (layer) => {
    if (layer === 'default') return 'utilities'
    if (layer === 'shortcuts') return 'utilities.shortcuts'
  }
}

Layer Variants

<!-- UnoCSS layer -->
<p class="uno-layer-my-layer:text-xl">

<!-- CSS @layer -->
<p class="layer-my-layer:text-xl">

Preflights

Inject raw CSS globally:

preflights: [
  {
    getCSS: ({ theme }) => `
      * {
        color: ${theme.colors.gray?.[700] ?? '#333'};
        margin: 0;
      }
    `,
  },
]

With layer:

preflights: [
  {
    layer: 'base',
    getCSS: () => `html { font-family: system-ui; }`,
  },
]

preset-wind4 Layers

Layer Description Order
properties CSS @property rules -200
theme Theme CSS variables -150
base Reset styles -100
<!-- Source references: - https://unocss.dev/config/layers - https://unocss.dev/config/preflights -->

Source: SKILL.md on GitHub

No alerts9d3 checks · Risk SAFE
  • Gen Agent Trust Hub9d

    The skill is a comprehensive documentation set for UnoCSS, providing guidance on configuration, rules, presets, and framework integrations. It is a legitimate resource for web development, although it involves standard development tasks like installing packages and analyzing project files which presents a standard attack surface.

  • Socket9d

    No alerts

  • Snyk9d

    Risk: LOW · No issues

Signed by skilld at de09c7b. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated last week
Other metadata
metadata
{
  "author": "Anthony Fu",
  "version": "2026.1.28",
  "source": "Generated from https://github.com/unocss/unocss, scripts located at https://github.com/antfu/skills"
}

README badge

README badge for onmax/nuxt-skills/unocss