# Layout Spacing Checker

> [Design System] Validate margin/padding/gap values against spacing scale and grid rules. Use when (1) checking if spacing values follow the design system scale, (2) finding off-scale or inconsistent spacing, (3) auditing layout consistency across components, (4) user asks to 'check spacing', 'validate layout', 'audit margins/padding', or 'find off-scale values'.

- Skill: `majiayu000/layout-spacing-checker` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add majiayu000/layout-spacing-checker`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/layout-spacing-checker/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Design & Media
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/layout-spacing-checker

---


# Layout & Spacing Scale Checker

Validate spacing values against a defined scale and find inconsistencies.

## Quick Start

```bash
python3 scripts/check_spacing.py --scale spacing.yml --source src/
```

## Issue Types

| Type | Severity | Description |
|------|----------|-------------|
| `off-scale` | warning | Value not in spacing scale |
| `inconsistent` | info | Different spacing for similar components |
| `zero-spacing` | info | Potentially missing spacing |
| `excessive` | warning | Unusually large spacing value |

## Detection Examples

### CSS/SCSS
```css
/* off-scale: 17px not in scale */
.card { padding: 17px; }
/* Suggested: 16px (md) or 20px */
```

### SwiftUI
```swift
// off-scale: 15 not in scale
.padding(15)
// Suggested: .padding(16) or spacing token .md
```
