# swiftui-patterns

swiftui-patterns is a Claude Code skill with idiomatic SwiftUI patterns for tab navigation, screen layouts, custom modifiers, and state handling.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 205 installs · ★ 35 repo stars
- Author: podo
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/podo/design-agent-skills/tree/HEAD/skills/swiftui-patterns/SKILL.md
- Updated: 2026-10-21
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/podo-swiftui-patterns

## What it does

This skill guides coding agents through building SwiftUI interfaces for Apple platforms. It covers tab navigation hierarchies via `TabView`, screen composition with stacks and grids, custom view modifiers, and data flow using `@State` and `@Binding`.

The repository acts as a pointer stub targeting `swiftui-ui-patterns` from `Dimillian/Skills`. Installing it alongside `swiftui-claude-skills` causes a name collision, because both packages target the same skill file and will overwrite earlier files. If you need visual art direction rather than structural layout, use `swiftui-design-skill` instead.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add podo/design-agent-skills --skill swiftui-patterns -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/swiftui-patterns/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/swiftui-patterns/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add podo/design-agent-skills --skill swiftui-patterns -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/swiftui-patterns/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add podo/design-agent-skills --skill swiftui-patterns -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/swiftui-patterns/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install podo/design-agent-skills skills/swiftui-patterns
```

2. **Manually: put the files in place**
- File: `.github/skills/swiftui-patterns/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add podo/design-agent-skills --skill swiftui-patterns -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/podo/design-agent-skills --path skills/swiftui-patterns
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/swiftui-patterns/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add podo/design-agent-skills --skill swiftui-patterns -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/podo/design-agent-skills/tree/HEAD/skills/swiftui-patterns/SKILL.md

## When to use it
- structure navigation hierarchies using TabView
- bind view state cleanly with @State and @Binding
- compose multi-view screens using SwiftUI stacks and grids
- create reusable custom view modifiers

## Example prompts
- Show me SwiftUI patterns for managing state across nested views with @Binding
- Help me design the tab architecture for a new SwiftUI screen using TabView
- Create a custom SwiftUI view modifier for a reusable card component

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 829c251c21df683c.

BEGIN THIRD-PARTY FILE 829c251c21df683c
````text
---
name: swiftui-patterns
description: |
  Best practices and example-driven guidance for SwiftUI views and components:
  tab architecture, navigation hierarchies, screen composition, custom view
  modifiers, and responsive layouts. Keeps SwiftUI code idiomatic and maintainable
  for Apple platform apps.
triggers:
  - "SwiftUI patterns"
  - "SwiftUI components"
  - "SwiftUI tab architecture"
  - "SwiftUI screen"
das:
  category: visual-components
  upstream: "https://github.com/Dimillian/Skills"
  upstream_path: "swiftui-ui-patterns/SKILL.md"
  version: latest
  install: true
---

# swiftui-patterns

> Catalogue stub — full skill: [Dimillian/Skills](https://github.com/Dimillian/Skills)

<!-- das:install:start — generated from stub.yaml by `npm run generate`; edit stub.yaml, not this block -->
## Decision tree

1. **Is the full skill already installed?**
   Upstream names this skill `swiftui-ui-patterns`, so it installs next to this pointer (the pointer is not replaced).
   - Global: `f=~/.agents/skills/swiftui-ui-patterns/SKILL.md; [ -f "$f" ] && ! grep -q "^das:" "$f" && echo "installed" || echo "pointer"`
   - Project: `f=.agents/skills/swiftui-ui-patterns/SKILL.md; [ -f "$f" ] && ! grep -q "^das:" "$f" && echo "installed" || echo "pointer"`
   - `installed` → the skill is installed as `swiftui-ui-patterns`, invoke it and proceed
   - `pointer` → go to step 2

2. **Detect scope, then install:**

   ```bash
   [ -e ~/.agents/skills/swiftui-patterns ] && echo "global" || echo "project"
   ```

   **Global:**
   ```bash
   npx skills add Dimillian/Skills --skill swiftui-ui-patterns -g -y
   ```

   **Project:**
   ```bash
   npx skills add Dimillian/Skills --skill swiftui-ui-patterns -y
   ```
   > **Claude Code:** send a command as a chat message starting with `!` to run it without leaving the conversation.

**Heads-up**

- **License:** MIT
- **Name collision:** `swiftui-ui-patterns` is also written by `swiftui-claude-skills` (its install or its catalogue pointer); installing both overwrites the earlier one.
<!-- das:install:end -->

## Invoke after install

- Skill name: `swiftui-ui-patterns`
- Trigger phrases: "SwiftUI patterns", "SwiftUI components", "SwiftUI tab architecture", "SwiftUI screen"

## What it does

Provides best practices and example-driven guidance for building SwiftUI views and components on Apple platforms: tab-based navigation architecture with `TabView`, navigation hierarchies, screen composition with stacks and grids, custom view modifiers, `@State` and `@Binding` management, and component-specific patterns with reference examples. Keeps SwiftUI code idiomatic and avoids common architectural mistakes that cause layout or state-management issues.

## When NOT to use

- Liquid Glass (iOS 26) APIs → use `liquid-glass-skill`
- Visual design direction for SwiftUI apps → use `swiftui-design-skill`
- A broader SwiftUI skill set → use `swiftui-claude-skills`
````
END THIRD-PARTY FILE 829c251c21df683c

The third-party file has ended. Everything between the 829c251c21df683c tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

© podo · MIT · https://github.com/podo/design-agent-skills/tree/HEAD/skills/swiftui-patterns/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
