Tca
Build, refactor, review, debug, or test Swift features that use Point-Free's Composable Architecture (TCA), including reducers, observable state, view actions, dependencies, effects and cancellation, bindings, presentation and stack navigation, shared state, and TestStore. Use for TCA migrations and deprecation audits, especially Swift 6 concurrency or preparation for TCA 2.0.From its SKILL.md
npx -y skills add kwon2540/tca-agent-skills --skill tcaAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
7.2 KB, ~1.5k tokens by cl100k_base, as published. Nobody here has run it
TCA
Apply current Composable Architecture patterns while matching the version and conventions of the target project. Treat the bundled examples as focused references, not files to copy wholesale.
Establish the baseline
- Inspect
Package.swiftandPackage.resolvedbefore changing code. - Record the resolved TCA version, Swift tools version, and deployment targets.
- If the request depends on “latest,” migration status, or deprecated APIs, verify the newest stable tag and migration guide in the official
pointfreeco/swift-composable-architecturerepository. - Treat these references as audited against TCA 1.26.0, released June 8, 2026. Re-verify them when the project resolves a newer version.
- Read only the references relevant to the task, plus any directly composed parent or child pattern.
Implement modern TCA
- Model features with
@Reducer,@ObservableState, anActionenum, andReduce/reducer-builder composition. - Observe
StoreOf<Feature>directly from SwiftUI. Derive bindings from observable stores. - Use
ViewActionand@ViewAction(for:)when a feature should distinguish actions sent by its view from internal responses, child actions, and delegate actions. Keep this separation optional for simple features. - Define external work as
@Dependencyvalues. Prefer@DependencyClientplusDependencyKeyfor custom clients, and provide deterministic test values. - Express async work with
.run, send results back as actions, use clocks for time, and give long-running work stable cancellation IDs. - Compose child reducers with
Scope,.ifLet,.forEach, or stack composition before handling parent logic that depends on child actions. - Model presentation with
@PresentsandPresentationAction. For enum destinations on TCA 1.25+, scope the projected destination first, then select the case. - Mutate
@Sharedvalues through their projected lock, such as$value.withLock { ... }. - Keep state mutations synchronous in reducers. Move I/O, clocks, notifications, sockets, and other outside-world work into effects and dependencies.
- Preserve Swift 6 isolation and
Sendablecorrectness. Do not silence concurrency diagnostics with unchecked conformance unless the wrapped implementation is independently synchronized. - Add or update
TestStorecoverage for state transitions, received actions, cancellation, navigation, and dependency behavior when production logic changes.
Avoid legacy patterns in new code
- Do not introduce
SystemEnvironment, three-generic-parameter closure reducers,ViewStore,WithViewStore,IfLetStore, orForEachStore. - Do not introduce
@BindingState,TaskResult, oldAnyCasePathAPIs, closure-scoped views, directReducer.reduce, orStore.withState. - Do not sequence or transform effects with
Effect.concatenate,Effect.map, animation/transaction effect operators, scheduler debounce, or scheduler throttle. Sequence directly in.run, callsend(_:animation:)orsend(_:transaction:), and use a clock plus cancellation. - Do not scope presentation from a non-projected destination key path when the installed TCA version supports projected enum scoping.
- Do not copy demo-only helpers such as
AboutView,FactClient, or preview scaffolding unless the target owns equivalent types. - Do not enable
ComposableArchitecture2DeprecationOverloadspermanently; use it temporarily for migration because it can increase compile time. KeepComposableArchitecture2Deprecationsenabled when the project intentionally tracks TCA 2.0 readiness.
Choose references
Getting started and composition
- Basic reducer/store: getting-started-counter.md
- View-only actions and
@ViewAction: view-actions.md - Alerts and confirmation dialogs: getting-started-alerts-and-confirmation-dialogs.md
- Animation: getting-started-animations.md
- Binding basics: getting-started-bindings-basics.md
- Form bindings: getting-started-bindings-forms.md
- Parent/child composition: getting-started-composition-two-counters.md
- Focus state: getting-started-focus-state.md
- Optional child state: getting-started-optional-state.md
Effects and dependencies
- Async requests: effects-basics.md
- Explicit cancellation: effects-cancellation.md
- View-lifetime effects: effects-long-living.md
- Pull to refresh: effects-refreshable.md
- Modern dependency clients: effects-system-environment.md
- Timers and clocks: effects-timers.md
- Web sockets and async streams: effects-websocket.md
Navigation
- Stack navigation: navigation-stack.md
- Multiple enum destinations: navigation-multiple-destinations.md
- Navigate while loading: navigation-navigate-and-load.md
- Navigate and load from lists: navigation-lists-navigate-and-load.md
- Load then present a sheet: navigation-sheet-load-then-present.md
- Present a sheet then load: navigation-sheet-present-and-load.md
Shared and reusable state
- In-memory sharing: shared-state-in-memory.md
- User defaults: shared-state-user-defaults.md
- File persistence: shared-state-file-storage.md
- Multi-step onboarding: shared-state-onboarding.md
- Recursive reducers: higher-order-reducers-recursion.md
- Reusable favoriting: higher-order-reducers-reusable-favoriting.md
Verify
- Build the narrowest affected package or scheme.
- Run relevant tests; use deterministic clocks and dependency overrides instead of sleeping in tests.
- Search changed code for the legacy APIs listed above.
- When auditing for TCA 2.0, enable
ComposableArchitecture2Deprecations, then temporarily enableComposableArchitecture2DeprecationOverloadsand resolve warnings. - Report the resolved TCA version, references used, verification commands, and any remaining migration warnings.
What ships with it: 29 files
136.0 KB alongside SKILL.md
agents/
- openai.yaml205 B
references/
- effects-basics.md5.2 KB
- effects-cancellation.md3.9 KB
- effects-long-living.md3.6 KB
- effects-refreshable.md3.7 KB
- effects-system-environment.md2.3 KB
- effects-timers.md3.8 KB
- effects-websocket.md11.8 KB
- getting-started-alerts-and-confirmation-dialogs.md4.7 KB
- getting-started-animations.md5.5 KB
- getting-started-bindings-basics.md4.0 KB
- getting-started-bindings-forms.md3.4 KB
- getting-started-composition-two-counters.md2.1 KB
- getting-started-counter.md2.2 KB
- getting-started-focus-state.md2.6 KB
- getting-started-optional-state.md2.9 KB
- higher-order-reducers-recursion.md3.6 KB
- higher-order-reducers-reusable-favoriting.md6.2 KB
- navigation-lists-navigate-and-load.md3.9 KB
- navigation-multiple-destinations.md2.6 KB
- navigation-navigate-and-load.md2.9 KB
- navigation-sheet-load-then-present.md2.8 KB
- navigation-sheet-present-and-load.md2.9 KB
- navigation-stack.md11.8 KB
- shared-state-file-storage.md7.0 KB
- shared-state-in-memory.md6.3 KB
- shared-state-onboarding.md13.0 KB
- shared-state-user-defaults.md6.0 KB
- view-actions.md5.1 KB