better-layout

Reviews and structures web interface layouts for grouping, alignment, spacing, and adaptive breakpoints.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Web interfaces often suffer from unclear visual hierarchy, inconsistent spacing, misaligned edges, and layouts that break under resizing, translation, or RTL mirroring. This Skill provides concrete layout principles and a structured review format so pages and components communicate structure through position and spacing rather than decoration. ## Core Features & Use Cases - Grouping and alignment guidance: Apply rules for negative space, shared alignment edges, logical CSS properties, and importance-based reading order. - Spacing and adaptivity rules: Set control clearances, layout margins, safe-area handling, progressive disclosure cues, container queries, and content-driven breakpoints. - Structured review output: Produce findings tables with severity levels, before/after fixes, verification steps, and a Block/Needs changes/Approve verdict. - Use Case: When reviewing a settings page where every row has a separator line and buttons touch the viewport edge, apply the grouping and inset rules to replace lines with spacing and inset actions within layout margins. ## Quick Start Review the layout of my checkout page component and report findings with severity, before/after fixes, and a verdict.

Frequently Asked Questions about better-layout

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

FAQPage Schema
How do I structure a web page layout with good visual hierarchy?

Group related items with negative space instead of separator lines, keeping inter-group gaps at least twice the intra-group gap. Place the most important content near the top and leading edge, and align everything to a small set of shared edges.

How to make CSS layouts work with RTL languages?

Use logical properties like margin-inline-start, padding-inline-end, and text-align: start instead of physical left/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.

How much spacing should there be between buttons and controls?

Without an established density system, start with 12px between adjacent bordered or filled controls and 24px of clearance around borderless text or icon buttons. Compact tools may use less when hit areas remain distinct and do not overlap.

Why does my layout break when translated into other languages?

Fixed widths and heights sized to English labels overflow when strings grow in other languages. Use max-width with wrapping, min-height instead of fixed heights, and let buttons size from their label padding, then test with pseudo-localization.