agentsclimarketplace

Rime css

Skill josui/rime-craft/skills/rime-css

Use when setting up CSS file structure, writing component or page styles, establishing BEM naming conventions, configuring CSS @layer ordering, reviewing CSS organization, or migrating CSS architecture. Covers CUBE CSS methodology, data-* driven variants, skin vs layout separation, CSS custom properties tokens. Applies to pure CSS, Tailwind (@apply, @reference), and framework-based (React/Vue/Svelte) projects with or without component libraries (shadcn, cossui, Radix).From its SKILL.md

Install
npx -y skills add josui/rime-craft --skill rime-css

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

5.4 KB, as published. Nobody here has run it

CSS Architecture — CUBE CSS Layered Approach

Layered CSS architecture based on CUBE CSS. Separates skin (visual) from layout (spatial), enforces layer boundaries via CSS @layer, uses data-* for all variants/states. Adapts to any web stack.

Stack Detection

Detect stack first, then read the corresponding sub-document for implementation details:

Has Tailwind? ─── NO ──→ Read stack-pure-css.md
      │
     YES
      │
Has framework? ─── NO ──→ Read stack-tailwind.md
      │
     YES ──→ Read stack-framework.md

Core: Layer Strategy (Universal)

theme < base < components < app < utilities
LayerContentSource
theme / baseTokens, reset, typography, global layoutstyles/_*.css
componentsReusable UI components (c-*)components/**/*.css
appPage/feature semantic stylesapps/**/*.css or pages/**/*.css
utilitiesSingle-purpose overridesTailwind auto-gen or hand-rolled
/* CSS entry file — declare order, then import */
@layer theme, base, components, app, utilities;

Legacy Coexistence (unlayered styles)

When the page has unlayered legacy/preload CSS you cannot modify, unlayered styles always beat all @layer styles — regardless of specificity. In this case:

  • Design system / third-party → keep in layer() (e.g. @import url("lib.css") layer(lib))
  • Your components / app / utilities → write unlayered (no @layer wrapper)
  • Maintain the same mental ordering (components before app before utilities) via source order and specificity, even without explicit layers
/* Third-party in layer — lowest priority */
@import url("lib.css") layer(lib);

/* Your styles — unlayered to coexist with legacy unlayered CSS */
/* components (loaded first = lower source-order priority) */
@import './components/button.css';
/* app (loaded after = wins over components by source order) */
@import './pages/home.css';

Only adopt full @layer when you control all CSS on the page.

Cascade Effect

ScenarioWinnerWhy
app vs componentappapp > components
app vs utilityutilityutilities > app
component vs utilityutilityutilities > components
any layered vs unlayeredunlayeredUnlayered always wins

Layout utilities naturally override lower layers — no !important needed. !important is banned.

Core: Naming Convention (Universal)

BEM: block__element only, NO --modifier

LayerPatternExample
Layoutl-{context}-{pattern}l-profile-stack, l-grid-2col
Componentc-{component}__elementc-button, c-card__title
App{module}-{semantic}__elementpoint-summary__value

Module namespace prefixes (point-*, skin-*, cart-*) prevent collisions.

data-* for Variants & States

AttributePurposeExample
data-slotDebug anchordata-slot="card-title"
data-variantVisual variantdata-variant="outline"
data-sizeSize variantdata-size="lg"
data-stateInteraction statedata-state="loading"
data-{semantic}Domain statedata-sign="plus"
.c-button { /* base */ }
.c-button[data-variant='outline'] { /* variant */ }
.c-button[data-size='sm'] { /* size */ }
.c-button[data-disabled] { /* state */ }

Core: Skin vs Layout Boundary (Universal)

The most important rule — skin in CSS, layout flows freely.

CategoryPropertiesWhere
Skin (must be in CSS)background, color, border-color, border-radius, box-shadow, outline@layer components or @layer app
Layout (can use utilities)width, height, margin, padding, flex, grid, gap, position, display, font-size, text-alignCSS or markup utilities

Quick Reference

QuestionAnswer
Where do skin styles go?CSS file, in @layer or unlayered (see Legacy Coexistence)
How to express variants?data-* attributes + CSS selectors
Can I use --modifier in BEM?No. Use data-* instead
Can I mix utilities with semantic class?No. Semantic class = all styles in CSS
Can app CSS override c-* skin?No. Use component props/variants
Can I use !important?No. Fix layer order instead

Review Checklist

  • @layer declarations in CSS entry file (or source-order if legacy coexistence)
  • Component CSS in @layer components, app CSS in @layer app (or unlayered if legacy page)
  • BEM block__element only, no --modifier
  • All variants/states use data-*
  • No skin utilities in app-layer markup
  • Semantic classes not mixed with utilities
  • App CSS does not override c-* skin
  • No !important, no hardcoded colors/radii

Keep looking

Skills are one crate of 607,533. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.