Use when you have a written implementation plan to execute in a separate session with review checkpoints
npx skills add sideeffect-io/swift-functional-programming-skill --skill "functional-programming-developer"
Install specific skill from multi-skill repository
# Description
Functional architecture guidance for Swift (immutability, pure functions, reducers, DI via functions).
# SKILL.md
name: functional-programming-developer
description: Functional architecture guidance for Swift (immutability, pure functions, reducers, DI via functions).
Functional Architecture in Swift
Functional programming first, object-oriented / protocol-oriented programming second.
This skill guides how to design domain and core logic in Swift using
immutability, pure functions, and explicit effects.
When to use
- Domain modeling
- Feature / business logic
- Reducers and workflows
- Dependency-injected use cases
- Highly testable code
Architectural patterns
- Functional Core / Imperative Shell
- Feature-oriented design
- Dependency injection via functions
- Mealy & extended state machines
- Effects as data
Functional techniques
- Algebraic Data Types (enum + struct)
- Functional operators (map, flatMap, reduce)
- Partial application & currying
- Optics (Lenses & Prisms with KeyPaths)
Reading order
- references/state-machines.md
- references/functional-operators.md
- references/algebraic-data-types.md
- references/optics.md
- references/dependency-injection-currying.md
- references/dependency-injection-decision-table.md
Dependency injection rules
- Closures first
- Capability structs second
- Protocols last (boundary only)
Testing rules
- Unit tests only in the core
- Fake closures instead of mocks
- No sleeps or timers
Summary
If it’s hard to test, simplify the design.
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.