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.
npx agentmods add skills/efremidze/swift-patterns-skill/swift-patternsnpx skills add efremidze/swift-patterns-skill --skill swift-patternsgit clone --depth 1 https://github.com/efremidze/swift-patterns-skillWrote 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.
[](https://agentmods.dev/skills/efremidze/swift-patterns-skill/swift-patterns)<a href="https://agentmods.dev/skills/efremidze/swift-patterns-skill/swift-patterns"><img src="https://agentmods.dev/badge/skills/efremidze/swift-patterns-skill/swift-patterns.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00038 | $0.01828 |
| Opus 5 | $0.00019 | $0.00914 |
| Sonnet 5 | $0.00008 | $0.00366 |
| Haiku 4.5 | $0.00004 | $0.00183 |
Grade A, and why
swift-patterns 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 177 lines — stays where its author put it; the contents beside it link to each section on GitHub.
swift-patterns
Review, refactor, or build SwiftUI features with correct state management, modern API usage, optimal view composition, and performance-conscious patterns. Prioritize native APIs, Apple design guidance, and testable code structure. This skill focuses on facts and best practices without enforcing specific architectural patterns.
Workflow Decision Tree
1) Review existing SwiftUI code
→ Read references/workflows-review.md for review methodology
- Check state management against property wrapper selection (see
references/state.md) - Verify view composition and extraction patterns (see
references/view-composition.md) - Audit list performance and identity stability (see
references/lists-collections.md) - Validate modern API usage (see
references/modern-swiftui-apis.md) - Check async work patterns with .task (see
references/concurrency.md) - Verify navigation implementation (see
references/navigation.md) - Use Review Response Template (below)
2) Refactor existing SwiftUI code
→ Read references/workflows-refactor.md for refactor methodology
- Extract complex views using playbooks (see
references/refactor-playbooks.md) - Migrate deprecated APIs to modern equivalents (see
references/modern-swiftui-apis.md) - Optimize performance hot paths (see
references/performance.md) - Restructure state ownership (see
references/state.md) - Apply common patterns (see
references/patterns.md) - Use Refactor Response Template (below)
3) Implement new SwiftUI features
- Design data flow first: identify owned vs injected state (see
references/state.md) - Structure views for optimal composition (see
references/view-composition.md) - Use modern APIs only (see
references/modern-swiftui-apis.md) - Handle async work with .task modifier (see
references/concurrency.md) - Apply performance patterns early (see
references/performance.md) - Implement navigation flows (see
references/navigation.md)
4) Answer best practice questions
- Load relevant reference file(s) based on topic (see Reference Files below)
- Provide direct guidance with examples
What ships with it
14 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/code-review-refactoring.md 2.3 KB
- references/concurrency.md 2.7 KB
- references/lists-collections.md 1.5 KB
- references/modern-swiftui-apis.md 12 KB
- references/navigation.md 2.7 KB
- references/patterns.md 3.8 KB
- references/performance.md 2.1 KB
- references/refactor-playbooks.md 4.4 KB
- references/scrolling.md 2.8 KB
- references/state.md 2.1 KB
- references/testing-di.md 1.7 KB
- references/view-composition.md 2.8 KB
- references/workflows-refactor.md 2.2 KB
- references/workflows-review.md 1.6 KB
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.
- 4d ago First seen · 177 lines · 38 tokens per session scan A 5bb473ddf2ba
swift-patterns is a skill published in the GitHub repository efremidze/swift-patterns-skill (9 stars, last pushed 5mo ago), licensed MIT. It adds 38 tokens to every session and 1,828 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.
Other skills, from other repositories
swift-architecture-skill
Swift iOS architecture guidance and playbooks for MVVM, MVI, TCA, Clean Architecture, VIPER, MVP, Coordinator, and Reactive patterns. Use when designing, implementing, refactoring, or reviewing the architecture of a SwiftUI or UIKit feature, module, or codebase.
antigravity-root
Enterprise-grade iOS development workflow for TTBaseUIKit-powered apps. Cross-functional product analysis | MVVM-C Architecture | UIKit + SwiftUI | TTViewCodable | TTBaseSUI | xcodebuild CLI Verification | Zero Regression | iOS 14+.
test-modernizer
Modernize test suites to use modern Swift Testing features or migrate from XCTest.
swiftui-whats-new-27
New SwiftUI APIs, behaviors, and deprecations introduced in the 2027 OS releases (iOS 27, macOS 27, watchOS 27, tvOS 27, visionOS 27). Use when a SwiftUI view using @State fails to compile with "used before being initialized", "invalid redeclaration of synthesized property", or "extraneous argument label" errors after…
moai-lang-swift
Swift 6.0 enterprise development with async/await, SwiftUI, Combine, and Swift Concurrency. Advanced patterns for iOS, macOS, server-side Swift, and enterprise mobile applications with Context7 MCP integration.
swift-knowledge
Comprehensive Swift development knowledge for iOS/macOS applications, Swift packages, and modern Swift patterns. Use when working with: (1) xcodebuild commands and Xcode projects, (2) Swift Package Manager, (3) SwiftUI views and patterns, (4) Swift 6 concurrency (async/await, actors, Sendable), (5) XCTest and Swift…