/harness:ios-developmentfrom Harness (обвязка)
Provides iOS development guidance covering Swift/SwiftUI/UIKit, architecture patterns, networking, data persistence, performance optimization, and App Store submission. Includes reference files for Metal graphics, SwiftUI pipeline, and API availability matrices.
Ships in Harness (обвязка). Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Before anything else, identify:
Если задача связана с Metal, GPU, рендерингом, шейдерами, TBDR, MetalFX, GPU profiling, frame pacing, PSO, heaps, ICB, MTLIO → читать references/metal-graphics.md первым.
Then read the relevant reference file before writing code.
| Topic | File | When to read |
|---|---|---|
| SwiftUI pipeline | references/swiftui.md | SwiftUI views, state, bindings, modifiers, animations |
| UIKit pipeline | references/uikit.md | UIViewController, Auto Layout, delegates, storyboards |
| Architecture | references/architecture.md | MVVM, TCA, VIPER, Clean, Coordinator |
| Networking | references/networking.md | URLSession, async/await, REST/GraphQL, auth |
| Data persistence | references/data.md | CoreData, SwiftData, UserDefaults, Keychain, FileManager |
| Navigation | references/navigation.md | NavigationStack, Coordinator, deep links, sheets |
| Performance | references/performance.md | Instruments, memory, launch time, rendering |
| Metal & Heavy Graphics | references/metal-graphics.md | Metal, GPU рендер, TBDR, PSO/heaps/argument buffers, ICB, MTLIO, MetalFX, терморегуляция, профилирование GPU |
| Feature | Min iOS |
|---|---|
| SwiftUI | iOS 13 |
async/await | iOS 15 |
| NavigationStack | iOS 16 |
| SwiftData | iOS 17 |
@Observable macro | iOS 17 |
| RippleEffect, ScrollView phases | iOS 18 |
Always check target before using newer APIs. Use #available guards for backward compatibility:
if #available(iOS 17, *) {
// SwiftData or @Observable
} else {
// fallback
}
// Prefer this
func loadUser() async throws -> User {
let data = try await URLSession.shared.data(from: url).0
return try JSONDecoder().decode(User.self, from: data)
}
// Call site
Task {
do {
user = try await loadUser()
} catch {
errorMessage = error.localizedDescription
}
}
enum AppError: LocalizedError {
case networkUnavailable
case decodingFailed(String)
case unauthorized
var errorDescription: String? {
switch self {
case .networkUnavailable: return "No internet connection"
case .decodingFailed(let detail): return "Data error: \(detail)"
case .unauthorized: return "Please sign in again"
}
}
}
Prefer struct over class unless you need reference semantics, inheritance, or @Observable.
Is the screen purely data-display with simple interaction?
YES → MVC / simple SwiftUI View with @State is fine
NO ↓
Is business logic testable without UI?
Required → use ViewModel (MVVM) or Store (TCA)
Is navigation/routing complex (deep links, coordinator)?
YES → read references/navigation.md → Coordinator pattern
Is the team large or is this a long-lived product?
YES → Clean Architecture or TCA → read references/architecture.md
Default for most apps: MVVM + Coordinator
Local transient state → @State
Passed from parent → @Binding
Shared across views → @StateObject / @ObservedObject (iOS 16-)
→ @State with @Observable class (iOS 17+)
App-wide environment → @EnvironmentObject / @Environment
@Observable
class UserStore {
var users: [User] = []
var isLoading = false
}
// In View — no property wrapper needed
struct UserListView: View {
var store: UserStore // just pass it
var body: some View {
List(store.users) { Text($0.name) }
}
}
class UserViewModel: ObservableObject {
@Published var users: [User] = []
@Published var isLoading = false
}
struct UserListView: View {
@StateObject private var vm = UserViewModel()
}
New project:
SWIFT_STRICT_CONCURRENCY = complete).gitignore for Xcode (xcuserdata, DerivedData)Capabilities to enable when needed:
Push Notifications capabilityBackground ModesiCloudSign In with Apple// Unit test — ViewModel
@MainActor
final class UserViewModelTests: XCTestCase {
func testLoadUsers() async throws {
let vm = UserViewModel(service: MockUserService())
await vm.loadUsers()
XCTAssertFalse(vm.users.isEmpty)
}
}
// UI test — basic
func testLoginFlow() {
let app = XCUIApplication()
app.launch()
app.textFields["Email"].tap()
app.textFields["Email"].typeText("[email protected]")
app.buttons["Continue"].tap()
XCTAssertTrue(app.navigationBars["Home"].exists)
}
| Pitfall | Fix |
|---|---|
| Purple warning: "Publishing changes from background thread" | Wrap in await MainActor.run { } or mark func @MainActor |
| View re-renders too often | Audit @State/@Published — split large ViewModels |
| Memory leak in closures | Use [weak self] captures in escaping closures |
@StateObject recreated | Move object creation up the tree; don't init in body |
| Keyboard covering text field | Use .ignoresSafeArea(.keyboard, edges: .bottom) or ScrollView |
| Slow list | Use LazyVStack or List with id: stability |
| Simulator ≠ device behavior | Always test on real device before submission |
| Metal: CPU↔GPU stall | Triple buffer + DispatchSemaphore; никогда не ждать GPU синхронно в draw() |
| Metal: PSO компилируется в рантайме | Создавать все PSO до первого кадра, кешировать |
| Metal: лишние load/store | storeAction = .dontCare для transient (depth buffer) |
| Metal: OOM jetsam | Мониторить currentAllocatedSize vs recommendedMaxWorkingSetSize; освобождать при warning |
| Metal: статтер при загрузке | MTLIO + MTLSharedEvent вместо блокирующей загрузки; ODR для тяжёлых ассетов |
| Metal: перегрев | Подписаться на thermalStateDidChangeNotification, адаптировать render scale + FPS |
Планировать по capability-уровням, не под конкретную модель. Всегда включать adaptive quality.
| Уровень | SoC | Реалистичный target | Ключевые ограничения |
|---|---|---|---|
| Широкий охват | A13–A15 (iPhone SE, 13, 14) | 30–60 FPS, агрессивный render scale | Строгий бюджет RT; MetalFX обязателен для сложных сцен |
| Средний | A16 (iPhone 15), M1 | 60 FPS при хорошем пайплайне | MetalFX + динамический render scale |
| Флагман | A17 Pro (iPhone 15 Pro), M3+ | 60–120 FPS, тяжёлые эффекты | Ray tracing (аппаратный); всё равно нужен thermal management |
Важно: даже флагманы упираются в термальную стабильность при длительной нагрузке, а не в пиковую мощность GPU.
PrivacyInfo.xcprivacy) required for sensitive APIsUIRequiresFullScreen = NO without iPad support reasoningreferences/architecture.md (opens in a new tab)references/data.md (opens in a new tab)references/metal-graphics.md (opens in a new tab)references/navigation.md (opens in a new tab)references/networking.md (opens in a new tab)references/performance.md (opens in a new tab)references/swiftui.md (opens in a new tab)references/uikit.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub anastasiyaw/codex-claude-code-config --plugin harness60 skills in this plugin
/agent-harness-designDesigning agent harnesses and tool systems — risk taxonomy for tools, permission decisions, draft/commit pattern, structured tool results, agent budgets (10 types), context trust labels against prompt injection, plan-artifact, approval records, observability and traces, evals (13 categories), event model, streaming buffering, 3rd-party skill install checklist, agentic RAG, self-improving SOP loops, model policy, reasoning effort, and Programmatic Tool Calling adoption gates. Use when building a new Agent SDK app, custom orchestrator, MCP server, Cloudflare Worker with tool calls, agentic RAG pipeline, model router, or model-tier policy; when designing tools and permissions; when writing an agent loop; or when you need trust labels for external content. Do NOT use for improving or auditing an already-built harness (use harness-audit / harness-design instead), nor for ordinary Claude Code sessions where the harness is already given./agents-best-practicesUse when designing, auditing, refactoring, or explaining an agentic harness for any domain, especially when work must continue from a measured gap to verified completion. Covers provider-neutral loops, tools, permissions, environment adaptation, planning, durable workflow state, context, skills, observability, evals, and safety for OpenAI, Anthropic, and compatible APIs. Not for implementing an ordinary app feature or reviewing one concrete diff./architecture-firstDecide module boundaries before the first file: what modules exist, which way dependencies point, who owns state, and what each module may know. Use when starting a project, service, site, API, or subsystem; adding a feature with no obvious home; resolving a circular import or inverted framework dependency; or writing an ARCHITECTURE.md or ADR. Do not use for a one-file script, throwaway experiment, bug fix inside an established seam, naming/function-shape cleanup (use code-complexity), an existing oversized module (use refactoring-safely), or capacity/data scaling decisions (use system-and-data-design). This defines earned boundaries; it does not license speculative layers.
/architecture-qualityKeep web applications, APIs and services readable as they grow: choose feature or domain seams, assign state ownership, enforce dependency direction, keep adapters thin, and verify file shape. Use when starting or extending a web app, backend, frontend, API or multi-page product; when a change makes a module hard to read; when architecture review finds a god file, cross-feature imports, a circular dependency or a framework-heavy domain. Load architecture-first first for a new system, and refactoring-safely for an existing oversized module. Do not use for a one-file script, throwaway spike or a purely local naming change.
/article-structure-reviewПроверить структуру технической статьи после черновика: задача читателя, жанр,
опора значимых утверждений на доказательства и честные ограничения.
Use after the first draft, before publication. Исправлять структуру, когда это
входит в запрос; не создавать обязательный конвейер из других навыков.
Для локальной языковой редактуры — humanize-english или humanize-russian.
/bug-reproducerFind likely software bugs in a codebase, rank concrete bug candidates, and prove or reject them with focused regression tests before proposing a fix. Also turn bug reports, stack traces, screenshots, failing behavior, support tickets, and regressions into minimal reproducible cases with red-to-green evidence. Use when Codex needs to hunt for unknown bugs, audit code for correctness defects, test suspicious edge cases, reproduce a reported failure, isolate root cause, or verify that an approved fix works without regressions. Honor explicit user authority for the requested fix; use approval gates only for authority that the request did not already grant or when scope materially changes. Do NOT use for ordinary implementation where no bug investigation or reproduction is needed.Other plugins' skills for the same job