Prefer Container Queries

Enforce Tailwind container queries over viewport breakpoints for responsive components. Use when writing or reviewing responsive Tailwind code, when a component needs to adapt to its available space (cards, sidebars, lists, panels, anything reused in different layouts), or when migrating sm:/md:/lg: classes to @container variants.

flornkmGitHub stars: 115Source on GitHubExternal
Works withUniversal
Install

Install the Prefer Container Queries skill with npx skills add flornkm/skills --skill prefer-container-queries -a claude-code, confirm the prompts, then wait for it to finish before continuing.

Paste this into Claude Code.

Hosted in an external repository

This skill's instructions live in its source repository. Read them on GitHub, or copy a prompt that sends your agent to the file.

View on GitHub

Add to your agent

Print this skill from the terminal, or connect the whole catalog over MCP. Setup guides

CLI

npx uiskillbook get prefer-container-queries

MCP server

https://www.uiskillbook.com/mcp

Questions