mcpField
N
nativewind-and-tailwind-css-compatibility

nativewind-and-tailwind-css-compatibility

github.com/oimiragieoDevelopment4438 installsUpdated 17w ago
Repository

About nativewind-and-tailwind-css-compatibility

A coding skill for reviewing and writing code that follows NativeWind v2 and Tailwind CSS compatibility guidance. It focuses on verified package versions, configuration, and avoiding version-mismatch styling errors.

Key features

  1. 01Pins [email protected] and [email protected]
  2. 02Checks NativeWind and Tailwind compatibility
  3. 03Guides preset configuration
  4. 04Explains fixes for version errors

Use cases

  1. 01Reviewing React Native styles for compatibility
  2. 02Diagnosing PostCSS version errors
  3. 03Configuring Tailwind for NativeWind v2

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/oimiragieo/agent-studio --skill nativewind-and-tailwind-css-compatibility

After installing, type/nativewind-and-tailwind-css-compatibilityin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

commands/
nativewind-and-tailwind-css-compatibility.md
hooks/
post-execute.cjs
pre-execute.cjs
references/
research-requirements.md
rules/
nativewind-and-tailwind-css-compatibility.md
schemas/
input.schema.json
output.schema.json
scripts/
main.cjs
templates/
implementation-template.md

Details

From the project README

Nativewind And Tailwind Css Compatibility Skill

You are a coding standards expert specializing in nativewind and tailwind css compatibility. You help developers write better code by applying established guidelines and best practices. - Review code for guideline compliance - Suggest improvements based on best practices - Explain why certain patterns are preferred - Help refactor code to meet standards When reviewing or writing code, apply these guidelines: Example usage: ``` User: "Review this code for nativewind and tailwind css compatibility compliance" Agent: [Analyzes code against guidelines and provides specific feedback] ```

Iron Laws

  1. ALWAYS pin to [email protected] and [email protected] — higher versions trigger process(css).then(cb) errors due to PostCSS API incompatibilities; these are the only verified-compatible pair for NativeWind v2.
  2. NEVER upgrade nativewind or tailwindcss without verifying the compatibility matrix — NativeWind v4 uses a completely different architecture; upgrading without migration causes all styles to be silently dropped.
  3. ALWAYS remove both packages and reinstall them together when fixing version errors — partially upgrading one leaves incompatible peer dependencies that produce cryptic PostCSS errors.
  4. NEVER use Tailwind CSS v4 with NativeWind v2 — v4 dropped the JIT configuration API that NativeWind v2 relies on; the combination silently produces no styles.
  5. ALWAYS include nativewind/preset in tailwind.config.js — without the preset, Tailwind compiles classes but NativeWind cannot inject them into React Native's StyleSheet engine.

Anti-Patterns

Anti-PatternWhy It FailsCorrect Approach
Using nativewind above 2.0.11 with tailwindcss 3.3.2PostCSS API mismatch triggers process(css).then(cb) runtime error; styles fail silentlyPin to [email protected] + [email protected]; do not upgrade without migration guide
Upgrading only one of the two packagesMismatched peer dependencies cause cryptic PostCSS errorsRemove both and reinstall together: npm remove nativewind tailwindcss && npm install [email protected] [email protected]
Missing nativewind/preset in tailwind.config.jsTailwind compiles classes but NativeWind cannot inject them into React Native StyleSheet; no styles appliedAdd presets: [require('nativewind/preset')] to tailwind.config.js
Mixing NativeWind v2 and v4 documentationv4 uses a Babel-free architecture; v2 patterns cause crashes under v4Decide on a single version; follow only that version's setup guide exclusively
Using Tailwind CSS v4 with NativeWind v2v4 dropped JIT configuration API that NativeWind v2 relies on; styles silently never applyStay on Tailwind v3 with NativeWind v2, or migrate to NativeWind v4 with Tailwind v4

Memory Protocol (MANDATORY)

Before starting:

cat .claude/context/memory/learnings.md

After completing: Record any new patterns or exceptions discovered.

ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.

Comments

Markdown supported