nw-pbt-rust
Rust property-based testing with proptest, quickcheck, and bolero frameworks
Install / Use
npx skills add nWave-ai/nWave --skill nw-pbt-rustInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of nw-pbt-rust
nw-pbt-rust scores 84/100 on our quality scale, 2968th of 4,698 Development & Engineering skills we index.
Its SKILL.md is 5.8 KB long, well organised into 15 sections with 11 code examples: a solid amount of guidance for an agent.
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-rust 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-rust compared with similar skills
All 4 of these similar skills score higher than nw-pbt-rust; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| nw-pbt-rust (this skill)by nWave-ai | 84 | 617 | 2mo ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 116.8k | 8d ago | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 72.1k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 47.3k | 2d ago | CLAUDE.md |
| lobehubby lobehub | 100 | 85.6k | today | MCP Server |
Frequently asked questions
- How do I install nw-pbt-rust?
- Run
npx skills add nWave-ai/nWave --skill nw-pbt-rust. The install tabs above show the steps for each supported agent. - Which AI agents does nw-pbt-rust 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-rust 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-rust still maintained?
- The repository was last updated about 2 months ago, so nw-pbt-rust is actively maintained.
Skill content
View source on GitHubname: nw-pbt-rust agent: nw-functional-software-crafter description: Rust property-based testing with proptest, quickcheck, and bolero frameworks user-invocable: false
PBT Rust -- proptest, quickcheck, bolero
Framework Selection
| Framework | Shrinking | Stateful | Choose When | |-----------|-----------|----------|-------------| | proptest | Integrated | No | Default choice. Most features, best shrinking. | | quickcheck | Type-based | No | Simple properties, one generator per type sufficient | | bolero | Engine-dependent | No | Want to switch between PBT and fuzzing engines |
Default: proptest. Supports multiple strategies per type without newtype wrappers, better shrinking.
Quick Start (proptest)
use proptest::prelude::*;
proptest! {
#[test]
fn sort_preserves_length(ref v in prop::collection::vec(any::<i32>(), 0..100)) {
let mut sorted = v.clone();
sorted.sort();
prop_assert_eq!(sorted.len(), v.len());
}
}
// Run: cargo test
Generator (Strategy) Cheat Sheet (proptest)
Primitives
any::<i32>() // any i32
0..100i32 // range (implements Strategy)
any::<f64>()
any::<String>()
any::<bool>()
any::<Vec<u8>>() // bytes
Just(42) // constant
Collections
prop::collection::vec(any::<i32>(), 0..50)
prop::collection::vec(any::<i32>(), 1..=10) // non-empty, max 10
prop::collection::hash_set(any::<i32>(), 0..20)
prop::collection::hash_map(any::<String>(), any::<i32>(), 0..20)
(any::<i32>(), any::<String>()) // tuple
Combinators
// Union
prop_oneof![any::<i32>().prop_map(Value::Int), any::<String>().prop_map(Value::Str)]
// Map
any::<i32>().prop_map(|x| x * 2) // even integers
// Filter
any::<i32>().prop_filter("positive", |x| *x > 0)
// Prefer: 1..i32::MAX
// FlatMap (dependent generation)
prop::collection::vec(any::<i32>(), 1..50)
.prop_flat_map(|v| {
let len = v.len();
(Just(v), 0..len)
})
// Regex-based strings
"[a-z]{1,10}" // implements Strategy
"[0-9]{3}-[0-9]{4}" // phone-like pattern
Recursive
fn json_value() -> impl Strategy<Value = JsonValue> {
let leaf = prop_oneof![
Just(JsonValue::Null),
any::<bool>().prop_map(JsonValue::Bool),
any::<i64>().prop_map(JsonValue::Number),
];
leaf.prop_recursive(8, 256, 10, |inner| prop_oneof![
prop::collection::vec(inner.clone(), 0..10).prop_map(JsonValue::Array),
prop::collection::hash_map(".*", inner, 0..10).prop_map(JsonValue::Object),
])
}
Custom Strategy
#[derive(Debug, Clone)]
struct User { name: String, age: u8 }
fn user_strategy() -> impl Strategy<Value = User> {
("[a-z]{1,20}", 1..120u8)
.prop_map(|(name, age)| User { name, age })
}
// Or derive Arbitrary
#[derive(Debug, Arbitrary)]
struct Point { x: i32, y: i32 }
Generator Cheat Sheet (quickcheck)
// Implement Arbitrary for custom types
impl quickcheck::Arbitrary for Color {
fn arbitrary(g: &mut quickcheck::Gen) -> Self {
*g.choose(&[Color::Red, Color::Green, Color::Blue]).unwrap()
}
}
// Built-in Arbitrary for primitives, Vec, String, Option, Result, tuples
// Bounded generation via Gen::choose
impl quickcheck::Arbitrary for SmallInt {
fn arbitrary(g: &mut quickcheck::Gen) -> Self {
SmallInt(*g.choose(&(0..=100).collect::<Vec<_>>()).unwrap())
}
fn shrink(&self) -> Box<dyn Iterator<Item = Self>> {
Box::new(self.0.shrink().map(SmallInt))
}
}
Quick Start (quickcheck)
use quickcheck::quickcheck;
quickcheck! {
fn prop_reverse_involutory(xs: Vec<i32>) -> bool {
let rev: Vec<_> = xs.iter().rev().rev().cloned().collect();
rev == xs
}
}
Stateful Testing
Not natively supported by proptest or quickcheck. Manual pattern:
#[derive(Debug, Clone, Arbitrary)]
enum Command { Put(String, i32), Get(String), Delete(String) }
proptest! {
#[test]
fn store_matches_model(cmds in prop::collection::vec(any::<Command>(), 0..50)) {
let mut store = MyStore::new();
let mut model = HashMap::new();
for cmd in cmds {
match cmd {
Command::Put(k, v) => { store.put(&k, v); model.insert(k, v); }
Command::Get(k) => {
prop_assert_eq!(store.get(&k), model.get(&k).copied());
}
Command::Delete(k) => { store.delete(&k); model.remove(&k); }
}
}
}
}
Quick Start (bolero)
use bolero::check;
#[test]
fn sort_test() {
check!().with_type::<Vec<i32>>().for_each(|v| {
let mut sorted = v.clone();
sorted.sort();
assert_eq!(sorted.len(), v.len());
});
}
// Requires: cargo install cargo-bolero (for fuzzing engines)
// Run with fuzzer: cargo bolero test sort_test --engine libfuzzer
// Run as PBT: cargo test (uses random engine)
bolero's value: same test runs with libfuzzer, honggfuzz, AFL, or Kani verifier.
Test Runner Integration
// proptest: add to Cargo.toml
// [dev-dependencies]
// proptest = "1"
// Failures saved to proptest-regressions/ directory
// Configure in proptest.toml or ProptestConfig
proptest! {
#![proptest_config(ProptestConfig::with_cases(10000))]
#[test]
fn my_prop(x in any::<i32>()) { /* ... */ }
}
Unique Features (proptest)
- Regex-based string generation:
"[a-z]{1,10}"as a strategy - Multiple strategies per type: No newtype wrappers needed (unlike quickcheck)
- Failure persistence: Saves to
proptest-regressions/files, auto-replays - prop_compose!: Macro for composing strategies declaratively
- Integrated shrinking: Constraint-aware, avoids generating invalid values during shrink
Related Skills
taste-skill
116.8kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
ai-job-search
72.1kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
47.3kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
lobehub
85.6k🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
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.
