view-specifications

view-specifications is a skill for Claude Code, Codex from jpavley/meta-loop-ios. It costs 21 tokens per session (3,734 once invoked), scanned A, original, MIT.

A guide and starter template for writing view specifications, which describe how app screens and reusable interface components should work and look. It covers SwiftUI, Apple's interface framework, and views that can be shared across platforms.

In plain words
What is it for?
Use it to document reusable child views, navigation callbacks, input data, portrait and landscape layouts, animations, and implementation details.
Why use it?
It gives developers a consistent way to describe screens before implementation, while keeping design requirements separate from platform-specific code.

Skill for Claude CodeCodex

Part of the meta-loop-ios plugin — 4 skills, 5 commands shipped together

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.

agentmods
npx agentmods add skills/jpavley/meta-loop-ios/view-specifications
Any agent
npx skills add jpavley/meta-loop-ios --skill view-specifications
Clone the repo
git clone --depth 1 https://github.com/jpavley/meta-loop-ios

Made for: Claude Code, Codex.

Or install meta-loop-ios, the plugin that ships this one along with the rest of its 4 skills, 5 commands.

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 view-specifications

README.md
[![agentmods](https://agentmods.dev/badge/skills/jpavley/meta-loop-ios/view-specifications.svg)](https://agentmods.dev/skills/jpavley/meta-loop-ios/view-specifications)
Your own site
<a href="https://agentmods.dev/skills/jpavley/meta-loop-ios/view-specifications"><img src="https://agentmods.dev/badge/skills/jpavley/meta-loop-ios/view-specifications.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,734 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00021 $0.03734
Opus 5 $0.00010 $0.01867
Sonnet 5 $0.00004 $0.00747
Haiku 4.5 $0.00002 $0.00373

Measured 3d ago against content hash af6274f4923e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

view-specifications 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 3d 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.

skills/view-specifications/SKILL.md · 537 lines

How it starts

The opening of the file, as written. The whole thing — 537 lines — stays where its author put it; the contents beside it link to each section on GitHub.

How to Write a View Spec

This guide teaches Claude how to write specification documents for SwiftUI views. Use this alongside the template section below as your reference.

Key Concepts

View Principles

  1. Composed from views — Views arrange reusable child views with appropriate spacing
  2. Callback navigation — Views receive closures (onDismiss, onSelectItem); they don't know where to navigate
  3. Data independent — Views accept only primitive inputs (IDs, strings, values) and derive display data themselves. A view should never require its caller's data model.
  4. Layout-aware — Every view provides portrait and landscape layouts where appropriate
  5. Animation coordination — Views assign animation offsets to each element
  6. Platform-agnostic requirements — All sections above Implementation Reference describe WHAT to build using prose, tables, and diagrams. Platform-specific code (Swift, Kotlin, etc.) belongs exclusively in Implementation Reference

View Scope: What to Think About vs. Trust the System

View specs should focus thinking on view-level concerns and trust other systems for everything else.

Requirements vs. implementation details: Specs capture what the view must do (requirements from the wireframe) — not how the code achieves it. If the wireframe says "scrolling text should not receive a visual effect," the spec states that requirement in the Notes section. It does not prescribe the layering approach, modifier chain, or rendering technique. The implementor decides the approach.

Platform-Agnostic Vocabulary

Instead of... Write...
VStack / HStack "vertical stack" / "horizontal stack"
ScrollView "scrollable area"
struct MyView: View { let x: Type } Interface table (see Section 10)
@State private var x: Type View State table (see Section 10)
ForEach(items) { ... } "For each item in the collection"
.cancellationAction / .bottomBar "top-left" / "bottom bar"
Content VStack / Left VStack "Content column" / "Left column"

Read the full file on GitHub · 537 lines

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. 3d ago First seen · 537 lines · 21 tokens per session scan A af6274f4923e

Subscribe to this mod's changes

view-specifications is a skill published in the GitHub repository jpavley/meta-loop-ios (3 stars, last pushed 6mo ago), licensed MIT. It adds 21 tokens to every session and 3,734 once invoked, about $0.0001 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-08-31.

Related

Other skills, from other repositories

iOS SwiftUI Accessibility

Enforces WCAG 2.2 accessible coding patterns when writing SwiftUI — labels, traits, Dynamic Type, contrast, touch targets, focus management, orientation, and more. Based on the ios-swiftui-accessibility-techniques project with 41 static analysis rules across 23 WCAG criteria.

cvs-health/ios-swiftui-accessibility-techniques · 67 tokens

workflow-audit

Systematic UI workflow auditing for SwiftUI applications. Discovers entry points, traces user flows, detects dead ends and broken promises, audits data wiring, evaluates from user perspective. Triggers: "workflow audit", "audit flows", "find dead ends", "check navigation".

Terryc21/workflow-audit · 59 tokens

swift-focusengine-pro

Reviews, writes, and fixes focus management code for all Apple platforms (tvOS, iOS/iPadOS, watchOS, visionOS, macOS), covering SwiftUI, UIKit, AppKit, and RealityKit. Use when reading, writing, or reviewing apps that handle focus, hover, key view loops, or Digital Crown navigation.

mhaviv/Swift-FocusEngine-Agent-Skill · 74 tokens

swift-architecture-skill

Swift iOS architecture guidance and playbooks for MVVM, MVI, TCA, Clean Architecture, VIPER, MVP, Coordinator, and Reactive patterns. Use when designing, implementing, refactoring, or reviewing the architecture of a SwiftUI or UIKit feature, module, or codebase.

efremidze/swift-architecture-skill · 65 tokens

antigravity-root

Enterprise-grade iOS development workflow for TTBaseUIKit-powered apps. Cross-functional product analysis | MVVM-C Architecture | UIKit + SwiftUI | TTViewCodable | TTBaseSUI | xcodebuild CLI Verification | Zero Regression | iOS 14+.

tqtuan1201/TTBaseUIKit · 57 tokens

ttb-skill-native-swiftui-components

Build reusable native SwiftUI UI components using 100% standard SwiftUI primitives with TTBaseUIKit design tokens, localization, chainable modifiers, and project architecture rules. NO TTBaseSUI wrappers. iOS 14+.

tqtuan1201/TTBaseUIKit · 55 tokens