Skip to main content
subagent CX Codex

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

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/haskell-expert.md
Open on GitHub

What 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.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

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

Similar subagents

All subagents for Programming languages →

From the same set137

The whole set →
swiftui-expert swiftui-expert — a Claude subagent for SwiftUI screens: modular views, state, animation and accessibility work. Useful once a screen grows and state starts leaking everywhere. CX Codex ★ 1,029repo stars react-native-expert react-native-expert guides React Native mobile development for iOS and Android, focusing on performance, native bridge integrations, and release pipelines. CX Codex ★ 1,029repo stars loki-expert loki-expert — a Claude Code subagent for Loki deployment, log ingestion, LogQL queries, retention, caching, and Grafana integration. CX Codex ★ 1,029repo stars erlang-expert erlang-expert — a Claude subagent that reviews Erlang code: processes, OTP behaviours, supervision trees, hot upgrades. Useful when a node starts failing under load. CX Codex ★ 1,029repo stars langchain-expert The langchain-expert subagent helps build and debug LangChain pipelines, handle documents, use embeddings, and connect data sources. Use it for LangChain work. CX Codex ★ 1,029repo stars scikit-learn-expert scikit-learn-expert — an Claude subagent for scikit-learn: preprocessing, feature selection, model comparison and hyperparameter tuning, with pipelines and cross-validation throughout. CX Codex ★ 1,029repo stars lua-expert lua-expert writes and optimizes idiomatic Lua code, configures metatables, and handles cooperative multitasking with coroutines. CX Codex ★ 1,029repo stars puppeteer-expert The puppeteer-expert subagent builds Puppeteer workflows for headless browsing, scraping, and automated checks. Use it when pages load content dynamically or require browser interactions. CX Codex ★ 1,029repo stars

Project sponsors

Companies that keep this analytics open