property-based-testing
仓库创建 2026年1月15日最近提交 10 小时前SkillHot 收录 21 天前
▸ 精选理由
适合在开发或代码审查时补强示例测试无法覆盖的边界与序列化问题。
这个 Skill 做什么
提供跨语言和智能合约的属性测试指导与触发时机建议。
在多语言项目和智能合约中给出属性测试(PBT)的具体建议,帮你把序列化、解析、校验等场景从例子测试升级为属性测试。适合写测试、审查有 encode/decode 或 parser 的代码时用。特别会给出属性定义、生成器和缩小策略,能捕捉更多边界情况并减少脆弱测试。
▸ 展开 SKILL.md 英文原文
Provides guidance for property-based testing across multiple languages and smart contracts. Use when writing tests, reviewing code with serialization/validation/parsing patterns, designing features, or when property-based testing would provide stronger coverage than example-based tests.
6.3k
Stars
543
Forks
40
仓库内 Skill
+282
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/trailofbits/skills/main/plugins/property-based-testing/skills/property-based-testing/SKILL.md或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/trailofbits/skills/main/plugins/property-based-testing/skills/property-based-testing/SKILL.md"SKILL.MD 节选查看完整文件 ↗
# Property-Based Testing Guide Use this skill proactively during development when you encounter patterns where PBT provides stronger coverage than example-based tests. ## When to Invoke (Automatic Detection) **Invoke this skill when you detect:** - **Serialization pairs**: `encode`/`decode`, `serialize`/`deserialize`, `toJSON`/`fromJSON`, `pack`/`unpack` - **Parsers**: URL parsing, config parsing, protocol parsing, string-to-structured-data - **Normalization**: `normalize`, `sanitize`, `clean`, `canonicalize`, `format` - **Validators**: `is_valid`, `validate`, `check_*` (especially with normalizers) - **Data structures**: Custom collections with `add`/`remove`/`get` operations - **Mathem
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有