swift-architecture-pro

swift-architecture-pro is a skill for Claude Code from laxrajpurohit/swift-skills-pro. It costs 36 tokens per session (775 once invoked), scanned A, original, MIT.

An iOS app-structure guide for organizing features, data, navigation, and business logic into separate, testable parts. It uses MVVM, where views display information and models handle the work.

In plain words
What is it for?
Use it when creating or refactoring an iOS app, choosing feature and folder boundaries, adding dependency injection, or designing navigation between screens.
Why use it?
It helps prevent large, tangled views and scattered feature code. Clear boundaries make the app easier to understand, change, and test.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the swift-architecture-pro plugin — 1 skill shipped together

Good fit Use it when creating or refactoring an iOS app, choosing feature and folder boundaries, adding dependency injection, or designing navigation between screens.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/laxrajpurohit/swift-skills-pro/swift-architecture-pro
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 laxrajpurohit/swift-skills-pro --skill swift-architecture-pro
Clone the repo
git clone --depth 1 https://github.com/laxrajpurohit/swift-skills-pro

Made for: Claude Code.

Or install swift-architecture-pro, the plugin that ships this one along with the rest of its 1 skill.

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 swift-architecture-pro

README.md
[![agentmods](https://agentmods.dev/badge/skills/laxrajpurohit/swift-skills-pro/swift-architecture-pro/github.svg)](https://agentmods.dev/skills/laxrajpurohit/swift-skills-pro/swift-architecture-pro)
Your own site
<a href="https://agentmods.dev/skills/laxrajpurohit/swift-skills-pro/swift-architecture-pro"><img src="https://agentmods.dev/badge/skills/laxrajpurohit/swift-skills-pro/swift-architecture-pro/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 swift-architecture-pro

Your own site · 80×15
<a href="https://agentmods.dev/skills/laxrajpurohit/swift-skills-pro/swift-architecture-pro"><img src="https://agentmods.dev/badge/skills/laxrajpurohit/swift-skills-pro/swift-architecture-pro.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 775 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.
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.00036 $0.00775
Opus 5 $0.00018 $0.00387
Sonnet 5 $0.00007 $0.00155
Haiku 4.5 $0.00004 $0.00077

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

Security

Grade A, and why

swift-architecture-pro 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 12d 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.

swift-architecture-pro/skills/swift-architecture-pro/SKILL.md · 116 lines

How it starts

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

Swift Architecture Pro

Structure apps so features are isolated, testable, and easy to reason about.

When to use

  • Setting up or refactoring app architecture.
  • Deciding module/folder boundaries, DI, or navigation.
  • Untangling massive views or view models.

Trigger: /swift-architecture-pro.

Core principles

  • Organize by feature, not by technical layer.
  • Views are dumb; logic lives in @Observable models.
  • Depend on protocols, inject implementations — no singletons reached from inside views.
  • Keep types small and single-purpose; a growing file signals split needed.

Folder layout — by feature

❌ By layer

Views/  Models/  ViewModels/  Services/   // every feature scattered across all four

✅ By feature

Features/
  Feed/      FeedView.swift  FeedModel.swift  FeedService.swift
  Profile/   ProfileView.swift ProfileModel.swift
Core/        Networking/  Persistence/  DesignSystem/

MVVM with @Observable

@MainActor @Observable
final class FeedModel {
    private(set) var posts: [Post] = []
    private let service: FeedServing
    init(service: FeedServing) { self.service = service }
    func load() async { posts = (try? await service.posts()) ?? [] }
}

struct FeedView: View {
    @State private var model: FeedModel
    var body: some View {
        List(model.posts) { PostRow($0) }
            .task { await model.load() }
    }
}

View has no networking, no business rules — only presentation.

Dependency injection

❌ Singleton reached from inside

final class FeedModel {
    func load() async { posts = await API.shared.posts() }   // untestable
}

✅ Protocol injected

protocol FeedServing { func posts() async throws -> [Post] }
final class FeedModel { init(service: FeedServing) { ... } }
// tests inject a fake; app injects the real one

Centralize a typed route; drive NavigationStack from it.

enum Route: Hashable { case detail(Post.ID), settings }

@Observable final class Router { var path: [Route] = [] }

NavigationStack(path: $router.path) {
    HomeView()
        .navigationDestination(for: Route.self) { route in
            switch route { case .detail(let id): DetailView(id: id)
                           case .settings: SettingsView() }
        }
}

Don't scatter NavigationLink(destination:) literals across the tree.

Read the full file on GitHub · 116 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. 12d ago First seen · 116 lines · 36 tokens per session scan A f2c2fa0bf63e

Subscribe to this mod's changes

swift-architecture-pro is a skill published in the GitHub repository laxrajpurohit/swift-skills-pro (5 stars, last pushed 3mo ago), licensed MIT. It adds 36 tokens to every session and 775 once invoked, about $0.0002 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

generators

Code generator skills that produce production-ready Swift code for common app components. Use when user wants to add logging, analytics, onboarding, review prompts, networking, authentication, paywalls, settings, persistence, error monitoring, CI/CD pipelines, localization, push notifications, deep linking, testing…

rshankras/claude-code-apple-skills · 176 tokens

axint

Use Axint MCP tools to create, compile, validate, and repair Apple App Intents and Swift surfaces from TypeScript definitions.

agenticempire/axint · 29 tokens

android-sdk-knowledge-patch

Use this skill when updating Android applications, libraries, build logic, or Play delivery settings where recent platform and Android Gradle Plugin behavior can affect compatibility. Check the project's compileSdk, targetSdk, minSdk, AGP, Gradle, JDK, Kotlin, KSP, NDK, and form factors before applying target-gated…

Nevaberry/nevaberry-plugins · 9 tokens

swift-expert

Builds iOS/macOS/watchOS/tvOS applications, implements SwiftUI views and state management, designs protocol-oriented architectures, handles async/await concurrency, implements actors for thread safety, and debugs Swift-specific issues. Use when building iOS/macOS applications with Swift 5.9+, SwiftUI, or async/await…

eric861129/SKILLS_All-in-one · 98 tokens

flutter-expert

Use when building cross-platform applications with Flutter 3+ and Dart. Invoke for widget development, Riverpod/Bloc state management, GoRouter navigation, platform-specific implementations, performance optimization.

eric861129/SKILLS_All-in-one · 41 tokens

kotlin-specialist

Provides idiomatic Kotlin implementation patterns including coroutine concurrency, Flow stream handling, multiplatform architecture, Compose UI construction, Ktor server setup, and type-safe DSL design. Use when building Kotlin applications requiring coroutines, multiplatform development, or Android with Compose.…

eric861129/SKILLS_All-in-one · 86 tokens