better-layout

Review and structure web interface layouts for grouping, alignment, spacing, and responsive adaptivity.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

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 review criteria so pages and components communicate structure through position and spacing rather than decoration. ## Core Features & Use Cases - Grouping and Alignment Guidance: Apply rules for grouping with negative space instead of separator lines, aligning to shared edges, using CSS logical properties for RTL-safe layouts, and ordering content by importance. - Spacing and Adaptivity Rules: Set clearance between controls, inset buttons from viewport edges, hint at hidden content with peeking items or disclosure controls, and derive breakpoints from content rather than device presets. - Structured Layout Reviews: Produce findings tables with severity, file location, before/after code, and a verdict when auditing frontend code for layout issues. - Use Case: When building a settings page in Tailwind, use this Skill to replace divider lines with spaced groups, convert margin-left to margin-inline-start, and ensure the primary action stays reachable at small viewport sizes. ## Quick Start Review the layout of my dashboard component and suggest fixes for grouping, spacing, and responsive behavior.

Frequently Asked Questions about better-layout

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

FAQPage Schema
How do I improve layout structure in a web interface?

Group related items with negative space instead of separator lines, keeping the gap between groups at least twice the gap within groups. Align elements to shared edges, order content by importance from the leading edge, and keep controls visually distinct from static text.

How to make CSS layouts work with RTL languages?

Use CSS logical properties like margin-inline-start and padding-inline-end instead of physical left/right properties so layouts mirror automatically under dir="rtl". In Tailwind, use utilities like ms-4 and pe-6 rather than ml-4 and pr-6.

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.

Should I use container queries or media queries for responsive components?

Prefer container queries for component-level adaptation so a card adapts to the column it sits in rather than the viewport. Derive breakpoints from where the content actually stops fitting instead of device presets like 768px.

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.