
composable-architecture
Use when building features with TCA (The Composable Architecture), structuring reducers, managing state, handling effects, navigation, or testing TCA features. Covers @Reducer, Store, Effect, TestStore, reducer composition, and TCA patterns.
- Installs
- 216
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/johnrogers/claude-swift-engineering --skill composable-architecture- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads composable-architecture automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
The Composable Architecture (TCA)
TCA provides architecture for building complex, testable features through composable reducers, centralized state management, and side effect handling. The core principle: predictable state evolution with clear dependencies and testable effects.
Reference Loading Guide
ALWAYS load reference files if there is even a small chance the content may be required. It's better to have the context than to miss a pattern or make a mistake.
| Reference | Load When |
|---|---|
| Reducer Structure | Creating new reducers, setting up @Reducer, State, Action, or @ViewAction |
| Views - Binding | Using @Bindable, two-way bindings, store.send(), or .onAppear/.task |
| Views - Composition | Using ForEach with stores, scoping to child features, or optional children |
| Navigation - Basics | Setting up NavigationStack, path reducers, pushing/popping, or programmatic dismiss |
| Navigation - Advanced | Deep linking, recursive navigation, or combining NavigationStack with sheets |
| Shared State | Using @Shared, .appStorage, .withLock, or sharing state between features |
| Dependencies | Creating @DependencyClient, using @Dependency, or setting up test dependencies |
| Effects | Using .run, .send, .merge, timers, effect cancellation, or async work |
| Presentation | Using @Presents, AlertState, sheets, popovers, or the Destination pattern |
| Testing - Fundamentals | Setting up test suites, makeStore helpers, or understanding Equatable requirements |
| Testing - Patterns | Testing actions, state changes, dependencies, errors, or presentations |
| Testing - Advanced | Using TestClock, keypath matching, exhaustivity = .off, or time-based tests |
| Testing - Utilities | Test data factories, LockIsolated, ConfirmationDialogState testing, or @Shared testing |
| Performance | Optimizing state updates, high-frequency actions, memory, or store scoping |
Common Mistakes
-
Over-modularizing features — Breaking features into too many small reducers makes state management harder and adds composition overhead. Keep related state and actions together unless there's genuine reuse.
-
Mismanaging effect lifetimes — Forgetting to cancel effects when state changes leads to stale data, duplicate requests, or race conditions. Use
.concatenatefor sequential effects and.cancelwhen appropriate. -
Navigation state in wrong places — Putting navigation state in child reducers instead of parent causes unnecessary view reloads and state inconsistencies. Navigation state belongs in the feature that owns the navigation structure.
-
Testing without TestStore exhaustivity — Skipping TestStore assertions for "simple" effects or "obvious" state changes means you miss bugs. Use exhaustivity checking religiously; it catches regressions early.
-
Mixing async/await with Effects incorrectly — Converting async/await to
.runeffects without proper cancellation or error handling loses isolation guarantees. Wrap async operations carefully in.runwithyieldstatements.
FAQ
What does the composable-architecture skill do?
Use when building features with TCA (The Composable Architecture), structuring reducers, managing state, handling effects, navigation, or testing TCA features. Covers @Reducer, Store, Effect, TestStore, reducer composition, and TCA patterns.
How do I install composable-architecture?
Run npx skills add https://github.com/johnrogers/claude-swift-engineering --skill composable-architecture in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/composable-architecture/ (personal) or .claude/skills/composable-architecture/ (project).
Which AI agents can use composable-architecture?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is composable-architecture safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains composable-architecture?
It is published by johnrogers in johnrogers/claude-swift-engineering. It has 216 recorded installs.
More from johnrogers/claude-swift-engineering
swift-style
johnrogers/claude-swift-engineering
Swift code style conventions for clean, readable code. Use when writing Swift code to ensure consistent formatting, naming, organization, and idiomatic patterns.
ios-hig
johnrogers/claude-swift-engineering
Open the skill to read its SKILL.md instructions.
swiftui-patterns
johnrogers/claude-swift-engineering
Open the skill to read its SKILL.md instructions.
ios-26-platform
johnrogers/claude-swift-engineering
Open the skill to read its SKILL.md instructions.
swift-testing
johnrogers/claude-swift-engineering
Use when writing tests with Swift Testing (@Test,
sqlite-data
johnrogers/claude-swift-engineering
Open the skill to read its SKILL.md instructions.
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.