nw-pbt-haskell
Haskell property-based testing with QuickCheck and Hedgehog frameworks
Install / Use
npx skills add nWave-ai/nWave --skill nw-pbt-haskellInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
AutomationSupported Platforms
Our assessment of nw-pbt-haskell
nw-pbt-haskell scores 87/100 on our quality scale, 1715th of 2,790 Automation skills we index.
Its SKILL.md is 6.1 KB long, well organised into 18 sections with 10 code examples: a thorough specification that gives an agent plenty to work with.
It has 617 GitHub stars, a meaningful sign that others use it.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so nw-pbt-haskell is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-11-10. Automated pattern scan on 2026-11-10. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
nw-pbt-haskell compared with similar skills
All 4 of these similar skills score higher than nw-pbt-haskell; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| nw-pbt-haskell (this skill)by nWave-ai | 87 | 617 | 2mo ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 112.3k | 8d ago | CLAUDE.md |
| rufloby ruvnet | 100 | 81.9k | today | CLAUDE.md |
| Claude-Code-Game-Studiosby Donchitos | 100 | 39.7k | 7d ago | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 103.6k | 2d ago | MCP Server |
Frequently asked questions
- How do I install nw-pbt-haskell?
- Run
npx skills add nWave-ai/nWave --skill nw-pbt-haskell. The install tabs above show the steps for each supported agent. - Which AI agents does nw-pbt-haskell work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is nw-pbt-haskell safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is nw-pbt-haskell still maintained?
- The repository was last updated about 2 months ago, so nw-pbt-haskell is actively maintained.
Skill content
View source on GitHubname: nw-pbt-haskell agent: nw-functional-software-crafter description: Haskell property-based testing with QuickCheck and Hedgehog frameworks user-invocable: false
PBT Haskell -- QuickCheck + Hedgehog
Framework Selection
| Framework | Shrinking | Stateful | Choose When | |-----------|-----------|----------|-------------| | QuickCheck | Type-based (manual) | Limited (open-source) | Default for most projects. Universal ecosystem support. | | Hedgehog | Integrated (automatic) | Yes (parallel too) | Need automatic shrinking composition or parallel stateful testing |
QuickCheck is the original PBT framework (2000). Hedgehog is the modern alternative with better shrinking.
Quick Start (QuickCheck)
import Test.QuickCheck
prop_reverse_involutory :: [Int] -> Bool
prop_reverse_involutory xs = reverse (reverse xs) == xs
-- Run: quickCheck prop_reverse_involutory
-- Or in test suite: testProperty "reverse" prop_reverse_involutory
Generator Cheat Sheet (QuickCheck)
Via Arbitrary Type Class
arbitrary :: Gen Int -- any Int
arbitrary :: Gen String -- any String
arbitrary :: Gen [Int] -- any list of Ints
arbitrary :: Gen Bool
-- Custom Arbitrary
data Color = Red | Green | Blue deriving (Show, Eq)
instance Arbitrary Color where
arbitrary = elements [Red, Green, Blue]
shrink Red = []
shrink _ = [Red]
Gen Combinators
choose (0, 100) -- bounded int
elements [1, 2, 3] -- pick from list
oneof [gen1, gen2] -- union
frequency [(80, gen1), (20, gen2)] -- weighted
listOf arbitrary -- list
listOf1 arbitrary -- non-empty list
vectorOf 5 arbitrary -- fixed-length list
-- Map
fmap (* 2) arbitrary -- even integers
-- Bind (dependent generation)
do xs <- listOf1 arbitrary
x <- elements xs
return (xs, x)
-- Sized
sized $ \n -> resize (n `div` 2) arbitrary
Shrinking
instance Arbitrary MyType where
arbitrary = ...
shrink (MyType a b) = [MyType a' b | a' <- shrink a]
++ [MyType a b' | b' <- shrink b]
Stateful Testing (QuickCheck)
Not supported in open-source QuickCheck. Use Hedgehog for stateful testing, or commercial Quviq QuickCheck (Erlang).
Quick Start (Hedgehog)
import Hedgehog
import qualified Hedgehog.Gen as Gen
import qualified Hedgehog.Range as Range
prop_reverse :: Property
prop_reverse = property $ do
xs <- forAll $ Gen.list (Range.linear 0 100) Gen.alpha
reverse (reverse xs) === xs
-- Run: check prop_reverse
Generator Cheat Sheet (Hedgehog)
Gen.int (Range.linear 0 100)
Gen.int (Range.constant 0 100) -- no size scaling
Gen.double (Range.linearFrac 0 1)
Gen.string (Range.linear 0 50) Gen.alpha
Gen.bool
Gen.element [Red, Green, Blue]
-- Collections
Gen.list (Range.linear 0 50) Gen.alpha
Gen.nonEmpty (Range.linear 1 50) Gen.alpha
Gen.set (Range.linear 0 20) Gen.int
-- Map
Gen.int (Range.linear 0 100) <&> (* 2)
-- Filter
Gen.filter (> 0) (Gen.int (Range.linear minBound maxBound))
-- Recursive
Gen.recursive Gen.choice
[ Gen.constant Leaf ]
[ Node <$> genTree <*> Gen.int (Range.linear 0 100) <*> genTree ]
Hedgehog Ranges
Range.linear 0 100 -- scales with size parameter
Range.constant 0 100 -- fixed bounds, no scaling
Range.linearFrac 0.0 1.0 -- fractional, scales with size
Range.singleton 42 -- always 42
Stateful Testing (Hedgehog)
Hedgehog supports sequential and parallel state machine testing.
import qualified Hedgehog.Gen as Gen
import qualified Hedgehog.Range as Range
import Hedgehog
import Hedgehog.Internal.State
-- Define state and commands
newtype ModelState (v :: * -> *) = ModelState { items :: Map String Int }
data Put (v :: * -> *) = Put String Int deriving (Show, Eq)
data Get (v :: * -> *) = Get String deriving (Show, Eq)
instance HTraversable Put where
htraverse _ (Put k v) = pure (Put k v)
instance HTraversable Get where
htraverse _ (Get k) = pure (Get k)
cPut :: (MonadGen n, MonadIO m, MonadTest m) => Command n m ModelState
cPut = Command
(\state -> Just $ Put <$> Gen.string (Range.linear 1 10) Gen.alpha
<*> Gen.int (Range.linear 0 100))
(\(Put k v) -> liftIO $ storePut realStore k v)
[ Update $ \(ModelState m) (Put k v) _out -> ModelState (Map.insert k v m)
]
cGet :: (MonadGen n, MonadIO m, MonadTest m) => Command n m ModelState
cGet = Command
(\(ModelState m) -> if Map.null m then Nothing
else Just $ Get <$> Gen.element (Map.keys m))
(\(Get k) -> liftIO $ storeGet realStore k)
[ Ensure $ \(ModelState before) _after (Get k) out ->
out === Map.lookup k before
]
prop_store :: Property
prop_store = property $ do
actions <- forAll $ Gen.sequential (Range.linear 1 50)
(ModelState Map.empty) [cPut, cGet]
executeSequential (ModelState Map.empty) actions
For parallel testing, replace Gen.sequential with Gen.parallel and executeSequential with executeParallel. Checks linearizability of concurrent operations.
Test Runner Integration
QuickCheck
-- With HSpec
describe "sort" $ do
it "preserves length" $ property $
\(xs :: [Int]) -> length (sort xs) == length xs
-- With Tasty
testGroup "sort" [ testProperty "length" prop_sortLength ]
-- Cabal/Stack: depends on QuickCheck, hspec-discover or tasty
Hedgehog
-- With Tasty
testGroup "sort" [ Hedgehog.testProperty "length" prop_sortLength ]
-- Cabal/Stack: depends on hedgehog, tasty-hedgehog
Unique Features
QuickCheck
- The original: 25+ years, every Haskell test framework integrates with it
- Arbitrary type class: One generator per type, automatic derivation via Generic
- Quviq commercial version: Most complete PBT implementation ever built (Erlang)
Hedgehog
- Integrated shrinking: Automatic via rose trees, composes through applicative
- No orphan instances: Explicit generators avoid type class problem
- Range combinators: Fine control over value scaling with size
- Parallel stateful testing: Built-in linearizability checking
Related Skills
Agent-Reach
112.3kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
ruflo
81.9k🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
Claude-Code-Game-Studios
39.7kTurn Claude Code into a full game dev studio — 49 AI agents, 72 workflow skills, and a complete coordination system mirroring real studio hierarchy.
Scrapling
103.6k🕷️ The BEST Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
