Domain Modeling Made Functional
Apply Scott Wlaschin's "Domain Modeling Made Functional" (Pragmatic Bookshelf, 2018), the functional rendering of domain-driven design. Covers making illegal states unrepresentable with algebraic data types, workflows as type signatures (Command → Result<Events, DomainError>), errors as values on a railway (domain errors, infrastructure errors, panics), single-case wrappers against primitive obsession, aggregates as a choice of states, functional core and imperative shell with the impureim (read-calculate-write) sandwich, and dependency rejection, where the domain takes data and returns decisi
Install
/plugin marketplace add vnovakovits/claude-skillsThe repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.
npx skills add vnovakovits/claude-skills --skill domain-modeling-made-functionalgit clone --depth 1 https://github.com/vnovakovits/claude-skills.git /tmp/claude-skills
mkdir -p ~/.claude/skills
cp -r /tmp/claude-skills/plugins/engineering-practices/skills/domain-modeling-made-functional ~/.claude/skills/domain-modeling-made-functionalPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Domain Modeling Made Functional Scott Wlaschin's book is functional DDD: the same domain-modeling instinct as Evans/Vernon, applied with the rigor of a strong static type system. The thesis: **most domain bugs are illegal states the type system was never told to forbid.** Encode the constraints in types and the compiler becomes your domain expert. The book uses F#, but every principle translates. C# with records + LanguageExt, Scala, Kotlin, TypeScript with discriminated unions — all work. Examples below favor C# since that's where most readers will land. ## Core philosophy > "Make illegal states unrepresentable." > — Yaron Minsky, quoted by Wlaschin as the book's north star You can encode a domain rule in three places: 1. **Runtime check** — `if (status == "Paid") throw...`. Cheapest, weakest. Fails only when exercised, only when a developer remembered to write the guard. 2. **Test** — captures the rule once. Drifts from the code. Only fires if the test is written and runs. 3. **Type** — the compiler enforces it on every line, in every PR, forever. Free, always-on, can't be bypassed. Wlaschin's instinct is to push as much as possible from (1) and (2) up to (3). When you do, whole categories of bug — "what if status is paid but price is null?", "what if both quote and schedule are missing?", "what if someone passes a `Guid` from a different aggregate?" — become uncompileable. ## Make illegal states unrepresentable ### Wrap primitives in single-case types
Details
- Skill name
domain-modeling-made-functional- Repository
- vnovakovits/claude-skills
- Path
plugins/engineering-practices/skills/domain-modeling-made-functional/SKILL.md- License
- MIT
- Repo updated
- 16 November 2026
FAQ
What does the Domain Modeling Made Functional skill do?
Apply Scott Wlaschin's "Domain Modeling Made Functional" (Pragmatic Bookshelf, 2018), the functional rendering of domain-driven design. Covers making illegal states unrepresentable with algebraic data types, workflows as type signatures (Command → Result<Events, DomainError>), errors as values on a railway (domain errors, infrastructure errors, panics), single-case wrappers against primitive obsession, aggregates as a choice of states, functional core and imperative shell with the impureim (read-calculate-write) sandwich, and dependency rejection, where the domain takes data and returns decisi
How do I install the Domain Modeling Made Functional skill?
Claude Code plugin: /plugin marketplace add vnovakovits/claude-skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Domain Modeling Made Functional popular?
It lives in vnovakovits/claude-skills, which has 5 GitHub stars and 2 forks.
Related skills
Accidental Cio
5vnovakovits/claude-skills
Apply Scott Millett's "The Accidental CIO — A Lean and Agile Playbook for IT Leaders" (Wiley, 2024) when designing or reviewing how a technology organisation decides, funds, governs and delivers work. Covers the five components of an adaptive IT operating model (organised, work, govern, talent, lead) and its four themes (outcomes over output, intrinsic motivation, being not doing agile, manage flow not people); matching method and governance to context via Cynefin and Wardley evolution; governance as demand management + funding + measurement + decision rights, shifting from project funding to
Agent Retro
5vnovakovits/claude-skills
Run a retrospective on a coding-agent session and improve the agent's environment, not the code. Combines Derby & Larsen's five-stage retrospective, Shigeo Shingo's poka-yoke (turn a mechanical mistake into a check that makes it impossible), and Matt Pocock's retro categories — navigation, automated checks, coding standards, steering files, tool economy, information access. Covers mining the session transcript for corrections, wrong turns and slow searches; deciding where each fix belongs (analyzer, hook, CI, reviewer standards, CLAUDE.md pointer, skill, doc or memory); the no-op test for stee
API Design
5vnovakovits/claude-skills
Design APIs that are clear, evolvable, and idiomatic to their protocol — covering REST (Fielding, Richardson Maturity Model, Massé), GraphQL, gRPC/protobuf, versioning strategies, pagination, error responses (RFC 7807 Problem Details), idempotency, authentication, documentation (OpenAPI), and the pragmatic trade-offs between RESTful purity and developer ergonomics. Use when designing a new endpoint, choosing between REST/GraphQL/gRPC, defining versioning, structuring error responses, deciding pagination strategy, or evaluating an existing API's evolvability.
Edge Functions
8Freddy-CHEN-ux/00_claude_skills
Use when working with Deno edge functions, LLM integration, or embedding generation. Load for Deno.serve patterns, Zod request validation, OpenRouter LLM calls, and error handling. Covers function structure, CORS, and the call-llm/generate-embedding patterns.
Docs AI Prd
8Freddy-CHEN-ux/00_claude_skills
Write PRDs, specs, and project context optimized for coding assistants (Claude Code, Cursor, Copilot, Custom GPTs). Includes CLAUDE.md generation, session planning, and templates for creating documentation that tools can execute effectively.
Event Sourcing Cqrs
5vnovakovits/claude-skills
Apply Event Sourcing and CQRS principles from Greg Young's CQRS Documents, Alexey Zimarev and Microsoft's architecture patterns when designing commands, write-side state, IHoldState interfaces, appliers, event payloads, streams, aggregate boundaries, read models or projections. Covers schema evolution with Greg Young's migration ladder (weak schema, upcasting, double publish, copy-replace, copy-transform, internal vs external models) and wire encoding, including why enums must never be persisted as ordinals and why events store primitives rather than domain value objects. Use when deciding wha
Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.