spacing-layout

spacing-layout is a skill for Claude Code, Codex from Abdullah4AI/apple-developer-toolkit. It costs 69 tokens per session (828 once invoked), scanned A, original, MIT.

A SwiftUI guide to spacing, margins, visual density, and minimum touch-target sizes using a consistent measurement system.

In plain words
What is it for?
Use it when setting padding, gaps, section spacing, screen margins, or the clickable area of buttons and other controls.
Why use it?
It helps keep screens orderly and makes controls large enough to use comfortably on touch devices.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when setting padding, gaps, section spacing, screen margins, or the clickable area of buttons and other controls.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/abdullah4ai/apple-developer-toolkit/spacing-layout
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Abdullah4AI/apple-developer-toolkit --skill spacing-layout
Clone the repo
git clone --depth 1 https://github.com/Abdullah4AI/apple-developer-toolkit

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for spacing-layout

README.md
[![agentmods](https://agentmods.dev/badge/skills/abdullah4ai/apple-developer-toolkit/spacing-layout/github.svg)](https://agentmods.dev/skills/abdullah4ai/apple-developer-toolkit/spacing-layout)
Your own site
<a href="https://agentmods.dev/skills/abdullah4ai/apple-developer-toolkit/spacing-layout"><img src="https://agentmods.dev/badge/skills/abdullah4ai/apple-developer-toolkit/spacing-layout/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for spacing-layout

Your own site · 80×15
<a href="https://agentmods.dev/skills/abdullah4ai/apple-developer-toolkit/spacing-layout"><img src="https://agentmods.dev/badge/skills/abdullah4ai/apple-developer-toolkit/spacing-layout.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 828 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00069 $0.00828
Opus 5 $0.00034 $0.00414
Sonnet 5 $0.00014 $0.00166
Haiku 4.5 $0.00007 $0.00083

Measured 5d ago against content hash c2bfe7bf1a69, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

spacing-layout scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

swiftship/internal/skills/data/ui/spacing-layout/SKILL.md · 69 lines

What it actually says

Spacing & Layout

8-POINT GRID SYSTEM: All spacing values must be multiples of 4pt. Standard scale:

Token Value Use Case
Spacing.xxSmall 4pt Icon-to-label gap, tight inline spacing
Spacing.xSmall 8pt Between related items (label + value)
Spacing.small 12pt List row internal padding
Spacing.medium 16pt Standard padding, outer margins
Spacing.large 24pt Section spacing, card-to-card gap
Spacing.xLarge 32pt Major section breaks
Spacing.xxLarge 48pt Screen-level top/bottom breathing room

NEVER use arbitrary values (5, 7, 10, 13, 15, 18, 25, etc.). Snap to the grid.

STANDARD MARGINS:

  • Outer screen margins: 16pt (.padding(.horizontal, AppTheme.Spacing.medium)).
  • Card internal padding: 16pt (.padding(AppTheme.Spacing.medium)).
  • Section spacing (between groups): 24pt.
  • List row vertical padding: 12pt.
  • Toolbar/header spacing: 16pt horizontal, 8pt vertical.

TAP TARGET SIZES:

  • Minimum: 44x44pt for ALL interactive elements (Apple HIG requirement).
  • If visual element is smaller (e.g. 24x24 icon), expand hit area: .frame(minWidth: 44, minHeight: 44) .contentShape(Rectangle())
  • Inline buttons in text: ensure surrounding padding creates 44pt height.
  • Icon buttons: use .frame(width: 44, height: 44) even if icon is 20-24pt.

VERTICAL RHYTHM:

  • Consistent spacing within a section (all rows use same gap).
  • Larger gap between sections than within sections.
  • Example: 8pt between rows within a section, 24pt between sections.
  • Headers get extra top spacing: 32pt above, 8pt below.

DENSITY GUIDELINES (from plan's design.density):

  • "spacious": Use .large/.xLarge gaps. Generous padding (20-24pt). Best for meditation, health, reading apps.
  • "standard": Use .medium gaps. 16pt padding. Default for most apps.
  • "compact": Use .small/.xSmall gaps. 12pt padding. Best for data-heavy apps (finance, productivity).

CARD LAYOUT PATTERN:

VStack(alignment: .leading, spacing: AppTheme.Spacing.xSmall) {
    // Card content
}
.padding(AppTheme.Spacing.medium)
.background(AppTheme.Colors.surface)
.clipShape(RoundedRectangle(cornerRadius: AppTheme.Style.cornerRadius))
.shadow(color: .black.opacity(0.06), radius: 8, y: 4)

HORIZONTAL LAYOUTS:

  • Space between icon and label: 8pt.
  • Space between label and trailing value: use Spacer().
  • Button bar with 2-3 buttons: HStack with spacing: 12pt.
  • 4+ buttons: wrap in ScrollView(.horizontal).

SAFE AREA:

  • Content respects safe areas by default — don't add redundant padding.
  • Full-screen backgrounds use .ignoresSafeArea() to extend edge-to-edge.
  • Overlays use .safeAreaInset(edge:) — never manual padding for safe areas.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 69 lines · 69 tokens per session scan A c2bfe7bf1a69

Subscribe to this mod's changes

spacing-layout is a skill published in the GitHub repository Abdullah4AI/apple-developer-toolkit (10 stars, last pushed yesterday), licensed MIT. It adds 69 tokens to every session and 828 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

display-glasses-with-jetpack-compose-glimmer

Provides guidelines for developing projected Android XR apps for display glasses using the Jetpack Compose Glimmer UI toolkit. This skill covers foundational Glimmer design principles, workflows for implementing Jetpack Compose Glimmer, and interaction models for the glasses form factor. Use this skill to build an…

android/skills · 91 tokens

expo-design-system

Framework (OSS). Build and maintain a design system inside an Expo app - a reusable theme of design tokens (color, spacing, typography, radius, shadow, motion), reusable component structure with variant/size/state prop conventions, and rules for when to extract a repeated view into a shared component. Use when…

expo/skills · 181 tokens

flutter-build-responsive-layout

Use LayoutBuilder, MediaQuery, or Expanded/Flexible to create a layout that adapts to different screen sizes. Use when you need the UI to look good on both mobile and tablet/desktop form factors.

flutter/agent-plugins · 51 tokens

omh-apple-design

This is a Hermes-native apple-design workflow skill.

rlaope/oh-my-hermes · 73 tokens

axiom-audit-liquid-glass

Use when the user mentions Liquid Glass review, iOS 26 UI updates, toolbar improvements, or visual effect migration.

CharlesWiltgen/Axiom · 32 tokens

axiom-audit-ux-flow

Use when the user mentions UX flow issues, dead-end views, dismiss traps, missing empty states, broken user journeys, or wants a UX audit of their iOS app.

CharlesWiltgen/Axiom · 43 tokens