skills/nextjs/nextjs-styling/SKILL.md
Implement zero-runtime CSS with Tailwind, CSS Modules, and the cn() utility for RSC-compatible styling in Next.js. Use when choosing a styling library, creating dynamic class utilities, or optimizing fonts with next/font.
npx skillsauth add hoangnguyen0403/agent-skills-standard nextjs-stylingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Prioritize Zero-Runtime CSS for Server Components.
cn utility — Combine clsx + tailwind-merge for dynamic classes.next/font for zero-CLS self-hosted fonts.width/height or fill on <Image>.See implementation examples
| Library | Verdict | Reason |
| :------------------------- | :----------------- | :------------------------------------------------- |
| Tailwind / shadcn | Preferred (P1) | Zero-runtime, RSC compatible. Best for App Router. |
| CSS Modules / SCSS | Recommended | Scoped, zero-runtime. Good for legacy projects. |
| Ant Design | Supported | Use with Client Component wrappers for RSCs. |
| MUI / Chakra (Runtime) | Avoid | Forces use client widely. Degrades performance. |
For specific library setups, see:
clsx + tailwind-merge (cn utility).next/font to prevent Cumulative Layout Shift (CLS).width/height on images.'use client'; prefer Tailwind or CSS Modules.<img> without dimensions: Always set width/height or use fill to prevent CLS.clsx+tailwind-merge (cn) for dynamic styles.<link> tag: Use next/font for zero-CLS self-hosted fonts.development
Summarizes GitHub PR, GitLab MR, or Azure DevOps PR metadata, review threads, changed files, and template completeness. Use during review-ticket or code-review workflows when PR/MR context exists.
tools
Development tools, linting, and build config for TypeScript. Use when configuring ESLint, Prettier, Jest, Vitest, tsconfig, or any TS build tooling.
development
Validate input, secure auth tokens, and prevent injection attacks in TypeScript. Use when validating input, handling auth tokens, sanitizing data, or managing secrets and sensitive configuration.
development
Apply modern TypeScript standards for type safety and maintainability. Use when working with types, interfaces, generics, enums, unions, or tsconfig settings.