Delegate independent tasks to specialized agents working concurrently with isolated context.
Fix Spacing Issues
fix-spacing
This skill should be used when elements feel disconnected, cards float like islands, or groupings are unclear. Applies Law of Proximity, Law of Common Region, and Law of Uniform Connectedness.
SKILL.md
Full skill instructions
Fix Spacing Issues
Purpose
This skill diagnoses and fixes spacing issues that make interfaces feel disconnected or unclear. It applies three fundamental perceptual laws to create proper visual grouping and hierarchy through strategic use of whitespace, boundaries, and visual connections.
Applies these laws from lawsofux.com:
- Law of Proximity: Objects near each other appear grouped
- Law of Common Region: Elements sharing a boundary appear related
- Law of Uniform Connectedness: Visually connected elements seem more related
When to Use
- "Cards feel like islands"
- "Everything is the same distance apart"
- "Elements feel disconnected"
- "Groupings are unclear"
- "No visual rhythm"
The Laws
Law of Proximity
Objects that are near each other tend to be grouped together.
Application:
Space WITHIN groups < Space BETWEEN groups
Card padding < Gap between cards < Section gap
Violation test:
Proximity Ratio = internal spacing / external spacing
PASS: ratio < 1.0
FAIL: ratio ≥ 1.0
Law of Common Region
Elements tend to be perceived as groups if they share a clearly defined boundary.
Application:
- Add backgrounds, borders, or containers to create regions
- Don't rely on proximity alone for complex groupings
- Nested regions show hierarchy
Law of Uniform Connectedness
Elements that are visually connected are perceived as more related than elements with no connection.
Application:
- Lines, arrows, or shared colors connect related items
- Timelines, flowcharts, breadcrumbs use this
- Stronger than proximity for showing relationships
Diagnosis
For each group of elements, check:
1. PROXIMITY: Is internal < external spacing?
2. REGION: Do related items share a boundary?
3. CONNECTION: Are sequential items visually linked?
Output Format
SPACING DIAGNOSIS
Law of Proximity:
WHERE: [component]
Ratio: [internal]px / [external]px = [X]
Violation: [Yes/No]
FIX: [change]
Law of Common Region:
WHERE: [component]
Issue: [missing boundary / competing regions]
FIX: [add container / adjust]
Law of Uniform Connectedness:
WHERE: [component]
Issue: [disconnected sequence]
FIX: [add connector]
Quick Reference
| Spacing | Tailwind | Use for |
|---|---|---|
| 4px | gap-1, p-1 | Tight inline elements |
| 8px | gap-2, p-2 | Related items in a group |
| 16px | gap-4, p-4 | Items within a card |
| 24px | gap-6, p-6 | Cards in a grid |
| 32px | gap-8 | Between sections |
| 48-64px | py-12/16 | Major section breaks |
Rule: Each level should be ~1.5-2x the previous.
More Other skills
brand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.
internal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).
Fundamental design principles for writing maintainable, testable Python code.
responsive-design
Modern responsive layouts using container queries, fluid typography, CSS Grid, and mobile-first strategies.
Generate Playwright tests from scenarios using interactive browser exploration and validation.
Automated website exploration and test case generation using Playwright.
Modern React state management with Redux Toolkit, Zustand, Jotai, and React Query for every state category.
gdpr-data-handling
GDPR-compliant data handling with consent management, data subject rights, and privacy controls.
Python error handling patterns including input validation, exception hierarchies, and partial failure handling. Use when implementing validation logic, designing exception strategies, handling batch processing failures, or building robust APIs.
refactor-plan
Detailed multi-file refactor planning with safety checks and rollback guidance.
