better-layout
O que ela faz
Ele orienta a IA na organização de seções, controles e espaçamentos de uma página, para que a estrutura seja fácil de ler em qualquer tela. É para designers e desenvolvedores que criam layouts web.
Quando usar
- ✓Quando você estrutura uma nova página ou componente e precisa que o layout fique claro.
- ✓Quando o espaçamento ou o alinhamento dos controles parece bagunçado.
- ✓Quando precisa decidir o que recolhe ou se esconde em telas pequenas.
Link da skill
https://github.com/trycompai/crm/blob/release/.agents/skills/better-layout/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Esta página de configurações parece apertada e desalinhada no celular. Você pode corrigir o layout?”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
A IA agrupa os itens relacionados, alinha-os às bordas compartilhadas, usa o sistema de espaçamento do projeto e testa o layout em várias larguras.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do GitHub.
Layout that communicates structure
Layout communicates before a single word is read: position, spacing, and alignment carry hierarchy on their own, and generous space beats decoration. A good layout also survives stress: resize it, translate it, mirror it for RTL, and it should still hold together. Apply these principles when building or reviewing UI code, and express every change in the project's existing styling system (Tailwind, plain CSS, CSS-in-JS); never introduce a second styling approach.
Hit-area sizes and focus behavior are covered by the better-accessibility skill; visual polish (radius, shadows, animation) by the better-ui skill; line length and text spacing by the better-typography skill.
Treat the numeric values below as starting points for interfaces without an established density or spacing system. Preserve deliberate platform chrome, compact professional tools, and project tokens when they remain usable under hit-area, zoom, localization, and viewport stress tests.
Quick Reference
| Category | When to Use |
|---|---|
| Grouping & Alignment | Space vs separators, alignment edges, logical properties, importance ordering |
| Spacing & Adaptivity | Spacing between targets, layout margins, progressive disclosure, full-bleed content, breakpoints, i18n growth |
Core Principles
1. Group with Space, Not Lines
Negative space is the primary grouping tool; background shapes second; separator lines last, only where space alone can't carry the structure. The gap between groups must be at least 2× the gap within a group (8px intra-group → 16px+ inter-group), or the grouping reads as noise.
2. Keep Controls Distinct from Content
Interactive elements must look interactive: a background shape, a border, or a consistent placement zone. Never style a control identically to adjacent static text.
3. Align to Shared Edges
Pick alignment edges and stick to them; every stray edge reads as noise. Use one project spacing step for each level of subordination (16px is a useful default). Use logical properties (padding-inline-start, margin-inline-end) for direction-dependent layout; reserve physical left/right for genuinely physical geometry.
4. Order by Importance
The most important content sits near the top and the leading edge; reading order flows top-to-bottom, leading-to-trailing. Think in leading/trailing, not left/right.
5. Hint at Hidden Content
Progressive disclosure needs a visible affordance. Use the project's established cue; without one, let the next item peek 16–32px past the scroll edge or show a disclosure control. Content hidden with zero cue may as well not exist.
6. Breathing Room Between Targets
Without an established density system, start with 12px between adjacent bordered or filled controls and 24px of clearance around borderless text- and icon-only controls. Compact layouts may use less when better-accessibility hit areas do not overlap and the controls remain visually distinct.
7. Inset Buttons from the Edges
In content layouts, keep full-width buttons inside the layout margins (start near 16px inline on mobile) with a visible radius. Edge-to-edge actions are acceptable when they intentionally follow established platform or application chrome, account for safe areas, and remain distinguishable from system UI.
8. Content Bleeds, Controls Float
Backgrounds and media extend to the viewport edges; controls and text stay inside the layout margins and safe areas (env(safe-area-inset-*)). Sticky chrome floats above the content layer, it doesn't dam it.
9. Hold Structure Until It Breaks
Breakpoints come from the content, not device presets. Keep the expanded layout as long as it genuinely fits and collapse late; prefer container queries for component-level adaptation. Test the smallest and largest sizes first.
10. Plan for Growth and Clipping
Plan for substantial and language-dependent string growth rather than relying on a universal percentage: no fixed widths or heights on text containers, and let rows wrap. Never park critical actions where resizing or scrolling clips them; keep them reachable in the normal flow or stable chrome appropriate to the product.
Common Mistakes
| Mistake | Fix |
|---|---|
| Separator line where spacing would do | Remove the line, double the gap between groups |
margin-left / padding-right in a localizable l |
Perguntas frequentes
Ele substitui o sistema de estilo do projeto?
Não. A skill diz para expressar as mudanças no sistema existente do projeto, como Tailwind ou CSS puro.
Ele trata idiomas da direita para a esquerda?
Sim. Cobre a direção de layout RTL e as propriedades lógicas do CSS.
Ele cobre animação?
Não. Polimento visual e movimento ficam com a skill better-ui.
Detalhes
Descrição original do autor
Layout structure for web interfaces, from grouping and alignment to reading order, progressive disclosure, and adaptive breakpoints. Use when structuring a page or component, spacing or aligning controls, deciding what collapses at small sizes, handling RTL layout direction, or reviewing frontend code for layout. Triggers on layout, spacing, alignment, grouping, negative space, whitespace, visual hierarchy, reading order, progressive disclosure, breakpoints, responsive layout, container queries, safe area, full-bleed, edge-to-edge, layout margins, RTL layout, logical properties.
repo: trycompai/crm
Popularidade
- Estrelas no GitHub
- 12 mil
- Posição no ranking
- #11512
- Licença
- MIT
- Atualizada em
- 01/11/2026
Comentários
- …
Mais skills deste repositório
ai-elements
12 milAjuda seu agente a criar interfaces de chat com IA usando componentes prontos para conversas, mensagens, exibição de ferramentas e campos de prompt.
ai-sdk
12 milAjuda seu agente a criar recursos de IA com o Vercel AI SDK, incluindo geração de texto, streaming, chamada de ferramentas e agentes.
better-accessibility
12 milAjuda seu agente a tornar interfaces utilizáveis com teclado e leitores de tela, cobrindo foco, rótulos, ARIA e formulários.
better-auth-best-practices
12 milAjuda seu agente a configurar o Better Auth para login, sessões, OAuth e plugins em um app TypeScript, seguindo os passos documentados.
Skills parecidas
canvas
394 milPermite que seu agente mostre um widget visual hospedado em um painel conectado a um Mac e depois oculte o painel ou o mova para outra página.
control-ui
394 milAjuda seu agente a organizar e diagnosticar a Control UI do OpenClaw, incluindo sessões, painéis e Gateways conectados.
diagram-maker
394 milAjuda seu agente a criar diagramas claros em SVG, HTML ou Excalidraw editável, para processos, arquitetura de sistemas e esboços de quadro branco.