One-click install
npx skills add https://github.com/shawn-sandy/agentic-acss-plugins --skill css-to-class
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: css-to-class
Source: https://github.com/shawn-sandy/agentic-acss-plugins/tree/main/plugins/style-agent/skills/css-to-class
Command: npx skills add https://github.com/shawn-sandy/agentic-acss-plugins --skill css-to-class

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

css-to-class eliminates the maintenance burden of “utility soup” by turning long class attribute strings into a single semantic CSS class that’s easier to read, reuse, and refactor.

Core Features & Use Cases

  • Class list to single semantic selector: Converts an element’s multi-class value into one named class under consistent kebab-case rules.
  • Resolves declarations from your project CSS: Greps discovered project .css files to inline the actual property/value declarations for each utility token.
  • Preserves at-rule context: Keeps declarations that originate inside @media, @supports, or @layer in nested form so responsive/feature behavior remains correct.
  • Handles unresolved tokens safely: Emits placeholders for any tokens that can’t be resolved from existing CSS so you can fill gaps manually.

Quick Start

Extract the utility declarations from the provided HTML element into a new single semantic class in your project CSS, using css-to-class with your element’s class attribute as input.

Frequently Asked Questions about css-to-class

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert Tailwind utility classes into a single semantic CSS class?

To convert Tailwind utility classes into a single semantic CSS class, the Skill parses multi-class HTML attributes and resolves each utility token against your project's discovered CSS files, inlining the actual property declarations under one consistent kebab-case name.

What is the best way to refactor utility-first CSS soup in my HTML markup?

Refactoring utility-first CSS soup involves collapsing long class attribute strings into one readable semantic class. This Skill automates that markup transformation by extracting and grouping utility declarations directly from your existing stylesheets.

Does css-to-class preserve responsive at-rules like @media when extracting utility declarations?

Yes, extracting utility declarations preserves responsive at-rules like @media and @supports. The Skill maintains at-rule nesting for declarations so that your responsive and feature-query behaviors remain structurally correct in the output CSS.

How are unresolved utility tokens handled during markup transformation?

Unresolved utility tokens are handled safely during markup transformation by emitting manual placeholder comments. If the Skill cannot discover a matching declaration in your project CSS files, it outputs a placeholder so you can fill the gaps manually.

Can I use this to refactor SCSS output and plain CSS utility classes?

Yes, you can use this to refactor SCSS output and plain CSS utility classes. The Skill applies to extracting utility-class soup across plain CSS, SCSS output, Tailwind-style utilities, and other utility-first workflows by resolving escaped selectors seamlessly.

What do I need to provide to extract utility declarations into a new CSS class?

To extract utility declarations into a new CSS class, you need to provide your HTML element's class attribute as input. The Skill uses this input to grep discovered project CSS files and inline the resolved property values.