install
source · Clone the upstream repo
git clone https://github.com/ComeOnOliver/skillshub
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ComeOnOliver/skillshub "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/pproenca/dot-skills/uniwind" ~/.claude/skills/comeonoliver-skillshub-uniwind && rm -rf "$T"
manifest:
skills/pproenca/dot-skills/uniwind/SKILL.mdsource content
Uniwind Best Practices
Comprehensive performance optimization and best practices guide for Uniwind - the fastest Tailwind CSS bindings for React Native. Contains 45+ rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.
When to Apply
Reference these guidelines when:
- Setting up Uniwind in a new React Native project
- Configuring Metro plugin and CSS entry points
- Building theme systems with CSS variables
- Integrating third-party components with className support
- Creating responsive layouts for mobile and tablet
- Optimizing styling performance
- Migrating from NativeWind to Uniwind
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Build-Time Configuration | CRITICAL | |
| 2 | Theme Architecture | CRITICAL | |
| 3 | Component Integration | HIGH | |
| 4 | Responsive Design | HIGH | |
| 5 | Performance Optimization | MEDIUM-HIGH | |
| 6 | Platform Patterns | MEDIUM | |
| 7 | State & Interaction | MEDIUM | |
| 8 | Migration & Compatibility | LOW-MEDIUM | |
Quick Reference
1. Build-Time Configuration (CRITICAL)
- Configure Metro Plugin with Required Optionsbuild-metro-config
- Place CSS Entry File in App Root Directorybuild-css-entry
- Configure TypeScript Definition File Locationbuild-typescript-types
- Restart Metro After Configuration Changesbuild-restart-metro
- Enable Debug Mode During Developmentbuild-debug-mode
- Configure rem Base Value for Design System Consistencybuild-rem-polyfill
2. Theme Architecture (CRITICAL)
- Define Theme Variables with @theme Directivetheme-css-variables
- Use @variant Blocks for Theme Definitionstheme-variant-blocks
- Define Identical Variables Across All Themestheme-consistent-variables
- Register Custom Themes in Metro Configtheme-custom-registration
- Use OKLCH Color Space for Perceptual Uniformitytheme-oklch-colors
- Use light-dark() Function for Adaptive Colorstheme-light-dark-function
- Remove ThemeProvider Wrapper from Apptheme-no-provider
3. Component Integration (HIGH)
- Use withUniwind for Third-Party Componentscomp-with-uniwind
- Define Wrapped Components at Module Levelcomp-module-level
- Use Custom Prop Mappings for Non-Style Propscomp-prop-mapping
- Use accent-* Classes for Color Prop Extractioncomp-accent-colors
- Reanimated Components Work Without withUniwindcomp-reanimated
- Use Custom CSS Classes for Complex Reusable Stylescomp-custom-css
4. Responsive Design (HIGH)
- Design Mobile-First with Progressive Enhancementresp-mobile-first
- Limit Breakpoints to 3-5 for Maintainabilityresp-limit-breakpoints
- Use hidden/flex for Responsive Visibilityresp-visibility-toggle
- Define Custom Breakpoints with Semantic Namesresp-custom-breakpoints
- Scale Spacing and Typography Responsivelyresp-responsive-spacing
5. Performance Optimization (MEDIUM-HIGH)
- Use Complete Static Class Names for Build-Time Resolutionperf-static-classnames
- Use useResolveClassNames Sparinglyperf-use-resolve-sparingly
- Memoize Variant Style Objectsperf-memoize-variants
- Use tailwind-merge for Class Deduplicationperf-tailwind-merge
- Prefer className Over Inline style Propperf-avoid-inline-styles
- Combine className and style Prop Correctlyperf-combine-styles
6. Platform Patterns (MEDIUM)
- Use Platform Selectors for iOS/Android Differencesplat-ios-android-selectors
- Use react-native-safe-area-context for Safe Areasplat-safe-area-context
- Understand Yoga Layout Engine Differencesplat-yoga-layout
- Use web: Selector for Cross-Platform Appsplat-web-selector
- Configure Font Families Without Fallbacksplat-font-families
7. State & Interaction (MEDIUM)
- Use Pressable with active:/focus:/disabled: Statesstate-pressable-states
- Use Data Selectors for Component State Stylingstate-data-selectors
- Avoid hover: on Native - Use active: Insteadstate-no-hover
- Use Group Variants for Parent-Child Styling (WIP)state-group-variants
- Use dark: Variant for Dark Mode Stylesstate-dark-mode
8. Migration & Compatibility (LOW-MEDIUM)
- Follow NativeWind Migration Checklistcompat-nativewind-migration
- Use Tailwind 4 CSS-First Configurationcompat-tailwind-4-syntax
- Account for Different rem Default Valuescompat-rem-default
- Replace cssInterop with withUniwindcompat-cssinterop-replacement
- Replace *-safe Classes with Safe Area Contextcompat-safe-area-changes
How to Use
Read individual reference files for detailed explanations and code examples:
- Section definitions - Category structure and impact levels
- Rule template - Template for adding new rules
Reference Files
| File | Description |
|---|---|
| AGENTS.md | Complete compiled guide with all rules |
| references/_sections.md | Category definitions and ordering |
| assets/templates/_template.md | Template for new rules |
| metadata.json | Version and reference information |