Co-Pilot
Updated a month ago

property-based-testing

Ttrailofbits
1.8k
trailofbits/skills/plugins/property-based-testing
80
Agent Score

💡 Summary

This skill aids in generating property-based tests across various programming languages and smart contracts.

🎯 Target Audience

Software developersQuality assurance engineersSmart contract developersTest automation engineersProgramming educators

🤖 AI Roast:Powerful, but the setup might scare off the impatient.

Security AnalysisMedium Risk

Risk: Medium. Review: API keys/tokens handling and storage. Run with least privilege and audit before enabling in production.

Property-Based Testing

Property-based testing guidance for multiple languages and smart contracts.

Installation

This plugin is part of the Trail of Bits Skills marketplace.

Via Marketplace (Recommended)

/plugin marketplace add trailofbits/skills
/plugin menu

Then select the property-based-testing plugin to install.

Manual Installation

/plugin install trailofbits/skills/plugins/property-based-testing

What's Included

This plugin provides a skill that helps Claude Code proactively suggest and write property-based tests when it detects suitable patterns in your code:

  • Serialization pairs: encode/decode, serialize/deserialize, toJSON/fromJSON
  • Parsers: URL parsing, config parsing, protocol parsing
  • Normalization: normalize, sanitize, clean, canonicalize
  • Validators: is_valid, validate, check_*
  • Data structures: Custom collections with add/remove/get operations
  • Mathematical/algorithmic: Pure functions, sorting, ordering
  • Smart contracts: Solidity/Vyper contracts, token operations, state invariants

Supported Languages

  • Python (Hypothesis)
  • JavaScript/TypeScript (fast-check)
  • Rust (proptest, quickcheck)
  • Go (rapid, gopter)
  • Java (jqwik)
  • Scala (ScalaCheck)
  • Solidity/Vyper (Echidna, Medusa)
  • And many more...

See skills/property-based-testing/references/libraries.md for the complete list.

5-Dim Analysis
Clarity8/10
Novelty8/10
Utility9/10
Completeness8/10
Maintainability7/10
Pros & Cons

Pros

  • Supports multiple programming languages.
  • Automates test generation.
  • Enhances code reliability.
  • Integrates with smart contracts.

Cons

  • May require learning curve for new users.
  • Dependency on external libraries.
  • Limited to specific testing patterns.
  • Potential performance overhead.

Related Skills

ccmp

A
toolCo-Pilot
86/ 100

“Powerful, but the setup might scare off the impatient.”

claude-mods

A
toolCo-Pilot
86/ 100

“Powerful, but the setup might scare off the impatient.”

agentic-qe

A
toolCo-Pilot
86/ 100

“Powerful, but the setup might scare off the impatient.”

Disclaimer: This content is sourced from GitHub open source projects for display and rating purposes only.

Copyright belongs to the original author trailofbits.