Skip to content
SkillModel-led1,677 tokens in use

Better Layout

Sets grouping, alignment, reading order and responsive structure, then stress-tests the layout by resizing it, translating it and mirroring it for RTL.

12,497 stars on the repository MIT Licensejakubkrehel/skills · skills/better-layout
npx skills add jakubkrehel/skills
View source

Install command as written in the repository's README

Skill label

measured from its files

What installing Better Layout costs

33tokens idle
1,677tokens in use
4,386tokens, up to

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Up to adds the files its instructions link. Counts are approximate, made offline with cl100k_base.

Model dependence Model-led

Script-ledMixedModel-led

Mostly instructions, so how well it works depends on the model that follows them.

This describes the skill's structure, how much of it is scripts. It does not say how well it works.

Touches

Nothing detected: no shell, network, file writes, git or credentials in its files.

Declared tags come from the skill's frontmatter; detected ones from its scripts, its code blocks and the commands it names in inline code. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Fair
  • Frontmatter8/15
  • Structure8/25
  • Examples0/15
  • Output10/15
  • Size15/15
  • Resources11/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Excellent

No findings.

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Good
  • Development activity96
  • Maintenance52
  • Community48
  • Maturity24
  • Momentum40

Better Layout is an agent skill for page and component structure. It groups content with space first, aligns it to shared edges, orders it by importance and keeps the DOM order matching the visual order, then checks that the result survives a resize, a long translation and a right-to-left mirror.

Every fix is written in the project’s own styling system and spacing scale. A finding needs a failure that can be shown, such as a clip, an overlap, a broken mirror or a misread group.

What You Get

  • Grouping and alignment fixes that use space before lines, with shared alignment edges and one spacing step per nesting level
  • Logical-property rewrites such as margin-inline-start and inset-inline-start, so a layout mirrors correctly for RTL
  • Responsive guidance using container queries, minmax(0, 1fr) tracks, 100dvh and scroll-padding for sticky headers
  • Room for growth, with max-width and min-height containers that survive long translated strings
  • A detection table of CSS patterns such as width 100vw or float left, each with its fix

Common Use Cases

  • Checking a card grid whose long text overflows its track at narrow widths
  • Converting a stylesheet from left and right properties to logical ones before adding an RTL locale
  • Fixing anchored links and focused fields that land beneath a sticky header
  • Reviewing a toolbar of borderless controls for clearance and hidden overflow cues

What Makes It Unique

The numbers it gives are starting points that apply only where the project has no spacing scale, so existing tokens always win. It tests structure under three stresses, resizing, translation and mirroring, and it names a one-word button label as the riskiest element for growth because short strings grow proportionally more.

Under The Hood

The skill is a SKILL.md with three reference files for grouping and alignment, spacing and adaptivity, and reporting. It has no scripts. The agent reads your markup and styles, compares logical against physical properties, container and media queries against your supported viewports, and DOM order against visual order. With a browser it checks each supported width, 320px, 200 percent zoom and the RTL mirror. A review leaves files untouched, and edits happen when you ask for fixes.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers