tca-swiftui

tca-swiftui is a skill for Claude Code from rusel95/ios-agent-skills. It costs 149 tokens per session (3,817 once invoked), scanned A, original, MIT.

A guide for building SwiftUI apps with The Composable Architecture, a framework for managing state, actions, dependencies, navigation, and tests.

In plain words
What is it for?
Use it for reducers, state, navigation, dependency setup, child-to-parent actions, and TestStore tests. It also covers migration when a project uses an older TCA version.
Why use it?
It helps avoid outdated TCA code and keeps reducers, navigation, dependencies, and tests aligned with current TCA 1.7 patterns.

Skill for Claude Code

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

Part of the ios-agent-skills plugin — 12 skills shipped together

Good fit Use it for reducers, state, navigation, dependency setup, child-to-parent actions, and TestStore tests. It also covers migration when a project uses an older TCA version.

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

Made for: Claude Code.

Or install ios-agent-skills, the plugin that ships this one along with the rest of its 12 skills.

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 tca-swiftui

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/rusel95/ios-agent-skills/tca-swiftui"><img src="https://agentmods.dev/badge/skills/rusel95/ios-agent-skills/tca-swiftui.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 149 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,817 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.00149 $0.03817
Opus 5 $0.00075 $0.01909
Sonnet 5 $0.00030 $0.00763
Haiku 4.5 $0.00015 $0.00382

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

Security

Grade A, and why

tca-swiftui 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/tca-swiftui/SKILL.md · 238 lines

How it starts

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

Approach: Production-First Iterative Refactoring — This skill is built for production enterprise codebases using The Composable Architecture. Architecture changes are delivered through iterative refactoring — small, focused PRs tracked in a refactoring/ directory. AI tools consistently generate outdated TCA code (pre-1.4 patterns, WithViewStore, Environment, Combine Effects). Every rule here exists to prevent those mistakes.

TCA SwiftUI Architecture (iOS 16+, TCA 1.7+)

Enterprise-grade skill for The Composable Architecture (point-free/swift-composable-architecture). Opinionated: prescribes @Reducer macro, @ObservableState, struct-of-closures dependencies, delegate actions for child-parent communication, and modern navigation via @Presents/StackState. TCA's API changed substantially across versions — AI tools trained on pre-1.7 code consistently generate WithViewStore, IfLetStore, Environment, and other removed patterns. This skill encodes the modern (1.7+) patterns validated against real enterprise codebases.

If the project uses TCA <1.7, consult references/migration.md for pre-macro patterns and incremental upgrade path.

Architecture Layers

View Layer         → SwiftUI Views. Direct store access, NO WithViewStore.
                     Owns store via let/var. Uses @Bindable for $ bindings.
Reducer Layer      → @Reducer struct. State + Action + body. Pure logic.
                     Returns Effect for async work. ALWAYS runs on main thread.
Effect Layer       → .run { send in } for async. .send for sync delegate actions.
                     Cancellable, mergeable, concatenatable.
Dependency Layer   → @DependencyClient structs. Struct-of-closures, NOT protocols.
                     liveValue (app) / testValue (auto-unimplemented) / previewValue.

Quick Decision Trees

"Should this be its own Feature reducer?"

Does this component have its own screen/view?
├── YES → Own @Reducer struct
└── NO → Does it have business logic you want to unit test?
    ├── YES → Own @Reducer struct, compose via Scope
    └── NO → Is its state optional (not always visible)?
        ├── YES → Own @Reducer, use ifLet (avoids unnecessary work)
        └── NO → Keep logic in parent reducer

Read the full file on GitHub · 238 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 · 238 lines · 149 tokens per session scan A 42e921fa414f

Subscribe to this mod's changes

tca-swiftui is a skill published in the GitHub repository rusel95/ios-agent-skills (9 stars, last pushed 4mo ago), licensed MIT. It adds 149 tokens to every session and 3,817 once invoked, about $0.0007 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

compose-multiplatform

Use when building one shared Compose UI in Kotlin across Android, iOS, and desktop — commonMain @Composables, expect/actual, source-set placement, native interop, multiplatform ViewModel/navigation/Koin. NOT a single-platform native build (that is kotlin-android / swift-ios), and NOT Dart/Flutter cross-platform UI…

ericrisco/rsc-harness · 80 tokens

swiftui-max

Expert SwiftUI guidance for building UI on iOS, iPadOS, macOS, watchOS, tvOS, and visionOS. Use whenever writing, reviewing, refactoring, or debugging ANY SwiftUI code — views, view modifiers, layout, navigation (NavigationStack/SplitView, deep links), lists and scrolling, animation and transitions, state management…

Dev869/swift-tothemax · 271 tokens

Swift Patterns

Use this skill when working on Swift projects (SwiftPM packages, iOS/macOS apps) and you want consistent patterns for concurrency, structure, and safety.

AmariahAK/atlarix-skills · 2 tokens

apple-dev-conductor

Orchestrator for the swift-tothemax plugin — routes any Apple-platform development task (building an iOS/macOS app, adding a feature, preparing a release, fixing a rejection) to the right combination of skills in the correct order. Use this skill FIRST whenever a task spans more than one facet of Apple development …

Dev869/swift-tothemax · 156 tokens

swift

Swift programming patterns for iOS and macOS.

miles990/claude-software-skills · 11 tokens

ios-concurrency

Swift Concurrency expert skill covering async/await, structured concurrency (Task, TaskGroup), actors and @MainActor, Sendable protocol and checking, AsyncSequence/AsyncStream, continuations for bridging callback APIs, Swift 6 strict concurrency mode, and common concurrency patterns (debouncing, throttling…

koshkinvv/ios-agent-skills · 191 tokens