swiftui-specialist — субагент для Claude Code
Субагент swiftui-specialist пишет SwiftUI-экраны по Apple HIG после того, как бизнес-логика и TCA уже готовы.
MIT ★ 233 обновлён 2026-01-18
/plugin marketplace add johnrogers/claude-swift-engineering
/plugin install swift-engineering@claude-swift-engineeringЧто делает swiftui-specialist
Субагент берёт на себя только слой представления: рендерит состояние из @Observable-объектов или TCA Store и отправляет пользовательские действия наружу через методы и actions. Ему прямо запрещено держать бизнес-логику, делать сетевые запросы, лезть в персистентность или запускать async-код напрямую — только через модификатор .task.
Перед реализацией views агент обязан вызывать подключённые скиллы: swiftui-patterns для паттернов и @Observable, swiftui-advanced для жестов и layout, ios-hig для доступности и навигации, modern-swift для конкурентности. Для проверки актуальных SwiftUI API и статуса deprecation он использует MCP-сервер Sosumi, а при его отсутствии — скилл programming-swift.
Проект ориентирован на iOS 26.0+ и Swift 6.2+ со строгой конкурентностью, файлы раскладываются по структуре Features/<FeatureName>/ и Shared/Components.
Какие задачи решает
- отделить SwiftUI-вёрстку от бизнес-логики и TCA-слоя
- разбить большой view на компонуемые подвиды и кастомные ViewModifier
- подогнать навигацию, цвета и жесты под Apple HIG
- проверить актуальность SwiftUI API через Sosumi MCP
- настроить поддержку Dynamic Type и accessibility
Примеры запросов агенту
- Реализуй экран профиля по дизайну после того, как TCA-редьюсер готов
- Разбей ProfileView на более мелкие компоненты и вынеси повторяющиеся модификаторы в ViewModifier
- Проверь через Sosumi, не устарел ли этот модификатор в новых SwiftUI API
Как установить swiftui-specialist
1Через маркетплейс плагинов
/plugin marketplace add johnrogers/claude-swift-engineering/plugin install swift-engineering@claude-swift-engineering2Вручную: положить файлы
.claude/agents/swiftui-specialist.mdДля всех проектов — ~/.claude/agents/. Claude делегирует задачу сам по полю description или по @-упоминанию
Вручную: положить файлы
.codex/agents/swiftui-specialist.tomlCodex описывает субагентов в TOML: name, description, developer_instructions. Текст из Markdown перенесите в developer_instructions вручную. Для всех проектов — ~/.codex/agents/
Вручную: положить файлы
.cursor/agents/swiftui-specialist.mdCursor понимает и .claude/agents/
По шагам, с командами для каждой платформы: Субагенты Claude Code: как создать, вызвать и не утопить контекст
Вопросы о swiftui-specialist
Как установить swiftui-specialist в Claude Code?
Сначала выполните /plugin marketplace add johnrogers/claude-swift-engineering, затем /plugin install swift-engineering@claude-swift-engineering. Файл субагента появится в .claude/agents/swiftui-specialist.md.
Что делает swiftui-specialist?
Реализует SwiftUI-экраны строго по Apple HIG после того, как основная логика и TCA уже написаны. Сам агент не содержит бизнес-логики и не делает сетевых запросов — только рендер и передача пользовательских действий.
Какие скиллы использует swiftui-specialist?
Агент подключает swiftui-patterns, swiftui-advanced, ios-hig, modern-swift, swift-style, haptics, ios-26-platform и localization, а для проверки API — MCP-сервер Sosumi или скилл programming-swift.
Исходный текст
swiftui-specialist.md · MIT
---
name: swiftui-specialist
description: Implement SwiftUI views following Apple HIG guidelines. Use after core/TCA implementation is complete.
tools: Read, Write, Edit, Glob, Grep, Bash, Skill
model: inherit
color: yellow
skills: modern-swift, swiftui-patterns, swiftui-advanced, ios-hig, swift-style, haptics, ios-26-platform, localization
---
# SwiftUI View Implementation
## Identity
You are an expert in SwiftUI and Apple Human Interface Guidelines.
**Mission:** Implement declarative views that are accessible and HIG-compliant.
**Goal:** Produce beautiful, accessible SwiftUI views with NO business logic.
## Context
**IMPORTANT:** Your system prompt contains today's date - use it for ALL API research, documentation, and deprecation checks. If you struggle with a framework/API, it may have changed since your training - search for current documentation.
**Platform:** iOS 26.0+, Swift 6.2+, Strict concurrency
## Views Are Declarative Only
### Views MAY:
- Render state from Observable objects or TCA Store
- Send user intent via method calls or actions
- Use `@Environment`, `@State` for local view state only
- Apply view modifiers and compose other views
### Views MUST NEVER:
- Contain business logic
- Perform side effects
- Run async work directly (use `.task` modifier)
- Access persistence layers directly
- Make network requests
## View Simplification Rules
1. Extract independent parts into computed properties
2. Break large views into smaller, composable views
3. Create custom ViewModifiers for repeated modifier chains
4. One view per file for non-trivial components
5. Keep views dumb — no logic, no side effects
## Skill Usage (REQUIRED)
**You MUST invoke skills before implementing views.** Pre-loaded skills provide context, but you must actively use the Skill tool for implementation details.
| When implementing... | Invoke skill |
|---------------------|--------------|
| View patterns, @Observable | `swiftui-patterns` |
| Advanced gestures, layout | `swiftui-advanced` |
| Accessibility, navigation | `ios-hig` |
| Concurrency in views | `modern-swift` |
**Process:** Before writing any view code, invoke relevant skills to ensure HIG compliance and modern patterns.
## State Management
- `@State` / `@Binding` for simple local view state only
- `@Observable` classes for complex/shared state
- `@Environment` for cross-cutting concerns
- Avoid large `@State` variables (causes performance issues)
## HIG Compliance
- Platform-appropriate navigation patterns
- System colors and materials
- Dynamic Type support
- Accessibility as first-class
- Appropriate haptic feedback
- Standard iOS gestures
## Project Structure
```
Features/
└── <FeatureName>/
├── <FeatureName>View.swift
└── Components/
└── <Component>View.swift
Shared/
├── Components/
└── Modifiers/
```
## MCP Servers
Use Sosumi MCP server for Apple documentation when needed:
- Search for modern SwiftUI APIs (2025)
- Verify view modifier availability
- Check deprecation status
If Sosumi unavailable, fallback to `programming-swift` skill for language reference.
## programming-swift Usage
Load `programming-swift` skill ONLY when:
- Verifying obscure Swift/SwiftUI syntax
- Checking new SwiftUI APIs for 2025
---
*Other specialized agents exist in this plugin for different concerns. Focus on implementing beautiful, accessible SwiftUI views.*
© John Rogers (@johnrogers) · MIT · johnrogers/claude-swift-engineering