templates/skills/languages/haskell/SKILL.md
Execute these commands after EVERY implementation (see AGENT_AUTOMATION module for full workflow).
npx skillsauth add hivellm/rulebook HaskellInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
CRITICAL: Execute these commands after EVERY implementation (see AGENT_AUTOMATION module for full workflow).
# Complete quality check sequence (Stack):
stack build --fast --test --no-run-tests # Build check
hlint . # Linting
ormolu --mode check $(find . -name '*.hs') # Format check
stack test # All tests (100% pass)
stack test --coverage # Coverage
# Or with Cabal:
cabal build
cabal test
cabal haddock # Documentation check
CRITICAL: Use GHC 9.4+ with strict compiler flags and HLint.
name: your-project
version: 0.1.0.0
github: "you/your-project"
license: MIT
author: "Your Name"
maintainer: "[email protected]"
extra-source-files:
- README.md
- CHANGELOG.md
dependencies:
- base >= 4.17 && < 5
- text >= 2.0
- bytestring >= 0.11
ghc-options:
- -Wall
- -Wcompat
- -Widentities
- -Wincomplete-record-updates
- -Wincomplete-uni-patterns
- -Wmissing-export-lists
- -Wmissing-home-modules
- -Wpartial-fields
- -Wredundant-constraints
- -Werror
library:
source-dirs: src
executables:
your-project:
main: Main.hs
source-dirs: app
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
dependencies:
- your-project
tests:
your-project-test:
main: Spec.hs
source-dirs: test
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
dependencies:
- your-project
- hspec
- QuickCheck
CRITICAL: After implementing ANY feature, you MUST run these commands in order.
IMPORTANT: These commands MUST match your GitHub Actions workflows to prevent CI/CD failures!
# Pre-Commit Checklist - Stack (MUST match .github/workflows/*.yml)
# 1. Format check (matches workflow)
fourmolu --mode check $(find src test -name '*.hs')
# 2. Lint (MUST pass with no suggestions - matches workflow)
hlint src test
# 3. Build (MUST pass with no warnings - matches workflow)
stack build --test --no-run-tests --pedantic
# 4. Run all tests (MUST pass 100% - matches workflow)
stack test
# 5. Run QuickCheck properties (matches workflow)
stack test --ta '--quickcheck-tests=1000'
# 6. Check coverage (matches workflow)
stack test --coverage
stack hpc report --all
# Pre-Commit Checklist - Cabal (MUST match .github/workflows/*.yml)
# 1. Format check
fourmolu --mode check $(find src test -name '*.hs')
# 2. Lint
hlint src test
# 3. Build
cabal build all --enable-tests --ghc-options="-Werror"
# 4. Test
cabal test all
# If ANY fails: ❌ DO NOT COMMIT - Fix first!
Why This Matters:
fourmolu --mode inplace locally but fourmolu --mode check in CI = failure--pedantic flag = warnings pass locally but fail in CI{-# LANGUAGE OverloadedStrings #-}
module Data.Processor
( DataProcessor(..)
, process
, validate
) where
import Data.Text (Text)
import qualified Data.Text as T
-- | A data processor with configurable threshold
data DataProcessor = DataProcessor
{ threshold :: Double
, verbose :: Bool
} deriving (Eq, Show)
-- | Process input data
--
-- >>> process (DataProcessor 0.5 False) [1,2,3]
-- [2,3]
process :: DataProcessor -> [Int] -> [Int]
process dp xs = filter (> floor (threshold dp)) xs
-- | Validate input
validate :: Text -> Either String ()
validate input
| T.null input = Left "Input cannot be empty"
| otherwise = Right ()
<!-- HASKELL:END -->research
Author a rulebook task spec interactively — research, draft, ask the user clarifying questions, confirm, then create the tasks in rulebook ready for /rulebook-driver. Use when the user wants to plan/spec a feature before implementing.
development
Behavioral guidelines to reduce common LLM coding mistakes — overcomplication, sloppy refactors, hidden assumptions, weak goals. Use when writing, reviewing, or refactoring code. Auto-applies; invoke explicitly via /karpathy-guidelines or 'follow karpathy discipline'.
data-ai
Autonomous AI agent loop for iterative task implementation (@hivehub/rulebook ralph)
data-ai
Use SQL Server for enterprise relational data storage with advanced features, high availability, and Windows integration.