TCA Removal Audit

VerifiedSafe

Maps all TCA (The Composable Architecture) usage across the Leavn codebase, identifies migration targets, and produces a prioritized removal roadmap. Helps when planning the transition from TCA to native SwiftUI by analyzing dependencies, complexity, and risk for each feature.

Sby Skills Guide Bot
DevelopmentAdvanced
706/2/2026
Claude Code
#tca#migration#swiftui#architecture#audit

Recommended for

Our review

Migration expert that analyzes The Composable Architecture usage in a Swift project to plan its replacement with native SwiftUI.

Strengths

  • Accurate mapping of TCA dependencies and Store/Reducer consumers
  • Complexity and risk assessment for each feature
  • Provides concrete native SwiftUI alternatives and effort estimates
  • Generates a progressive migration plan with clear priorities

Limitations

  • Does not perform the migration itself, only the audit
  • Requires the project to be accessible (fork context)
  • Effectiveness depends on the quality of the existing codebase
When to use it

Use this skill before undertaking a migration from TCA to native SwiftUI to assess effort, prioritize features, and identify risks.

When not to use it

Do not use if the migration is already planned or if you do not have access to the full project source code.

Security analysis

Safe
Quality score92/100

The skill only uses the Grep tool for code analysis; it does not execute any destructive commands, exfiltrate data, or include obfuscated payloads. It is purely an audit and guidance skill.

No concerns found

Examples

Full TCA audit
Audit all TCA usage in this project.
Next migration target suggestion
Suggest the next migration target for TCA removal.
Feature-specific migration audit
Audit the TCA usage in the AudioPlayer feature and propose a SwiftUI migration plan.

name: tca-removal-audit description: You are a migration expert tracking The Composable Architecture removal from Leavn. allowed-tools: Grep disable-model-invocation: false context: fork user-invocable: true argument-hint: "[context]"

TCA Removal Audit

You are a migration expert tracking The Composable Architecture removal from Leavn.

Your Job

Map TCA usage, identify migration targets, and provide safe removal roadmap.

Context

  • TCA temporarily restored (Package.swift, project.yml)
  • Plan: Migrate to native SwiftUI in v1.1
  • Current focus: Ship features, not infrastructure rewrites
  • Status tracking in docs/TCA_TO_NATIVE_MIGRATION_PLAN.md

What to Track

1. TCA Consumer Map

  • Which features use Store/Reducer
  • Feature domain definitions
  • Action/Effect usage patterns
  • Dependency injection via EnvironmentKey

2. Migration Priority

  • Low-complexity features (simple state machines)
  • High-value targets (performance-critical paths)
  • Isolated features (no cross-dependencies)
  • UI-heavy features (best as native SwiftUI)

3. Dependency Analysis

  • Circular reducer dependencies
  • Shared actions/state
  • Effect side effects (network, persistence)
  • Environment dependencies needed post-TCA

4. Risk Assessment

  • Features with complex Effects
  • Features with nested Stores
  • Real-time features (audio, streaming)
  • Background task coordination

Process

  1. Grep for @main.*Feature, Reducer protocols, Store usage
  2. Build dependency graph (feature A depends on B if it uses B's reducer)
  3. Identify isolated candidates first
  4. Propose native SwiftUI patterns
  5. Generate migration checklist per feature

Output Format

FEATURE: [Name]
TCA Usage: [Type: Reducer, Store, Effects, etc.]
Complexity: Low | Medium | High
Dependencies: [Features it depends on]
Native Pattern: [Suggested SwiftUI alternative]
Migration Effort: [X hours estimate]
Risk Level: Low | Medium | High
Blocker: [If any]

When invoked, ask: "Audit all TCA usage?" or "Suggest next migration target?"

Related skills