From haskell-claude
Effectful library conventions and decision rules. Use when writing effectful code, designing effects, or migrating from mtl.
How this skill is triggered — by the user, by Claude, or both
Slash command
/haskell-claude:haskell-effectfulThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- **Default: Static** (`Effectful.Reader.Static`, `Effectful.State.Static.Local`)
Effectful.Reader.Static, Effectful.State.Static.Local)Always consistent: Reader -> State -> Error -> IOE
runApp :: Config -> AppState -> App a -> IO (Either (CallStack, AppError) (a, AppState))
runApp cfg st = runEff . runError . runStateLocal st . runReader cfg
makeEffect from Effectful.TH to auto-generate smart constructors and DispatchOf instancesError e :> es) or custom namingm parameter): use interpret_m parameter): use interpret + localSeqUnliftError constraints on GADT constructors, not on handler signatures -- caller decides error scopeliftEither helperrunErrorNoCallStack or runErrorWith at boundariesException on error newtypes for IO interopadapt helper pattern: liftIO + C.catch + localSeqUnlift for IO error conversionreinterpret + evalState with Map for testable filesystem-like effects-- CORRECT: Error constraint on GADT constructor
data FileSystem :: Effect where
ReadFile :: Error FsReadError :> es => FilePath -> FileSystem (Eff es) String
WriteFile :: Error FsWriteError :> es => FilePath -> String -> FileSystem (Eff es) ()
-- WRONG: Error constraint on handler
runFileSystemIO :: (IOE :> es, Error FsReadError :> es) => ...
ALWAYS use Effectful.Concurrent.*, NEVER Control.Concurrent.* with liftIO.
Error constraint to interpreter instead of effect definitionEither when errors should propagate via effectControl.Concurrent.* with liftIO instead of Effectful.Concurrent.*makeEffect on GADTs with effect constraints (manual definition required)For detailed code examples (dependency injection, testing, MTL migration, concurrency):
references/effectful-examples.mdnpx claudepluginhub birdgg/haskell-plugin --plugin haskell-claudeGuides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Enforces test-driven development: write failing test first, then minimal code to pass. Use when implementing features or bugfixes.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.