Agent skill

Shadcn Layouts

by jwynia in jwynia/agent-skills

Generate correct shadcn/Tailwind layouts by applying CSS mental models.

MITAuto-check passedFrontend & Design

Install Shadcn Layouts

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

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jwynia/agent-skills shadcn-layouts --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jwynia/agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/tech/frontend/design/shadcn-layouts .claude/skills/shadcn-layouts && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
shadcn-layouts
GitHub stars
170
Token cost
~1.5k tokens
SKILL.md length
424 words
Files
3 (incl. references)
Skills in repo
111
Repo updated
First seen
Licence
MIT

At a glance

Generate correct shadcn/Tailwind layouts by applying CSS mental models.

  • Asks to create a shadcn layout
  • SKILL.md covers When to Use This Skill, Core Principle, Critical Mental Models and Diagnostic States, plus 4 more sections
  • Calls npx
  • Fix layout issues

What it does

Shadcn Layouts is an agent skill from jwynia/agent-skills. Generate correct shadcn/Tailwind layouts by applying CSS mental models. This skill should be used when the user asks to 'create a shadcn layout', 'fix layout issues', 'debug CSS height problems', 'make scrolling work', or has issues with Tailwind flex/grid. Keywords: shadcn, Tailwind, layout, CSS, flex, grid, height, scroll, overflow.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/component-checklist.md` and `references/layout-templates.md`). Compatibility notes: Works with shadcn/ui, Tailwind CSS v3/v4, React, Next.js.

It sits in Frontend & Design, covering Design systems and CSS and styling. It works with shadcn/ui and Tailwind CSS. The licence is MIT.

When your agent uses it

  • Asks to create a shadcn layout
  • Fix layout issues
  • Debug CSS height problems
  • Make scrolling work

Example prompts

  • “create a shadcn layout”
  • “fix layout issues”
  • “debug CSS height problems”
  • “/shadcn-layouts”

Requirements

  • Node.js
  • Compatibility (from SKILL.md): Works with shadcn/ui, Tailwind CSS v3/v4, React, Next.js.

What it can do on your machine

Read from SKILL.md and the folder at commit e02ec7e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Works with shadcn/ui, Tailwind CSS v3/v4, React, Next.js.

    From compatibility in the SKILL.md frontmatter.

Context cost

Shadcn Layouts loads about 1.5k tokens when it runs, and up to ~8.7k if it reads all its reference files. Until then it costs about 88 tokens; SKILL.md has 424 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~88
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~8.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jwynia/agent-skills at commit e02ec7e, republished under its MIT licence (© jwynia). 424 words, ~1,481 tokens.

Download SKILL.mdSave it as .claude/skills/shadcn-layouts/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
shadcn-layouts
description
Generate correct shadcn/Tailwind layouts by applying CSS mental models. This skill should be used when the user asks to 'create a shadcn layout', 'fix layout issues', 'debug CSS height problems', 'make scrolling work', or has issues with Tailwind flex/grid. Keywords: shadcn, Tailwind, layout, CSS, flex, grid, height, scroll, overflow.
compatibility
Works with shadcn/ui, Tailwind CSS v3/v4, React, Next.js.
license
MIT
metadata.author
jwynia
metadata.version
1.0
metadata.type
utility
metadata.mode
generative
metadata.domain
development

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 -->

WORKING (chain complete):
<html class="h-full">         <!-- 100% of viewport -->
  <body class="h-full">       <!-- 100% of html -->
    <div class="h-full">      <!-- 100% of body = works -->

Rule: Trace from element up to <html>. Every ancestor needs explicit height, OR use viewport units (h-screen) to break the chain.

Model 2: Flex Overflow Gotcha

Flex children have implicit min-height: auto, preventing shrinking below content size.

tsx
// BROKEN (won't scroll)
<div className="flex flex-col h-screen">
  <main className="flex-1 overflow-y-auto">  {/* Can't shrink! */}

// WORKING (scrolls correctly)
<div className="flex flex-col h-screen">
  <main className="flex-1 overflow-y-auto min-h-0">  {/* Can shrink */}

Rule: Flex children that scroll need min-h-0. Children that shouldn't shrink need shrink-0.

Model 3: Grid Parent/Child Separation

Grid is defined on the parent. Children just occupy cells.

tsx
// BROKEN
<div className="grid-cols-3">           {/* Missing 'grid'! */}

// WORKING
<div className="grid grid-cols-3">      {/* 'grid' enables grid-cols-* */}

Rule: flex or grid must be declared on parent before direction/template classes work.

Model 4: Scroll Container Dimensions

Scroll containers need explicit dimensions to know when to scroll.

tsx
// BROKEN (never scrolls)
<ScrollArea>  {/* No height constraint */}

// WORKING (flex-constrained)
<div className="flex flex-col h-screen">
  <ScrollArea className="flex-1 min-h-0">

Diagnostic States

SL1: Height Chain Broken

Symptoms: Elements collapse, h-full not working Fix: Trace to html, add heights or use h-screen

SL2: Flex Overflow Blocked

Symptoms: Scroll doesn't work, content overflows Fix: Add min-h-0 to flex children that scroll

Show full SKILL.md (170 more words)Show less
SL3: Grid Structure Wrong

Symptoms: Items stack vertically instead of columns Fix: Ensure grid grid-cols-* on parent

SL4: Styles Not Applying

Symptoms: Unstyled components, colors wrong Fix: Check Tailwind content paths, CSS variables in globals.css

SL5: Component Dependencies Missing

Symptoms: "Module not found", functionality broken Fix: npx shadcn add [component], install peer deps

Common Layout Patterns

Full-Page App Shell
tsx
// layout.tsx
<html lang="en" className="h-full">
  <body className="h-full">{children}</body>
</html>

// page.tsx
<div className="flex h-full">
  <aside className="w-64 shrink-0 border-r overflow-y-auto">
    <nav>...</nav>
  </aside>
  <main className="flex-1 min-w-0 overflow-y-auto">
    {children}
  </main>
</div>
Dashboard with Header
tsx
<div className="flex flex-col h-screen">
  <header className="h-16 shrink-0 border-b">...</header>
  <div className="flex flex-1 min-h-0">
    <aside className="w-64 shrink-0 border-r overflow-y-auto">...</aside>
    <main className="flex-1 min-w-0 overflow-y-auto p-6">
      {children}
    </main>
  </div>
</div>
Card Grid
tsx
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
  {items.map(item => (
    <Card key={item.id}>
      <CardHeader><CardTitle>{item.title}</CardTitle></CardHeader>
      <CardContent>{item.content}</CardContent>
    </Card>
  ))}
</div>

Anti-Patterns

The Height Assumption

Using h-full without verifying ancestor chain. Fix: Trace to html. Use h-screen to break chain.

The Overflow Ignorance

Adding overflow-y-auto without min-h-0 on flex children. Fix: Flex children need min-h-0 to shrink.

The Import Guess

Guessing import paths like shadcn/ui. Fix: Check components.json for alias. Usually @/components/ui/*.

The Flat Compound

Flattening compound components (Dialog without DialogTrigger/DialogContent). Fix: Maintain required nesting structure.

Pre-Generation Checklist

  • Import alias known (@/components/ui/*)
  • html has h-full
  • body has h-full or min-h-full
  • Scroll containers have explicit height
  • Flex scroll children have min-h-0
  • Fixed elements have shrink-0
  • frontend-design - Design decisions before implementation
  • react-pwa - PWA features for React apps

© jwynia, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/tech/frontend/design/shadcn-layouts of jwynia/agent-skills.

  • SKILL.md
  • references/component-checklist.md
  • references/layout-templates.md

Open the folder on GitHubat commit e02ec7e

Compare with similar skills

Shadcn Layouts next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Shadcn Layouts compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Shadcn Layouts this skilljwynia/agent-skills170—~1.5kAutomated safety check: PassMIT
UI StylingOhh-889/skyroc79513 repos~2.5kAutomated safety check: PassMIT
Cosscrafter-station/petdex4.2k—~1.4kAutomated safety check: PassMIT
Avoid AI Designsunkaifei/FlyCms656—~3.5kAutomated safety check: PassMIT
Extract DesignManavarya09/design-extract4.2k—~786Automated safety check: NotesMIT
Unslop UIJCarterJohnson/vibecoded-design-tells513—~1.9kAutomated safety check: PassCustom licence

Similar skills

  • UI Styling

    Ohh-889/skyroc

    Create beautiful, accessible user interfaces with shadcn/ui components (built on Radix UI + Tailwind), Tailwind CSS utility-first styling, and canvas-based visual designs.

    795 GitHub starsUsed in 13 repos~2.5k tokens
    Frontend & DesignAuto-check passed
  • Coss

    crafter-station/petdex

    Helps implement coss UI components correctly. An agent skill from crafter-station/petdex.

    4.2k GitHub stars~1.4k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Avoid AI Design

    sunkaifei/FlyCms

    Audit and rewrite frontend UI to remove generic AI design patterns ("AI slop"), both the first-order defaults (purple gradients, Inter, a centered hero over three cards, untouched shadcn) and the…

    656 GitHub stars~3.5k tokensUpdated 2 days ago
    Frontend & DesignAuto-check passed
  • Extract Design

    Manavarya09/design-extract

    Extract the full design language from any website URL. An agent skill from Manavarya09/design-extract.

    4.2k GitHub stars~786 tokensUpdated 2 days ago
    Frontend & DesignAuto-check: notes
  • Unslop UI

    JCarterJohnson/vibecoded-design-tells

    Strips the cues that make a website read as AI-generated and forces a deliberate, project-specific design choice instead of the model's default.

    513 GitHub stars~1.9k tokensUpdated 3 mo ago
    Frontend & DesignAuto-check passed
  • Oxlint Tailwindcss

    sergioazoc/oxlint-tailwindcss

    Set up oxlint-tailwindcss — Tailwind CSS v4 lint rules for oxlint — in a project, and act on its diagnostics.

    101 GitHub stars~1.9k tokensUpdated yesterday
    Frontend & DesignAuto-check passed

More from jwynia/agent-skills

All 111 skills in this repo
  • Devcontainer

    jwynia/agent-skills

    Diagnose devcontainer configuration problems and guide development environment setup.

    170 GitHub stars~1.2k tokensUpdated 7 mo ago
    Auto-check: notes
  • Frontend Design

    jwynia/agent-skills

    Create distinctive, production-grade frontend interfaces with high design quality.

    170 GitHub stars~3.2k tokensUpdated 7 mo ago
    Auto-check passed
  • Gitea Workflow

    jwynia/agent-skills

    Orchestrate agile development workflows for Gitea repositories using the tea CLI.

    170 GitHub stars~3.8k tokensUpdated 7 mo ago
    Auto-check passed
  • Godot Asset Generator

    jwynia/agent-skills

    Generate game assets using AI image generation APIs (DALL-E, Replicate, fal.ai) and prepare them for Godot.

    170 GitHub stars~3.8k tokensUpdated 7 mo ago
    Auto-check passed
  • Mastra Hono

    jwynia/agent-skills

    Develop AI agents, tools, and workflows with Mastra v1 Beta and Hono servers.

    170 GitHub stars~2.9k tokensUpdated 7 mo ago
    Auto-check passed
  • PPTX Generator

    jwynia/agent-skills

    Create and manipulate PowerPoint PPTX files programmatically.

    170 GitHub stars~3.1k tokensUpdated 7 mo ago
    Auto-check passed

Questions about Shadcn Layouts

What does Shadcn Layouts do?

Generate correct shadcn/Tailwind layouts by applying CSS mental models. Shadcn Layouts is an agent skill from jwynia/agent-skills. Generate correct shadcn/Tailwind layouts by applying CSS mental models.

When should I use Shadcn Layouts?

Shadcn Layouts fits situations like: asks to create a shadcn layout; fix layout issues; debug CSS height problems; make scrolling work.

How do I install Shadcn Layouts in Claude Code?

Run `npx skills add jwynia/agent-skills --skill shadcn-layouts -a claude-code`. Or copy the skill folder (skills/tech/frontend/design/shadcn-layouts in jwynia/agent-skills) into .claude/skills/shadcn-layouts in your project. Claude Code loads it when a task matches its description.

How do I install Shadcn Layouts in Codex?

Run `npx skills add jwynia/agent-skills --skill shadcn-layouts -a codex`. Or copy the skill folder (skills/tech/frontend/design/shadcn-layouts in jwynia/agent-skills) into .agents/skills/shadcn-layouts in your project. Codex loads it when a task matches its description.

Can I use Shadcn Layouts in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jwynia/agent-skills --skill shadcn-layouts -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/shadcn-layouts, .gemini/skills/shadcn-layouts, .github/skills/shadcn-layouts and .opencode/skills/shadcn-layouts in your project.

What does Shadcn Layouts need to run?

Going by SKILL.md and its folder, Shadcn Layouts needs the command-line tools its instructions call (npx). Our summary lists: Node.js. Compatibility (from SKILL.md): Works with shadcn/ui, Tailwind CSS v3/v4, React, Next.js..

Does Shadcn Layouts access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Shadcn Layouts safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Shadcn Layouts use?

Shadcn Layouts is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Shadcn Layouts use?

About 1.5k tokens (SKILL.md is roughly 5.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 7.2k tokens, read only when the agent opens those files.

What are the alternatives to Shadcn Layouts?

Skills that share tags, products or a category with Shadcn Layouts: UI Styling (Ohh-889/skyroc, 795 stars), Coss (crafter-station/petdex, 4.2k stars), Avoid AI Design (sunkaifei/FlyCms, 656 stars) and Extract Design (Manavarya09/design-extract, 4.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Shadcn Layouts?

jwynia (a GitHub user) maintains it in jwynia/agent-skills, which has 170 GitHub stars. The repository holds 111 skills in this directory. The repository was last updated on February 24, 2026.

Source: jwynia/agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.