Co-Pilot / 辅助式
更新于 a month ago

property-based-testing

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

💡 摘要

该技能有助于在多种编程语言和智能合约中生成基于属性的测试。

🎯 适合人群

软件开发人员质量保证工程师智能合约开发人员测试自动化工程师编程教育工作者

🤖 AI 吐槽:看起来很能打,但别让配置把人劝退。

安全分析中风险

风险:Medium。建议检查:API Key/Token 的获取、存储与泄露风险。以最小权限运行,并在生产环境启用前审计代码与依赖。

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.

五维分析
清晰度8/10
创新性8/10
实用性9/10
完整性8/10
可维护性7/10
优缺点分析

优点

  • 支持多种编程语言。
  • 自动化测试生成。
  • 增强代码可靠性。
  • 与智能合约集成。

缺点

  • 新用户可能需要学习曲线。
  • 依赖外部库。
  • 仅限于特定测试模式。
  • 可能的性能开销。

相关技能

ccmp

A
toolCo-Pilot / 辅助式
86/ 100

“看起来很能打,但别让配置把人劝退。”

claude-mods

A
toolCo-Pilot / 辅助式
86/ 100

“看起来很能打,但别让配置把人劝退。”

agentic-qe

A
toolCo-Pilot / 辅助式
86/ 100

“看起来很能打,但别让配置把人劝退。”

免责声明:本内容来源于 GitHub 开源项目,仅供展示和评分分析使用。

版权归原作者所有 trailofbits.