
Layout grid
Gives a SwiftUI agent a spacing scale and checks that catch off-grid layouts
Layout grid is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 2K
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Layout grid
This skill sets up a single spacing scale for a macOS SwiftUI app and gives the agent three ways to catch misalignment. A lint script flags raw padding and spacing numbers that fall off the scale, a probe system records real view frames during snapshot runs, and a checker script reads those frame files and reports failures such as mismatched leading edges, uneven gaps and overlapping views. A third step draws the grid over captured windows so the agent can inspect the result.
The workflow asks the agent to run the lint after builds that touch views, mark its own custom pages and cards with area and probe modifiers, and then run the layout checker on the snapshot output. The skill also gives a table that maps common failure messages to likely causes and fixes, and it defines when a layout is considered done.
The skill expects a macOS SwiftUI project with a Grid.swift file and tools folder, which can be copied from the new-mac-app template. It relies on shell scripts and Swift, and it assumes the app can produce snapshot PNGs and layout JSON files.
When your agent uses it
Grid and alignment rules for a macOS SwiftUI app, with three checks that catch misalignment (a lint for off-grid numbers, a layout probe that measures real frames in snapshot mode, and a grid overlay). Use when building or reviewing a custom page, card, row, form, or sheet, after every build that touched layout, or when the user says something looks misaligned, crooked, cramped, or unevenly spaced.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 2 files (7 KB) on GitHub on 1 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the bama plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add daveebbelaar/bama
/plugin install bama@bamaOr copy only this skill to ~/.claude/skills/layout-grid:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/daveebbelaar/bama.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/layout-grid &&
cp -R "$tmp/skills/design/layout-grid" ~/.claude/skills/layout-grid &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/layout-grid inside it instead.
Copy the skill folder to ~/.agents/skills/layout-grid to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/daveebbelaar/bama.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/layout-grid &&
cp -R "$tmp/skills/design/layout-grid" ~/.agents/skills/layout-grid &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/layout-grid inside it instead.
Copy the skill folder to ~/.cursor/skills/layout-grid to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/daveebbelaar/bama.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/layout-grid &&
cp -R "$tmp/skills/design/layout-grid" ~/.cursor/skills/layout-grid &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/layout-grid inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/daveebbelaar/bama.git --path skills/design/layout-gridOr copy the folder to ~/.gemini/skills/layout-grid yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/layout-grid:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/daveebbelaar/bama.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/layout-grid &&
cp -R "$tmp/skills/design/layout-grid" ~/.copilot/skills/layout-grid &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/layout-grid inside it instead.
Get the folder:
git clone --depth 1 https://github.com/daveebbelaar/bama.gitThen copy bama/skills/design/layout-grid into your agent's skills folder as layout-grid. Agents that support SKILL.md read one folder per skill.
What it does
- Spacing scale rules
- Defines a fixed set of padding and spacing tokens and when to use each one.
- Off-grid lint script
- A shell script that reports raw numbers in view code that fall outside the scale.
- Layout probe markers
- Swift modifiers that tag views and containers so their real frames can be measured.
- Snapshot layout checker
- A Swift script that validates probe frames for edge alignment, spacing and overlap.
- Grid overlay rendering
- Draws an 8 point grid, area insets and probe names over captured window images.
- Failure fix guide
- Maps common layout failure messages to their usual causes and fixes.
Good for
- Review a SwiftUI settings form for uneven spacing
- Check a new card layout for off-grid padding values
- Find why a sidebar and content column have different left edges
- Fix a crooked row in a macOS sheet
- Run the layout lint after changing views
Layout grid FAQ
What does the skill need to run?
A macOS SwiftUI app with a Grid.swift file and a tools folder. For older apps, the skill says to copy the grid, lint and check files from the new-mac-app skill's template.
Does Layout grid change my code automatically?
No. It tells the agent to fix lint lines with Space tokens and to add probe modifiers, and the agent makes those edits itself.
When does Layout grid trigger?
When building or reviewing a custom page, card, row, form or sheet, after builds that touched layout, or when the user says something looks misaligned, crooked, cramped or unevenly spaced.
Are scripts included?
The skill's facts list no scripts in its folder, but its instructions reference a lint script, a layout checker and a snapshot tool that come from the template.
How do I install Layout grid in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/layout-grid to use it in all your projects, or to .claude/skills/layout-grid in one project. Or install the bama plugin, which includes it: /plugin marketplace add daveebbelaar/bama, then /plugin install bama@bama.
Does Layout grid run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Layout grid?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Layout grid?
The closest alternatives to Layout grid are Build and verify, Mac design, Build swiftui interface, New mac app and UI review.
Where this comes from
- Description: from the skill's own SKILL.md.
More from daveebbelaar/bama

Gives a macOS app a CLI and optional MCP server so agents can drive it
- Open source
- 2K GitHub stars
- Developer tools

Runs a架构 check-in on a growing Swift app and refactors it in proven steps
- Open source
- 2K GitHub stars
- Developer tools

Guides a native macOS app through system entry points and their required permissions
- Open source
- 2K GitHub stars
- Developer tools

Measure and speed up a macOS app's hangs, stutter, memory and energy use
- Open source
- 2K GitHub stars
- Developer tools

Swift 6 and SwiftUI rules for macOS apps: concurrency, state, SwiftData and fixes
- Open source
- 2K GitHub stars
- Developer tools

Guides an agent to build a Liquid Glass macOS app icon as an Icon Composer file
- Open source
- 2K GitHub stars
- Design and media


