cameronraysmith/vanixiets/preferences-haskell-development
Claude Code and agent skill by cameronraysmith/vanixiets
- community
Checking that the SKILL.md file is still in the repository.
Haskell development conventions covering type classes, monadic composition, and GHC extensions. Load when working with .hs files or Haskell projects.
Install
npx vskill@latest install cameronraysmith/vanixiets/preferences-haskell-developmentSKILL.md
The same SKILL.md was published earlier as cameronraysmith/vanixiets/preferences-haskell-development.
Haskell Development
Architectural patterns alignment
See preferences-architectural-patterns for overarching principles.
Haskell offers exceptionally direct support for lawful abstractions, referential transparency, and effect composition, including monad transformers as one well-supported way to discharge a capability interface. It serves as a reference model for lawful, type-tracked effect composition that other languages approximate with their respective libraries (Effect-TS, ZIO, etc.). The capability interface (the effect signature) is the stable primitive; a transformer stack is one interpreter of it, never the interface or the integration ideal itself. See preferences-theoretical-foundations, and in particular its effects-and-handlers material, for why a capability interface discharged by handlers, not a transformer tower, is the primitive.
Core patterns and libraries
- Effect composition: Use monad transformers from
transformersandmtlfor composing effects - Error handling:
EitherandMaybefor composable error handling, no exceptions - State management:
StateTfor explicit state threading through computations - Reader pattern:
ReaderTfor dependency injection and configuration - IO isolation: Isolate IO effects to boundaries, keep pure functions pure
- Type-level programming: Leverage type classes, GADTs, and type families for compile-time guarantees
Monad transformer stacks
A transformer stack is one interpreter of a capability interface, and a leaky one: the layers do not commute, and deep lift chains cost more as the stack grows. Keep any stack shallow and hidden behind a newtype or type alias, and treat the mtl capability constraint (MonadReader, MonadState, MonadError) as the stable primitive rather than the carrier.
- Structure applications behind mtl capability constraints, with a transformer stack such as
ReaderT Config (StateT AppState (ExceptT Error IO))as one interpreter of those capabilities; see preferences-theoretical-foundations for why the capability interface, not the stack, is the primitive - Ensure all monad instances are lawful (identity, associativity for bind)
- Use
liftandliftIOto traverse effect transformer stacks - Apply newtype wrappers for domain-specific effect stacks
Type safety and purity
- Leverage Haskell's type system to make illegal states unrepresentable
- Use
newtypefor domain-specific types to prevent mixing incompatible values - Encode effects explicitly in type signatures (IO, State, Reader, etc.)
- Prefer total functions; use
Maybe/Eitherinstead of partial functions - Use smart constructors to enforce invariants at construction time
Recommended libraries
- Monad transformers:
transformers,mtl - Effect systems:
polysemy,eff,freer-simplefor more flexible effect composition - Parsing:
megaparsec,attoparsecfor parser combinators - Error handling:
either,validation,errorsfor enhanced error composition - Testing:
QuickCheckfor property-based testing,hspecfor BDD-style tests - Lenses:
lensoropticsfor functional record updates
Code quality and tooling
- Use
hlintfor linting and style suggestions - Use
ormolu,fourmolu, orstylish-haskellfor consistent formatting - Enable
-Walland-Wcompatfor comprehensive warnings - Use
ghcidfor fast feedback during development - Run
stack testorcabal testbefore committing
Project structure
- Use Stack or Cabal for package management
- Organize code into modules with clear public APIs
- Separate pure business logic from IO-heavy code
- Use
src/for library code,app/for executables,test/for tests - Document public functions with Haddock comments
Best practices
- Write point-free style judiciously (when it improves clarity)
- Use pattern matching exhaustively
- Leverage lazy evaluation but be aware of space leaks
- Profile with
-profand+RTSflags before optimizing - Use strict fields in data types when appropriate (
!bang patterns) - Consider strictness annotations for performance-critical code
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingmodules/home/ai/plugins/preferences-programming-languages/.apm/skills/preferences-haskell-development/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/cameronraysmith/vanixiets/preferences-haskell-development)