ed3dai avatar

Functional Core Imperative Shell

This skill helps you structure code by separating pure business logic from side effects. The core idea is simple: put your pure functions in one file where they're easy to test without mocks, and isolate all I/O operations in a thin shell around them. It's based on the functional core, imperative shell pattern that makes entire classes of bugs structurally impossible. The author suggests using it whenever you're writing new code, refactoring, or deciding where logic belongs. It's a disciplined approach that pays off in testability, though it requires thinking carefully about boundaries from the start.

skills.sh installs
192
GitHub stars
253
last updated
Aug 21, 2026

Install

$ npx -y skills add ed3dai/ed3d-plugins --skill functional-core-imperative-shell --agent claude-code

Installs into .claude/skills of the current project.

Files

Functional Core, Imperative Shell (FCIS)

Overview

Core principle: Separate pure business logic (Functional Core) from side effects (Imperative Shell). Pure functions go in one file, I/O operations in another.

Why this matters: Pure functions are trivial to test (no mocks needed). I/O code is isolated to thin shells. Bugs become structurally impossible when business logic has no side effects.

When to Use

Use FCIS when:

  • Writing any new code file
  • Refactoring existing code
  • Reviewing code for architectural decisions
  • Deciding where logic belongs

Trigger symptoms:

  • "Where should this function go?"
  • Creating a new file
  • Adding database calls to logic
  • Adding file I/O to calculations
  • Writing tests that need complex mocking

MANDATORY: File Classification

YOU MUST add pattern comment to every file containing runtime behavior:

// pattern: Functional Core
// pattern: Imperative Shell
// pattern: Mixed (needs refactoring)

If file genuinely cannot be separated (rare), document why:

Sponsors

Details

Repository
github.com/ed3dai/ed3d-plugins
Categories
Documentation, Code Review & Quality, CLI & Terminal
First seen
Jun 3, 2026
1everyinc avatarskill-creatoreveryinc/compound-engineering-pluginGuide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabil192skills.sh installs
2letta-ai avatarvideo-processingletta-ai/skillsGuide for video analysis and frame-level event detection tasks using OpenCV and similar libraries. This skill should be used when detecting events in videos (ju189skills.sh installs
3bobmatnyc avatarmcp-builderbobmatnyc/claude-mpm-skillsMCP (Model Context Protocol) server build and evaluation guide, including local conventions for tool surfaces, config, and testing188skills.sh installs
40xsardius avatarviem0xsardius/onchain-typescript-skillsTypeScript patterns for low-level EVM blockchain interactions using Viem. Use when writing Node scripts, CLI tools, or backend services that read/write to Ether186skills.sh installs
5ingpoc avatarscroll-storytelleringpoc/skillsUse when creating interactive scroll-based storytelling experiences with mouse-following spotlight effects, animated SVG art, and the Anthropic design language.186skills.sh installs
6julianobarbosa avatarcloudflare-dnsjulianobarbosa/claude-code-skillsComprehensive guide for managing Cloudflare DNS with Azure integration. Use when configuring Cloudflare as authoritative DNS provider for Azure-hosted applicati186skills.sh installs