haskell-expert — субагент для Claude Code: что делает и как установить
Субагент haskell-expert для написания и рефакторинга идиоматичного кода на Haskell. Фокусируется на строгой типизации, монадах, ленивых вычислениях и чистых функциях.
MIT ★ 1 029 обновлён 2025-10-15
.claude/agents/haskell-expert.mdЧто делает haskell-expert
Субагент настраивает Claude Code на глубокую работу с экосистемой Haskell. Он следит за типобезопасностью, применяет классы типов, семейства типов и монадические трансформеры для изоляции побочных эффектов.
В коде субагент требует исчерпывающего паттерн-матчинга, обязательных сигнатур типов и учёта нюансов ленивых вычислений для сохранения производительности. Моделью по умолчанию в конфигурации задана claude-sonnet-4-20250514.
Какие задачи решает
- спроектировать доменную модель на алгебраических типах данных
- вынести побочные эффекты в монады и трансформеры
- настроить вычисления с учётом ленивой семантики
- написать исчерпывающий паттерн-матчинг с проверкой типов
Примеры запросов агенту
- Сделай рефакторинг модуля с парсером на монадические трансформеры
- Опиши модель предметной области через GADT и тайпклассы
- Проверь функции в Pipeline.hs на чистоту и напиши тесты
Как установить haskell-expert
Вручную: положить файлы
.claude/agents/haskell-expert.mdДля всех проектов — ~/.claude/agents/. Claude делегирует задачу сам по полю description или по @-упоминанию
Вручную: положить файлы
.codex/agents/haskell-expert.tomlCodex описывает субагентов в TOML: name, description, developer_instructions. Текст из Markdown перенесите в developer_instructions вручную. Для всех проектов — ~/.codex/agents/
Вручную: положить файлы
.cursor/agents/haskell-expert.mdCursor понимает и .claude/agents/
По шагам, с командами для каждой платформы: Субагенты Claude Code: как создать, вызвать и не утопить контекст
Вопросы о haskell-expert
Как установить haskell-expert в Claude Code?
Сохраните файл субагента по пути .claude/agents/haskell-expert.md в корне вашего проекта.
Что делает haskell-expert?
Он генерирует и проверяет код на Haskell, требуя чистоты функций, точных сигнатур типов, обработки эффектов через монады и модульной структуры.
Какая модель запускает субагента?
Во фронтматтере субагента прописана модель claude-sonnet-4-20250514.
Исходный текст
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