haskell-patterns

Enforce idiomatic Haskell conventions for type design, error handling, and application structure.

1|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/birdgg/haskell-claude --skill haskell-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: haskell-patterns
Source: https://github.com/birdgg/haskell-claude/tree/main/skills/haskell-patterns
Command: npx skills add https://github.com/birdgg/haskell-claude --skill haskell-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This set of conventions provides structured guidelines and decision rules to help developers write idiomatic, safe, and maintainable Haskell code.

Core Features & Use Cases

  • Type Design: prefer newtypes, smart constructors, and sum types over booleans.
  • Error Handling: use Either/ExceptT for recoverable errors; avoid partial functions.
  • Application Structure: use ReaderT, MTLE-style abstractions, and limit transformer stacks.
  • Strictness & Concurrency: prefer Text over String; embrace strict IO and concurrent patterns like STM and async.
  • Anti-patterns: avoid partials, deep stacks, and lazy IO.

Quick Start

Adhere to these conventions when designing Haskell modules to ensure safer, clearer, and more maintainable code.

Frequently Asked Questions about haskell-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle errors in Haskell without using partial functions?

Structure Haskell applications using ReaderT and MTLE-style abstractions while limiting transformer stack depth. This architecture enforces idiomatic conventions by separating environment passing from business logic, yielding maintainable module boundaries.

What is the best way to design types in Haskell for safe code?

Design Haskell types by preferring newtypes, smart constructors, and sum types over booleans. This convention prevents invalid states at compile time, guiding developers toward safer and more maintainable data modeling.

Does this Haskell coding convention support concurrency and strict IO?

These Haskell coding conventions support concurrency by embracing strict IO alongside concurrent patterns like STM and async. This ensures safe state synchronization and predictable resource management across parallel execution threads.

Why should I use Text over String in Haskell?

Use Text over String in Haskell to avoid the performance overhead of linked-list character processing. Embracing Text alongside strictness annotations prevents space leaks and ensures efficient memory usage in production code.