ios-architecture-expert

ios-architecture-expert is a skill for Claude Code from SwiftyJourney/ios-architecture-expert-skill. It costs 232 tokens per session (4,862 once invoked), scanned A, original, MIT.

A set of architecture rules for organizing iOS apps written in Swift into separate feature layers, such as domain logic, data access, presentation, and user interface.

In plain words
What is it for?
Use it when designing, reviewing, or refactoring Swift apps, including dependency wiring, view-controller cleanup, and tests for use cases.
Why use it?
It reduces unwanted dependencies between app layers and makes the design easier to test, change, and assemble in one place.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the ios-architecture-expert plugin — 1 skill shipped together

Good fit Use it when designing, reviewing, or refactoring Swift apps, including dependency wiring, view-controller cleanup, and tests for use cases.

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

Made for: Claude Code.

Or install ios-architecture-expert, 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 ios-architecture-expert

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/swiftyjourney/ios-architecture-expert-skill/ios-architecture-expert"><img src="https://agentmods.dev/badge/skills/swiftyjourney/ios-architecture-expert-skill/ios-architecture-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 232 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,862 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.00232 $0.04862
Opus 5 $0.00116 $0.02431
Sonnet 5 $0.00046 $0.00972
Haiku 4.5 $0.00023 $0.00486

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

Security

Grade A, and why

ios-architecture-expert 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.

skills/ios-architecture-expert/SKILL.md · 225 lines

How it starts

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

iOS Architecture Expert — Clean Modular Architecture

Agent Behavior Contract

When this skill is active, follow these rules strictly:

  1. Feature modules have zero UIKit/SwiftUI imports — only Foundation. Domain models, use cases, presenters, and API/cache logic never depend on a UI framework.
  2. Define a boundary at every layer transition — protocol or closure. A layer never references a concrete type from another layer. Use a protocol when there are genuinely multiple strategies (FeedStore, HTTPClient, ResourceView, FeedCache); use a plain composed closure (() async throws -> Resource) when there is one — see rule 12.
  3. Domain models are value typesstruct, Hashable, Sendable. No classes for models.
  4. Presentation logic is framework-agnostic — presenters output view models (structs). No UIImage, UIColor, or SwiftUI types in the presentation layer.
  5. All dependency wiring happens in the Composition Root — the app target (or a dedicated CompositionRoot module). Feature modules never create their own dependencies.
  6. Tests drive the design — one test class per use case, named by behavior (CacheFeedUseCaseTests, not LocalFeedLoaderTests). Use makeSUT() factory in every test class.
  7. Test only the public API — no @testable import outside the Composition Root. Test targets use a plain import Feed; a behavior that can't be observed publicly is a missing public seam (a boundary, a return value, an injected collaborator), never a reason to widen the test's access. This is deliberately stricter than the source codebase, which uses @testable in a handful of places — the full argument and the Composition Root exception live in testability-and-seams.md.
  8. Use SPM multi-target packages for module separation — Feed (Foundation), FeediOS (UIKit), App (composition).
  9. Prefer async/await over closures/Combine for async operations. Use Task.immediate for synchronous-first execution in adapters where the deployment target allows it (iOS 26+; plain Task + observable-state tests is the documented fallback — see concurrency-at-boundaries.md).
  10. Match the project's existing test framework; default to Swift Testing for greenfield suites. For test doubles, test design, deterministic async testing, Swift Testing syntax and XCTest migration, defer to the swift-testing-expert skill. This skill keeps only the places where a testing decision is a design decision — see testability-and-seams.md. Two things that bite regardless: trackForMemoryLeaks/addTeardownBlock is XCTest-only (the Swift Testing equivalent is a test-scoping trait, ST-0007), and Swift Testing runs tests in parallel by default, so suites sharing a store URL or on-disk artifacts need .serialized.
  11. Mark shared mutable state with @MainActor — presenters, adapters, view controllers, and composition code run on the main actor.
  12. Do not add a protocol boundary that has only one implementation and no second strategy in sight — compose a closure in the Composition Root instead. Boundaries exist to select between strategies.

Read the full file on GitHub · 225 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 · 225 lines · 232 tokens per session scan A 9534c5a52135

Subscribe to this mod's changes

ios-architecture-expert is a skill published in the GitHub repository SwiftyJourney/ios-architecture-expert-skill (2 stars, last pushed 1mo ago), licensed MIT. It adds 232 tokens to every session and 4,862 once invoked, about $0.0012 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.