Awesome-omni-skill rcr-frontend
Component development rules specific to Red Cliff Record. Use when working with React components, Tailwind CSS styling, Radix/Shadcn primitives, icons, buttons, forms, or frontend code in this project. Triggers on component files, styling questions, design tokens, Tailwind v4, Shadcn, Radix, TanStack Forms, Lucide icons, or UI primitive usage patterns (sizing, spacing, layout).
install
source · Clone the upstream repo
git clone https://github.com/diegosouzapw/awesome-omni-skill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/frontend/rcr-frontend" ~/.claude/skills/diegosouzapw-awesome-omni-skill-rcr-frontend && rm -rf "$T"
manifest:
skills/frontend/rcr-frontend/SKILL.mdsource content
RCR Frontend
Supplements global
react-guidelines and frontend-html-css-guidelines skills.
Component Organization
- Reusable components:
with kebab-case naming (includes all Shadcn-derived primitives)src/app/components/ - No separate
directory — everything lives directly underui/src/app/components/ - Page-specific components:
directory or-components/
suffix-component.tsx
Styling
- Tailwind CSS v4 with
design tokens fromc-*src/app/styles/theme.css - Semantic color pattern:
/c-main
,c-main-contrast
/c-destructive
. Never invent token names — checkc-destructive-contrast
for the full listsrc/app/styles/app.css - Never use legacy Shadcn theme variables (
,bg-background
, etc.)text-foreground - Detecting invalid classes: Oxfmt sorts unknown classes to the front. If classes appear out of order after
, they're misspelled or missing from the themebun check
Radix & Shadcn
- Always import Radix from the
package (radix-ui
), not from subpackages likeimport { HoverCard as HoverCardPrimitive } from 'radix-ui'@radix-ui/react-hover-card - Use
to compose styling (e.g., dropdown trigger styled as Button) rather than duplicating inline stylesasChild - Mark key DOM nodes with
attributes for styling hooksdata-slot
Component Primitives
Buttons
The
Button component handles sizing, text, and icon dimensions internally. Never override these with utility classes.
- Dimensions: use the
prop (size
|default
|sm
), never manualicon
. For icon-only buttons,h-x w-x p-0
givessize="icon"
.size-9 - Text size: baked into the base (
). Never addtext-sm
,text-xs
, etc. viatext-sm
.className - Icon size: the base rule
auto-sizes child SVGs. Never add[&_svg:not([class*='size-'])]:size-4
orh-x w-x
to icons inside buttons — omit sizing entirely and let the button handle it.size-x - Content over positioning: put content (counts, badges) as regular children in flow — never absolutely-positioned overlays.
Icons
- Lucide icons with
suffix:Icon
, notHomeIconHome - Icons inherit size from surrounding text automatically.
is redundant — omit it.size-[1em] - Only add explicit
when overriding the contextual size (e.g., a larger icon in small text).size-* - Use
from<Spinner />
for loading states@/components/spinner
Tailwind Shorthand
- When width and height are equal, use
instead ofsize-xw-x h-x - No custom/arbitrary text sizes (
,text-[10px]
, etc.) — use design system tokens (text-[13px]
,text-xs
, etc.) unless there's a specific constraint preventing ittext-sm
Event Handlers
- No inline arrow functions in JSX
/onClick
props — extract to a named handler or a component with its own handleronChange
Forms
- TanStack Forms + Zod schemas for form management and validation