better-layout

Reviews and fixes UI layout structure, grouping, alignment, and adaptive behavior in CSS and HTML.

Updated Aug 22, 2026
One-click install
npx skills add https://github.com/falentio/cimi --skill better-layout-falentio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: better-layout
Source: https://github.com/falentio/cimi/tree/main/.agents/skills/better-layout
Command: npx skills add https://github.com/falentio/cimi --skill better-layout-falentio

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Interfaces often fail because of weak layout structure: controls that look like static text, misaligned edges, breakpoints copied from device presets, and buttons clipped at viewport edges. This Skill audits and fixes layout code against concrete principles for grouping, alignment, spacing, progressive disclosure, and adaptability, including RTL mirroring and localization growth. ## Core Features & Use Cases - Layout audits with severity ratings: Classifies findings as HIGH, MEDIUM, or LOW, grouped by violated principle, with file and line locations and a Block/Approve verdict. - Concrete CSS and HTML recipes: Provides reference patterns for spacing scales, logical properties, container queries, safe-area insets, peeking scrollers, and full-bleed content grids. - Stress-testing guidance: Covers RTL mirroring, pseudo-localization for string growth, 200% zoom, and smallest/largest viewport checks. - Use Case: A developer finishing a settings page asks for a layout review; the Skill flags physical margin-left properties that break in RTL, a primary action clipped at a modal's bottom edge, and uniform spacing that hides grouping, then supplies corrected CSS. ## Quick Start Review the layout of my settings page component and report any grouping, alignment, or adaptivity issues with fixes.

Frequently Asked Questions about better-layout

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix layout grouping and alignment issues in CSS?

Group related items with negative space first, keeping the gap between groups at least twice the gap within one. Align elements to a small set of shared edges using one spacing step per hierarchy level, reserving separator lines for dense data like tables.

How to make CSS layouts work with RTL languages?

Use logical properties such as margin-inline-start, padding-inline-end, and text-align: start instead of physical left and right properties. Flexbox and grid with logical properties mirror automatically under dir="rtl", while hand-positioned elements do not.

When should I use container queries instead of media queries?

Use container queries for component-level adaptation so a card or widget responds to the column it sits in rather than the viewport. Viewport media queries break components placed inside narrow sidebars or split panes.

Why do buttons break when my app is translated?

Translated strings grow, and short source strings grow proportionally more, so fixed-width buttons overflow or truncate. Size buttons from their label with padding-inline, avoid fixed widths and heights on text containers, and test with pseudo-localization.

What spacing should I use between buttons and controls?

Without an established density system, start with 12px between adjacent bordered or filled controls and 24px around borderless text or icon buttons. Compact tools may use less as long as hit areas never overlap and controls stay visually distinct.