jwynia avatar

Shadcn Layouts

Generates shadcn and Tailwind layouts that actually work on the first try by teaching Claude the CSS mental models most AI code generation misses. The core insight is that layout bugs aren't syntax errors, they're broken constraint chains. It walks through the four critical concepts agents get wrong: height inheritance requiring explicit ancestors all the way to html, flex children needing min-h-0 to scroll, grid display modes on parents not children, and scroll containers requiring explicit dimensions. Includes diagnostic states and common patterns like app shells and dashboards. Honestly, if you've ever had Claude generate a layout where h-full does nothing or scrolling mysteriously breaks, this explains exactly why and how to fix it.

skills.sh installs
460
GitHub stars
182
last updated
Aug 21, 2026

Install

$ npx -y skills add jwynia/agent-skills --skill shadcn-layouts --agent claude-code

Installs into .claude/skills of the current project.

Files

shadcn/Tailwind Layouts

Help generate shadcn/Tailwind components that render correctly the first time. Most agent-generated UI fails due to missing mental models about how CSS layout works—not syntax errors, but assumption gaps.

When to Use This Skill

Use this skill when:

  • Creating shadcn/Tailwind layouts
  • Debugging height/scroll issues
  • Fixing flex/grid problems
  • Setting up full-page app shells

Do NOT use this skill when:

  • Writing backend code
  • Working on non-Tailwind CSS projects
  • Designing (use frontend-design first)

Core Principle

CSS layout flows from constraints. Height flows down from explicit ancestors. Width flows up from content. Agents fail because they apply classes without understanding the constraint chain.

Critical Mental Models

Model 1: Height Inheritance Chain

h-full means height: 100%. 100% of what? 100% of the parent's computed height.

BROKEN (chain incomplete):
<html>                        <!-- no height -->
  <body>                      <!-- no height -->
    <div class="h-full">      <!-- 100% of nothing = 0 -->

Sponsors

Details

Repository
github.com/jwynia/agent-skills
Categories
Frontend Development, AI & Agent Building, Debugging
First seen
Jun 3, 2026

More from jwynia/agent-skills

All 118
1aj-geddes avatarfrontend-routingaj-geddes/useful-ai-promptsImplement client-side routing using React Router, Vue Router, and Angular Router. Use when building multi-page applications with navigation and route protection454skills.sh installs
2jwynia avatarpwa-developmentjwynia/agent-skillsImplement Progressive Web App features for React and Svelte projects. This skill should be used when the user asks to 'make a PWA', 'add offline support', 'crea447skills.sh installs
3inertia-rails avatarshadcn-inertiainertia-rails/skillsshadcn/ui component integration for Inertia Rails React (NOT Next.js): forms, dialogs, tables, toasts, dark mode, command palette, and more. Use when building U436skills.sh installs
4deveshpunjabi avatarmodern-frontend-designdeveshpunjabi/modern-frontend-skillHow to design and build modern, premium-quality frontend interfaces that look like high-end SaaS products, modern AI tools, and award-winning design websites — 432skills.sh installs
5bobmatnyc avatarshadcn-uibobmatnyc/claude-mpm-skillsshadcn/ui component library for React with Tailwind CSS - copy-paste accessible components with full code ownership421skills.sh installs
6tristanmanchester avataranimating-react-native-expotristanmanchester/agent-skillsBuilds performant animations and gesture-driven interactions in React Native (Expo) apps using React Native Reanimated v4 and React Native Gesture Handler (Gest421skills.sh installs