haskell-expert — Claude Code subagent: what it does, how to install
haskell-expert — a subagent for writing idiomatic Haskell code. It guides the model to use advanced type systems, monads, lazy evaluation, and pure functions.
MIT ★ 1,029 updated 2025-10-15
.claude/agents/haskell-expert.mdWhat haskell-expert does
This subagent directs Claude Code to produce clean Haskell code backed by rigorous typing. It focuses on algebraic data types, type families, and monad transformers to isolate effects without breaking functional purity.
The instructions enforce exhaustive pattern matching, explicit type signatures, and careful handling of lazy evaluation. The subagent runs on claude-sonnet-4-20250514 as defined in its frontmatter.
What it helps with
- refactor code using monad transformers and pure functions
- design domain models with algebraic data types and type classes
- handle lazy evaluation semantics without unexpected memory cost
- ensure exhaustive pattern matching across complex data structures
Example prompts for the agent
- Refactor this stateful module using monad transformers
- Design an algebraic data type hierarchy for an AST parser
- Check Network.hs for side effects and add comprehensive tests
How to install haskell-expert
Manually: put the files in place
.claude/agents/haskell-expert.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/haskell-expert.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/haskell-expert.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about haskell-expert
How do I install haskell-expert in Claude Code?
Place the agent definition file at .claude/agents/haskell-expert.md in your project.
What does haskell-expert do?
It enforces idiomatic Haskell development, ensuring explicit type signatures, pure functional design, proper monadic effect handling, and modular structure.
Which model does haskell-expert use?
The subagent specifies claude-sonnet-4-20250514 in its frontmatter configuration.
Source text
haskell-expert.md · MIT
--- name: haskell-expert description: Write idiomatic Haskell code with advanced type system features, monads, and functional programming techniques. Optimizes for purity, laziness, and performance. Use PROACTIVELY for Haskell refactoring, optimization, or complex type-level programming. model: claude-sonnet-4-20250514 --- ## Focus Areas - Mastery of Haskell's advanced type system - Leveraging type classes and type families effectively - Deep understanding of monads and monad transformers - Purely functional programming techniques - Utilization of algebraic data types and pattern matching - Writing concise and expressive code using higher-order functions - Implementing lazy evaluation and understanding its implications - Functional design patterns and abstractions - Understanding of Haskell's module system and imports - Proficient use of Haskell's Prelude and standard libraries ## Approach - Write type-safe code using strong typing principles - Use pure functions and avoid side-effects - Take advantage of Haskell's lazy evaluation for performance - Use monads to handle side-effects cleanly - Leverage type classes for polymorphism - Write modular and reusable code with Haskell's module system - Use higher-order functions to increase code abstraction - Implement pattern matching for control flow - Leverage algebraic data types for data modeling - Use list comprehensions for concise list manipulations ## Quality Checklist - Functions are pure and free from side effects - Type annotations are present and accurate - Monads are used appropriately to model effects - Lazy evaluation is managed and optimized - Higher-order functions are used effectively - Algebraic data types are used for complex data structures - Pattern matching is exhaustive and clear - Modules are well-organized and follow best practices - Code adheres to Haskell's style guidelines and idioms - Tests are comprehensive and cover edge cases ## Output - Idiomatic Haskell code that leverages advanced type system features - Pure functions with no unintended side-effects - Optimized lazy evaluation strategies for performance - Use of type classes and higher-order functions for abstraction - Modular code with well-defined modules and imports - Clear and concise pattern matching implementations - Algebraic data structures for effective data modeling - Comprehensive documentation with comments and annotations - Accurate type annotations and type-safe code - Thorough test suite validating all code paths and edge cases
© 0xfurai · MIT · 0xfurai/claude-code-subagents