christopherkarani/agent-skills/swift-functional-core

Claude Code and agent skill by christopherkarani/agent-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when a Swift feature contains policy, evaluation, parsing, validation, state transitions, or deterministic business logic that can be separated from I/O. Do not force this skill onto inherently imperative resource or UI code.

Install

npx vskill@latest install christopherkarani/agent-skills/swift-functional-core

SKILL.md

Swift functional core

Keep decisions deterministic and effects at the boundary. Functional design here means explicit data flow and testable invariants, not a ban on mutation or objects.

Procedure

  1. Separate inputs, decision logic, state transitions, and effects. Identify the smallest pure function or value reducer that can express the requirement.
  2. Model outcomes as domain types: enums with associated values, typed values, and explicit error/indeterminate cases rather than sentinel strings or flags.
  3. Make dependencies explicit at the shell. Pass clocks, randomness, filesystem, network, and process capabilities through narrow interfaces or values.
  4. Keep the core free of global state, hidden task scheduling, logging side effects, and environment reads.
  5. Test the transition table and properties first; test adapters with focused integration checks.
  6. Keep mutation where it makes ownership, performance, or state transitions clearer. Do not copy large data merely to appear functional.

Read references/core-boundary-guide.md when choosing boundaries or designing test seams.

Guardrails

  • A pure function may return a command/effect description instead of performing the effect.
  • Do not introduce a protocol for every dependency; a closure or concrete value is often clearer.
  • Do not hide policy in a callback, global singleton, actor, or logging side effect.
  • Exhaustive state modeling is more valuable than a large abstraction hierarchy.

Completion contract

Show the pure input/output contract, the effect boundary, transition coverage, and deterministic test evidence.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
1
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/christopherkarani/agent-skills/swift-functional-core/badge)](https://verified-skill.com/skills/christopherkarani/agent-skills/swift-functional-core)

Something wrong with this skill or its page? Tell us.