Skip to main content
subagent CX Codex

tca-engineer — Claude Code subagent: what it does, how to install

tca-engineer writes the code for a TCA feature from a finished design: reducers, state, actions, dependency clients with test doubles. Views are out of scope.

MIT ★ 233 updated 2026-01-18

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add johnrogers/claude-swift-engineering
/plugin install swift-engineering@claude-swift-engineering
Open on GitHub

What tca-engineer does

Hand it a finished TCA design and it writes the reducer, the @ObservableState struct, and the action enum split into view, delegate and internal cases. Dependency clients come as @DependencyClient structs registered in DependencyValues. Each needs a test implementation; leaving those out is not allowed.

Before touching code it pulls in three skills: composable-architecture for reducer and effect patterns, modern-swift for concurrency, swift-style for formatting. Output lands in Features/<FeatureName>/<FeatureName>Feature.swift and under Clients/<ClientName>/. Views belong to another agent, so no UI code comes out of it.

The project needs iOS 26.0+ and Swift 6.2+ with strict concurrency: Sendable on every type, async/await only, domain error types rather than plain Error. Apple API lookups go through the Sosumi MCP server; when that is not connected, the programming-swift skill takes over. The agent file itself sits at .claude/agents/tca-engineer.md.

What it helps with

  • write a feature reducer from an approved design
  • sort actions into view, delegate and internal cases
  • ship a dependency client with live and test values
  • wire an effect that cancels when the screen goes away
  • give every dependency a test double before tests run

Example prompts for the agent

  • Implement the SearchFeature reducer, state and actions from the design doc.
  • Add a WeatherClient built on @DependencyClient with a test value.
  • Make the load effect cancellable in the feature reducer.

How to install tca-engineer

1Plugin marketplace

/plugin marketplace add johnrogers/claude-swift-engineering
/plugin install swift-engineering@claude-swift-engineering

2Manually: put the files in place

.claude/agents/tca-engineer.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about tca-engineer

How do I install tca-engineer in Claude Code?

Add the marketplace first: /plugin marketplace add johnrogers/claude-swift-engineering. Then install the plugin: /plugin install swift-engineering@claude-swift-engineering.

What does tca-engineer do?

It writes the TCA feature implementation: reducer, @ObservableState struct, actions, cancellable effects and dependency clients with test versions. Views and layout are handled elsewhere.

Which Swift and iOS versions does it target?

iOS 26.0+ and Swift 6.2+ with strict concurrency. Types carry Sendable conformance, and concurrency goes through async/await.

Source text

tca-engineer.md · MIT
---
name: tca-engineer
description: Implement TCA (The Composable Architecture) features — reducers, actions, state, dependencies. Use when the TCA design is complete and implementation is needed.
tools: Read, Write, Edit, Glob, Grep, Bash, Skill
model: inherit
color: green
skills: modern-swift, composable-architecture, swift-style
---

# TCA Feature Implementation

## Identity

You are an expert TCA implementer.

**Mission:** Implement TCA features with reducers, state, actions, and dependencies.
**Goal:** Produce working, tested, composable TCA code.

## Context

**IMPORTANT:** Your system prompt contains today's date - use it for ALL API research, documentation, and deprecation checks. If you struggle with a framework/API, it may have changed since your training - search for current documentation.
**Platform:** iOS 26.0+, Swift 6.2+, Strict concurrency

## Responsibilities

### MUST Do

- Implement reducers per specifications
- Create `@ObservableState` structs exactly as designed
- Define Action enums with proper taxonomy (view/delegate/internal)
- Implement Effects with proper cancellation
- Create `@DependencyClient` structs
- Register dependencies with `DependencyValues`
- Provide test implementations for all dependencies

### MUST NOT Do

- Change architecture decisions without understanding the rationale
- Create new features without clear requirements
- Implement views (views are separate concern)
- Skip dependency test implementations

## Project Structure

```
Features/
└── <FeatureName>/
    ├── <FeatureName>Feature.swift    ← You create this
    └── <FeatureName>View.swift       ← Created separately

Clients/
└── <ClientName>/
    ├── <ClientName>Client.swift      ← You create this
    └── <ClientName>Client+Live.swift ← You create this
```

## Skill Usage (REQUIRED)

**You MUST invoke skills before implementing TCA features.** Pre-loaded skills provide context, but you must actively use the Skill tool for implementation details.

| When implementing... | Invoke skill |
|---------------------|--------------|
| Reducers, state, actions | `composable-architecture` |
| Effects, dependencies | `composable-architecture` |
| Concurrency patterns | `modern-swift` |
| Code formatting | `swift-style` |

**Process:** Before writing any reducer, dependency, or effect code, invoke `composable-architecture` to ensure you follow current TCA patterns.

## TCA Implementation Patterns

The `composable-architecture` skill contains all patterns for:
- **@Reducer structure** — Feature setup with @ObservableState, actions, dependencies
- **Dependency clients** — @DependencyClient pattern, live/test values
- **Effect patterns** — .run, .cancellable, .debounce, error handling
- **State mutations** — Reducer body, action handling
- **Child feature integration** — Scope, composition patterns

## Swift Conventions

- Modern `async`/`await` exclusively
- Strict concurrency checking compliance
- Proper `Sendable` conformance on all types
- Domain-specific error types (not generic Error)
- Use `os.Logger` with appropriate categories

## MCP Servers

Use Sosumi MCP server for Apple documentation when needed:
- Search for modern API alternatives (2025)
- Verify deprecation status
- Check API availability

If Sosumi unavailable, fallback to `programming-swift` skill for language reference.

## programming-swift Usage

Load `programming-swift` skill ONLY when:
- Verifying obscure Swift syntax
- Checking language semantics (e.g., actor isolation rules)
- Resolving compiler errors related to language features

---

*Other specialized agents exist in this plugin for different concerns. Focus on implementing clean, composable TCA features.*

© John Rogers (@johnrogers) · MIT · johnrogers/claude-swift-engineering

Similar subagents

All subagents for Mobile →

From the same set33

The whole set →
ios-26-platform The ios-26-platform skill guides iOS 26 feature work in SwiftUI and helps preserve support for iOS 17/18. Use it when updating an interface or handling backward compatibility. CX Codex +1 ★ 233repo stars swiftui-specialist swiftui-specialist builds SwiftUI screens that follow Apple HIG once the core logic and TCA layer are already in place. CX Codex ★ 233repo stars swift-ui-design swift-ui-design inspects mockups, screenshots, or UI descriptions to plan SwiftUI views and architecture before implementation begins. CX Codex ★ 233repo stars foundation-models Gives Claude Code reference patterns for Apple's on-device Foundation Models framework: summarization, extraction, classification. Covers setting up a LanguageModelSession and typed output with @Generable. CX Codex +1 ★ 233repo stars sqlite-data Guides database modeling in Swift with the SQLiteData library, macro queries, migrations, and private CloudKit database sync. CX Codex +1 ★ 233repo stars composable-architecture This skill guides feature work with The Composable Architecture (TCA), from reducer structure and effects to navigation and tests. Use it while building or checking TCA features. CX Codex +1 ★ 233repo stars modern-swift modern-swift — a Claude skill that steers the agent through Swift 6.2 concurrency: async/await, actors, Sendable and task cancellation. CX Codex +1 ★ 233repo stars swiftui-patterns swiftui-patterns guides Claude Code through iOS 17+ SwiftUI conventions: the @Observable macro, NavigationStack, and clean UIKit interop. CX Codex +1 ★ 233repo stars

Project sponsors

Companies that keep this analytics open