This repository is an agent skill for AI coding assistants. It teaches Swift functional programming patterns for domain and core logic: immutability, pure functions, composition, state machines, reducers, dependency injection via functions, and effects as data.
SKILL.mdwith the skill metadata and core instructions.references/with deeper reading:state-machines.mdfunctional-operators.mdalgebraic-data-types.mdoptics.mddependency-injection-currying.mddependency-injection-decision-table.md
This repository already matches the agent skills folder layout (a skills folder
with a required SKILL.md and optional supporting folders).
npx skills add sideeffect-io/swift-functional-programming-skill
Codex can load skills from either a per-user directory or a repo-local directory. After installing, restart Codex.
Per-user:
mkdir -p ~/.codex/skills
cp -R /path/to/this/repo ~/.codex/skills/functional-programming-developerPer-repo:
mkdir -p .codex/skills
cp -R /path/to/this/repo .codex/skills/functional-programming-developerUse it by invoking $functional-programming-developer or by describing a task
that matches the skill so Codex can select it automatically.
Claude Code supports skills and can load them automatically when relevant.
For manual installation, place this folder under your Claude Code skills
directory (commonly ~/.claude/skills).
mkdir -p ~/.claude/skills
cp -R /path/to/this/repo ~/.claude/skills/functional-programming-developerCodex example:
$functional-programming-developer
Model this feature with reducers and explicit effects.
Claude Code example:
Use the Functional Architecture in Swift skill to refactor this domain layer
into pure functions with injected effects.
Contributions are welcome. Suggested ways to help:
- Refine the rules in
SKILL.mdwhile keeping the focus on functional core patterns and testability. - Add or improve reference docs in
references/and update the reading order inSKILL.md. - Keep changes aligned with the agent skills folder structure (
SKILL.mdrequired, optionalreferences/,scripts/,assets/).
Open a PR with a short rationale and examples if applicable.
Apache 2.0. See LICENSE.