[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-trail-of-bits-property-based-testing":3,"mdc--wcm4my-key":38,"related-org-trail-of-bits-property-based-testing":1008,"related-repo-trail-of-bits-property-based-testing":1160},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":26,"repoUrl":27,"updatedAt":28,"license":29,"forks":30,"topics":31,"repo":33,"sourceUrl":36,"mdContent":37},"property-based-testing","implement property-based testing in codebases","Provides guidance for property-based testing across multiple languages and smart contracts. Use when writing tests, reviewing code with serialization\u002Fvalidation\u002Fparsing patterns, designing features, or when property-based testing would provide stronger coverage than example-based tests.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"trail-of-bits","Trail of Bits","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Ftrail-of-bits.png","trailofbits",[13,17,20,23],{"name":14,"slug":15,"type":16},"Engineering","engineering","tag",{"name":18,"slug":19,"type":16},"Smart Contracts","smart-contracts",{"name":21,"slug":22,"type":16},"Code Analysis","code-analysis",{"name":24,"slug":25,"type":16},"Testing","testing",6139,"https:\u002F\u002Fgithub.com\u002Ftrailofbits\u002Fskills","2026-07-17T06:05:33.929795",null,541,[32],"agent-skills",{"repoUrl":27,"stars":26,"forks":30,"topics":34,"description":35},[32],"Trail of Bits Claude Code skills for security research, vulnerability detection, and audit workflows","https:\u002F\u002Fgithub.com\u002Ftrailofbits\u002Fskills\u002Ftree\u002FHEAD\u002Fplugins\u002Fproperty-based-testing\u002Fskills\u002Fproperty-based-testing","---\nname: property-based-testing\ndescription: Provides guidance for property-based testing across multiple languages and smart contracts. Use when writing tests, reviewing code with serialization\u002Fvalidation\u002Fparsing patterns, designing features, or when property-based testing would provide stronger coverage than example-based tests.\n---\n\n# Property-Based Testing Guide\n\nUse this skill proactively during development when you encounter patterns where PBT provides stronger coverage than example-based tests.\n\n## When to Invoke (Automatic Detection)\n\n**Invoke this skill when you detect:**\n\n- **Serialization pairs**: `encode`\u002F`decode`, `serialize`\u002F`deserialize`, `toJSON`\u002F`fromJSON`, `pack`\u002F`unpack`\n- **Parsers**: URL parsing, config parsing, protocol parsing, string-to-structured-data\n- **Normalization**: `normalize`, `sanitize`, `clean`, `canonicalize`, `format`\n- **Validators**: `is_valid`, `validate`, `check_*` (especially with normalizers)\n- **Data structures**: Custom collections with `add`\u002F`remove`\u002F`get` operations\n- **Mathematical\u002Falgorithmic**: Pure functions, sorting, ordering, comparators\n- **Smart contracts**: Solidity\u002FVyper contracts, token operations, state invariants, access control\n\n**Priority by pattern:**\n\n| Pattern | Property | Priority |\n|---------|----------|----------|\n| encode\u002Fdecode pair | Roundtrip | HIGH |\n| Pure function | Multiple | HIGH |\n| Validator | Valid after normalize | MEDIUM |\n| Sorting\u002Fordering | Idempotence + ordering | MEDIUM |\n| Normalization | Idempotence | MEDIUM |\n| Builder\u002Ffactory | Output invariants | LOW |\n| Smart contract | State invariants | HIGH |\n\n## When NOT to Use\n\nDo NOT use this skill for:\n- Simple CRUD operations without transformation logic\n- One-off scripts or throwaway code\n- Code with side effects that cannot be isolated (network calls, database writes)\n- Tests where specific example cases are sufficient and edge cases are well-understood\n- Integration or end-to-end testing (PBT is best for unit\u002Fcomponent testing)\n\n## Property Catalog (Quick Reference)\n\n| Property | Formula | When to Use |\n|----------|---------|-------------|\n| **Roundtrip** | `decode(encode(x)) == x` | Serialization, conversion pairs |\n| **Idempotence** | `f(f(x)) == f(x)` | Normalization, formatting, sorting |\n| **Invariant** | Property holds before\u002Fafter | Any transformation |\n| **Commutativity** | `f(a, b) == f(b, a)` | Binary\u002Fset operations |\n| **Associativity** | `f(f(a,b), c) == f(a, f(b,c))` | Combining operations |\n| **Identity** | `f(x, identity) == x` | Operations with neutral element |\n| **Inverse** | `f(g(x)) == x` | encrypt\u002Fdecrypt, compress\u002Fdecompress |\n| **Oracle** | `new_impl(x) == reference(x)` | Optimization, refactoring |\n| **Easy to Verify** | `is_sorted(sort(x))` | Complex algorithms |\n| **No Exception** | No crash on valid input | Baseline property |\n\n**Strength hierarchy** (weakest to strongest):\nNo Exception → Type Preservation → Invariant → Idempotence → Roundtrip\n\n## Decision Tree\n\nBased on the current task, read the appropriate section:\n\n```\nTASK: Writing new tests\n  → Read [{baseDir}\u002Freferences\u002Fgenerating.md]({baseDir}\u002Freferences\u002Fgenerating.md) (test generation patterns and examples)\n  → Then [{baseDir}\u002Freferences\u002Fstrategies.md]({baseDir}\u002Freferences\u002Fstrategies.md) if input generation is complex\n\nTASK: Designing a new feature\n  → Read [{baseDir}\u002Freferences\u002Fdesign.md]({baseDir}\u002Freferences\u002Fdesign.md) (Property-Driven Development approach)\n\nTASK: Code is difficult to test (mixed I\u002FO, missing inverses)\n  → Read [{baseDir}\u002Freferences\u002Frefactoring.md]({baseDir}\u002Freferences\u002Frefactoring.md) (refactoring patterns for testability)\n\nTASK: Reviewing existing PBT tests\n  → Read [{baseDir}\u002Freferences\u002Freviewing.md]({baseDir}\u002Freferences\u002Freviewing.md) (quality checklist and anti-patterns)\n\nTASK: Test failed, need to interpret\n  → Read [{baseDir}\u002Freferences\u002Finterpreting-failures.md]({baseDir}\u002Freferences\u002Finterpreting-failures.md) (failure analysis and bug classification)\n\nTASK: Need library reference\n  → Read [{baseDir}\u002Freferences\u002Flibraries.md]({baseDir}\u002Freferences\u002Flibraries.md) (PBT libraries by language, includes smart contract tools)\n```\n\n## How to Suggest PBT\n\nWhen you detect a high-value pattern while writing tests, **offer PBT as an option**:\n\n> \"I notice `encode_message`\u002F`decode_message` is a serialization pair. Property-based testing with a roundtrip property would provide stronger coverage than example tests. Want me to use that approach?\"\n\n**If codebase already uses a PBT library** (Hypothesis, fast-check, proptest, Echidna), be more direct:\n\n> \"This codebase uses Hypothesis. I'll write property-based tests for this serialization pair using a roundtrip property.\"\n\n**If user declines**, write good example-based tests without further prompting.\n\n## When NOT to Use PBT\n\n- Simple CRUD without complex validation\n- UI\u002Fpresentation logic\n- Integration tests requiring complex external setup\n- Prototyping where requirements are fluid\n- User explicitly requests example-based tests only\n\n## Red Flags\n\n- Recommending trivial getters\u002Fsetters\n- Missing paired operations (encode without decode)\n- Ignoring type hints (well-typed = easier to test)\n- Overwhelming user with candidates (limit to top 5-10)\n- Being pushy after user declines\n\n## Rationalizations to Reject\n\nDo not accept these shortcuts:\n\n- **\"Example tests are good enough\"** - If serialization\u002Fparsing\u002Fnormalization is involved, PBT finds edge cases examples miss\n- **\"The function is simple\"** - Simple functions with complex input domains (strings, floats, nested structures) benefit most from PBT\n- **\"We don't have time\"** - PBT tests are often shorter than comprehensive example suites\n- **\"It's too hard to write generators\"** - Most PBT libraries have excellent built-in strategies; custom generators are rarely needed\n- **\"The test failed, so it's a bug\"** - Failures require validation; see [interpreting-failures.md]({baseDir}\u002Freferences\u002Finterpreting-failures.md)\n- **\"No crash means it works\"** - \"No exception\" is the weakest property; always push for stronger guarantees\n",{"data":39,"body":40},{"name":4,"description":6},{"type":41,"children":42},"root",[43,52,58,65,74,283,291,445,451,456,484,490,756,766,772,777,789,795,807,831,841,849,859,865,893,899,927,933,938],{"type":44,"tag":45,"props":46,"children":48},"element","h1",{"id":47},"property-based-testing-guide",[49],{"type":50,"value":51},"text","Property-Based Testing Guide",{"type":44,"tag":53,"props":54,"children":55},"p",{},[56],{"type":50,"value":57},"Use this skill proactively during development when you encounter patterns where PBT provides stronger coverage than example-based tests.",{"type":44,"tag":59,"props":60,"children":62},"h2",{"id":61},"when-to-invoke-automatic-detection",[63],{"type":50,"value":64},"When to Invoke (Automatic Detection)",{"type":44,"tag":53,"props":66,"children":67},{},[68],{"type":44,"tag":69,"props":70,"children":71},"strong",{},[72],{"type":50,"value":73},"Invoke this skill when you detect:",{"type":44,"tag":75,"props":76,"children":77},"ul",{},[78,147,157,200,231,263,273],{"type":44,"tag":79,"props":80,"children":81},"li",{},[82,87,89,96,98,104,106,112,113,119,120,126,127,133,134,140,141],{"type":44,"tag":69,"props":83,"children":84},{},[85],{"type":50,"value":86},"Serialization pairs",{"type":50,"value":88},": ",{"type":44,"tag":90,"props":91,"children":93},"code",{"className":92},[],[94],{"type":50,"value":95},"encode",{"type":50,"value":97},"\u002F",{"type":44,"tag":90,"props":99,"children":101},{"className":100},[],[102],{"type":50,"value":103},"decode",{"type":50,"value":105},", ",{"type":44,"tag":90,"props":107,"children":109},{"className":108},[],[110],{"type":50,"value":111},"serialize",{"type":50,"value":97},{"type":44,"tag":90,"props":114,"children":116},{"className":115},[],[117],{"type":50,"value":118},"deserialize",{"type":50,"value":105},{"type":44,"tag":90,"props":121,"children":123},{"className":122},[],[124],{"type":50,"value":125},"toJSON",{"type":50,"value":97},{"type":44,"tag":90,"props":128,"children":130},{"className":129},[],[131],{"type":50,"value":132},"fromJSON",{"type":50,"value":105},{"type":44,"tag":90,"props":135,"children":137},{"className":136},[],[138],{"type":50,"value":139},"pack",{"type":50,"value":97},{"type":44,"tag":90,"props":142,"children":144},{"className":143},[],[145],{"type":50,"value":146},"unpack",{"type":44,"tag":79,"props":148,"children":149},{},[150,155],{"type":44,"tag":69,"props":151,"children":152},{},[153],{"type":50,"value":154},"Parsers",{"type":50,"value":156},": URL parsing, config parsing, protocol parsing, string-to-structured-data",{"type":44,"tag":79,"props":158,"children":159},{},[160,165,166,172,173,179,180,186,187,193,194],{"type":44,"tag":69,"props":161,"children":162},{},[163],{"type":50,"value":164},"Normalization",{"type":50,"value":88},{"type":44,"tag":90,"props":167,"children":169},{"className":168},[],[170],{"type":50,"value":171},"normalize",{"type":50,"value":105},{"type":44,"tag":90,"props":174,"children":176},{"className":175},[],[177],{"type":50,"value":178},"sanitize",{"type":50,"value":105},{"type":44,"tag":90,"props":181,"children":183},{"className":182},[],[184],{"type":50,"value":185},"clean",{"type":50,"value":105},{"type":44,"tag":90,"props":188,"children":190},{"className":189},[],[191],{"type":50,"value":192},"canonicalize",{"type":50,"value":105},{"type":44,"tag":90,"props":195,"children":197},{"className":196},[],[198],{"type":50,"value":199},"format",{"type":44,"tag":79,"props":201,"children":202},{},[203,208,209,215,216,222,223,229],{"type":44,"tag":69,"props":204,"children":205},{},[206],{"type":50,"value":207},"Validators",{"type":50,"value":88},{"type":44,"tag":90,"props":210,"children":212},{"className":211},[],[213],{"type":50,"value":214},"is_valid",{"type":50,"value":105},{"type":44,"tag":90,"props":217,"children":219},{"className":218},[],[220],{"type":50,"value":221},"validate",{"type":50,"value":105},{"type":44,"tag":90,"props":224,"children":226},{"className":225},[],[227],{"type":50,"value":228},"check_*",{"type":50,"value":230}," (especially with normalizers)",{"type":44,"tag":79,"props":232,"children":233},{},[234,239,241,247,248,254,255,261],{"type":44,"tag":69,"props":235,"children":236},{},[237],{"type":50,"value":238},"Data structures",{"type":50,"value":240},": Custom collections with ",{"type":44,"tag":90,"props":242,"children":244},{"className":243},[],[245],{"type":50,"value":246},"add",{"type":50,"value":97},{"type":44,"tag":90,"props":249,"children":251},{"className":250},[],[252],{"type":50,"value":253},"remove",{"type":50,"value":97},{"type":44,"tag":90,"props":256,"children":258},{"className":257},[],[259],{"type":50,"value":260},"get",{"type":50,"value":262}," operations",{"type":44,"tag":79,"props":264,"children":265},{},[266,271],{"type":44,"tag":69,"props":267,"children":268},{},[269],{"type":50,"value":270},"Mathematical\u002Falgorithmic",{"type":50,"value":272},": Pure functions, sorting, ordering, comparators",{"type":44,"tag":79,"props":274,"children":275},{},[276,281],{"type":44,"tag":69,"props":277,"children":278},{},[279],{"type":50,"value":280},"Smart contracts",{"type":50,"value":282},": Solidity\u002FVyper contracts, token operations, state invariants, access control",{"type":44,"tag":53,"props":284,"children":285},{},[286],{"type":44,"tag":69,"props":287,"children":288},{},[289],{"type":50,"value":290},"Priority by pattern:",{"type":44,"tag":292,"props":293,"children":294},"table",{},[295,319],{"type":44,"tag":296,"props":297,"children":298},"thead",{},[299],{"type":44,"tag":300,"props":301,"children":302},"tr",{},[303,309,314],{"type":44,"tag":304,"props":305,"children":306},"th",{},[307],{"type":50,"value":308},"Pattern",{"type":44,"tag":304,"props":310,"children":311},{},[312],{"type":50,"value":313},"Property",{"type":44,"tag":304,"props":315,"children":316},{},[317],{"type":50,"value":318},"Priority",{"type":44,"tag":320,"props":321,"children":322},"tbody",{},[323,342,359,377,394,410,428],{"type":44,"tag":300,"props":324,"children":325},{},[326,332,337],{"type":44,"tag":327,"props":328,"children":329},"td",{},[330],{"type":50,"value":331},"encode\u002Fdecode pair",{"type":44,"tag":327,"props":333,"children":334},{},[335],{"type":50,"value":336},"Roundtrip",{"type":44,"tag":327,"props":338,"children":339},{},[340],{"type":50,"value":341},"HIGH",{"type":44,"tag":300,"props":343,"children":344},{},[345,350,355],{"type":44,"tag":327,"props":346,"children":347},{},[348],{"type":50,"value":349},"Pure function",{"type":44,"tag":327,"props":351,"children":352},{},[353],{"type":50,"value":354},"Multiple",{"type":44,"tag":327,"props":356,"children":357},{},[358],{"type":50,"value":341},{"type":44,"tag":300,"props":360,"children":361},{},[362,367,372],{"type":44,"tag":327,"props":363,"children":364},{},[365],{"type":50,"value":366},"Validator",{"type":44,"tag":327,"props":368,"children":369},{},[370],{"type":50,"value":371},"Valid after normalize",{"type":44,"tag":327,"props":373,"children":374},{},[375],{"type":50,"value":376},"MEDIUM",{"type":44,"tag":300,"props":378,"children":379},{},[380,385,390],{"type":44,"tag":327,"props":381,"children":382},{},[383],{"type":50,"value":384},"Sorting\u002Fordering",{"type":44,"tag":327,"props":386,"children":387},{},[388],{"type":50,"value":389},"Idempotence + ordering",{"type":44,"tag":327,"props":391,"children":392},{},[393],{"type":50,"value":376},{"type":44,"tag":300,"props":395,"children":396},{},[397,401,406],{"type":44,"tag":327,"props":398,"children":399},{},[400],{"type":50,"value":164},{"type":44,"tag":327,"props":402,"children":403},{},[404],{"type":50,"value":405},"Idempotence",{"type":44,"tag":327,"props":407,"children":408},{},[409],{"type":50,"value":376},{"type":44,"tag":300,"props":411,"children":412},{},[413,418,423],{"type":44,"tag":327,"props":414,"children":415},{},[416],{"type":50,"value":417},"Builder\u002Ffactory",{"type":44,"tag":327,"props":419,"children":420},{},[421],{"type":50,"value":422},"Output invariants",{"type":44,"tag":327,"props":424,"children":425},{},[426],{"type":50,"value":427},"LOW",{"type":44,"tag":300,"props":429,"children":430},{},[431,436,441],{"type":44,"tag":327,"props":432,"children":433},{},[434],{"type":50,"value":435},"Smart contract",{"type":44,"tag":327,"props":437,"children":438},{},[439],{"type":50,"value":440},"State invariants",{"type":44,"tag":327,"props":442,"children":443},{},[444],{"type":50,"value":341},{"type":44,"tag":59,"props":446,"children":448},{"id":447},"when-not-to-use",[449],{"type":50,"value":450},"When NOT to Use",{"type":44,"tag":53,"props":452,"children":453},{},[454],{"type":50,"value":455},"Do NOT use this skill for:",{"type":44,"tag":75,"props":457,"children":458},{},[459,464,469,474,479],{"type":44,"tag":79,"props":460,"children":461},{},[462],{"type":50,"value":463},"Simple CRUD operations without transformation logic",{"type":44,"tag":79,"props":465,"children":466},{},[467],{"type":50,"value":468},"One-off scripts or throwaway code",{"type":44,"tag":79,"props":470,"children":471},{},[472],{"type":50,"value":473},"Code with side effects that cannot be isolated (network calls, database writes)",{"type":44,"tag":79,"props":475,"children":476},{},[477],{"type":50,"value":478},"Tests where specific example cases are sufficient and edge cases are well-understood",{"type":44,"tag":79,"props":480,"children":481},{},[482],{"type":50,"value":483},"Integration or end-to-end testing (PBT is best for unit\u002Fcomponent testing)",{"type":44,"tag":59,"props":485,"children":487},{"id":486},"property-catalog-quick-reference",[488],{"type":50,"value":489},"Property Catalog (Quick Reference)",{"type":44,"tag":292,"props":491,"children":492},{},[493,513],{"type":44,"tag":296,"props":494,"children":495},{},[496],{"type":44,"tag":300,"props":497,"children":498},{},[499,503,508],{"type":44,"tag":304,"props":500,"children":501},{},[502],{"type":50,"value":313},{"type":44,"tag":304,"props":504,"children":505},{},[506],{"type":50,"value":507},"Formula",{"type":44,"tag":304,"props":509,"children":510},{},[511],{"type":50,"value":512},"When to Use",{"type":44,"tag":320,"props":514,"children":515},{},[516,540,564,585,610,635,660,685,710,735],{"type":44,"tag":300,"props":517,"children":518},{},[519,526,535],{"type":44,"tag":327,"props":520,"children":521},{},[522],{"type":44,"tag":69,"props":523,"children":524},{},[525],{"type":50,"value":336},{"type":44,"tag":327,"props":527,"children":528},{},[529],{"type":44,"tag":90,"props":530,"children":532},{"className":531},[],[533],{"type":50,"value":534},"decode(encode(x)) == x",{"type":44,"tag":327,"props":536,"children":537},{},[538],{"type":50,"value":539},"Serialization, conversion pairs",{"type":44,"tag":300,"props":541,"children":542},{},[543,550,559],{"type":44,"tag":327,"props":544,"children":545},{},[546],{"type":44,"tag":69,"props":547,"children":548},{},[549],{"type":50,"value":405},{"type":44,"tag":327,"props":551,"children":552},{},[553],{"type":44,"tag":90,"props":554,"children":556},{"className":555},[],[557],{"type":50,"value":558},"f(f(x)) == f(x)",{"type":44,"tag":327,"props":560,"children":561},{},[562],{"type":50,"value":563},"Normalization, formatting, sorting",{"type":44,"tag":300,"props":565,"children":566},{},[567,575,580],{"type":44,"tag":327,"props":568,"children":569},{},[570],{"type":44,"tag":69,"props":571,"children":572},{},[573],{"type":50,"value":574},"Invariant",{"type":44,"tag":327,"props":576,"children":577},{},[578],{"type":50,"value":579},"Property holds before\u002Fafter",{"type":44,"tag":327,"props":581,"children":582},{},[583],{"type":50,"value":584},"Any transformation",{"type":44,"tag":300,"props":586,"children":587},{},[588,596,605],{"type":44,"tag":327,"props":589,"children":590},{},[591],{"type":44,"tag":69,"props":592,"children":593},{},[594],{"type":50,"value":595},"Commutativity",{"type":44,"tag":327,"props":597,"children":598},{},[599],{"type":44,"tag":90,"props":600,"children":602},{"className":601},[],[603],{"type":50,"value":604},"f(a, b) == f(b, a)",{"type":44,"tag":327,"props":606,"children":607},{},[608],{"type":50,"value":609},"Binary\u002Fset operations",{"type":44,"tag":300,"props":611,"children":612},{},[613,621,630],{"type":44,"tag":327,"props":614,"children":615},{},[616],{"type":44,"tag":69,"props":617,"children":618},{},[619],{"type":50,"value":620},"Associativity",{"type":44,"tag":327,"props":622,"children":623},{},[624],{"type":44,"tag":90,"props":625,"children":627},{"className":626},[],[628],{"type":50,"value":629},"f(f(a,b), c) == f(a, f(b,c))",{"type":44,"tag":327,"props":631,"children":632},{},[633],{"type":50,"value":634},"Combining operations",{"type":44,"tag":300,"props":636,"children":637},{},[638,646,655],{"type":44,"tag":327,"props":639,"children":640},{},[641],{"type":44,"tag":69,"props":642,"children":643},{},[644],{"type":50,"value":645},"Identity",{"type":44,"tag":327,"props":647,"children":648},{},[649],{"type":44,"tag":90,"props":650,"children":652},{"className":651},[],[653],{"type":50,"value":654},"f(x, identity) == x",{"type":44,"tag":327,"props":656,"children":657},{},[658],{"type":50,"value":659},"Operations with neutral element",{"type":44,"tag":300,"props":661,"children":662},{},[663,671,680],{"type":44,"tag":327,"props":664,"children":665},{},[666],{"type":44,"tag":69,"props":667,"children":668},{},[669],{"type":50,"value":670},"Inverse",{"type":44,"tag":327,"props":672,"children":673},{},[674],{"type":44,"tag":90,"props":675,"children":677},{"className":676},[],[678],{"type":50,"value":679},"f(g(x)) == x",{"type":44,"tag":327,"props":681,"children":682},{},[683],{"type":50,"value":684},"encrypt\u002Fdecrypt, compress\u002Fdecompress",{"type":44,"tag":300,"props":686,"children":687},{},[688,696,705],{"type":44,"tag":327,"props":689,"children":690},{},[691],{"type":44,"tag":69,"props":692,"children":693},{},[694],{"type":50,"value":695},"Oracle",{"type":44,"tag":327,"props":697,"children":698},{},[699],{"type":44,"tag":90,"props":700,"children":702},{"className":701},[],[703],{"type":50,"value":704},"new_impl(x) == reference(x)",{"type":44,"tag":327,"props":706,"children":707},{},[708],{"type":50,"value":709},"Optimization, refactoring",{"type":44,"tag":300,"props":711,"children":712},{},[713,721,730],{"type":44,"tag":327,"props":714,"children":715},{},[716],{"type":44,"tag":69,"props":717,"children":718},{},[719],{"type":50,"value":720},"Easy to Verify",{"type":44,"tag":327,"props":722,"children":723},{},[724],{"type":44,"tag":90,"props":725,"children":727},{"className":726},[],[728],{"type":50,"value":729},"is_sorted(sort(x))",{"type":44,"tag":327,"props":731,"children":732},{},[733],{"type":50,"value":734},"Complex algorithms",{"type":44,"tag":300,"props":736,"children":737},{},[738,746,751],{"type":44,"tag":327,"props":739,"children":740},{},[741],{"type":44,"tag":69,"props":742,"children":743},{},[744],{"type":50,"value":745},"No Exception",{"type":44,"tag":327,"props":747,"children":748},{},[749],{"type":50,"value":750},"No crash on valid input",{"type":44,"tag":327,"props":752,"children":753},{},[754],{"type":50,"value":755},"Baseline property",{"type":44,"tag":53,"props":757,"children":758},{},[759,764],{"type":44,"tag":69,"props":760,"children":761},{},[762],{"type":50,"value":763},"Strength hierarchy",{"type":50,"value":765}," (weakest to strongest):\nNo Exception → Type Preservation → Invariant → Idempotence → Roundtrip",{"type":44,"tag":59,"props":767,"children":769},{"id":768},"decision-tree",[770],{"type":50,"value":771},"Decision Tree",{"type":44,"tag":53,"props":773,"children":774},{},[775],{"type":50,"value":776},"Based on the current task, read the appropriate section:",{"type":44,"tag":778,"props":779,"children":783},"pre",{"className":780,"code":782,"language":50},[781],"language-text","TASK: Writing new tests\n  → Read [{baseDir}\u002Freferences\u002Fgenerating.md]({baseDir}\u002Freferences\u002Fgenerating.md) (test generation patterns and examples)\n  → Then [{baseDir}\u002Freferences\u002Fstrategies.md]({baseDir}\u002Freferences\u002Fstrategies.md) if input generation is complex\n\nTASK: Designing a new feature\n  → Read [{baseDir}\u002Freferences\u002Fdesign.md]({baseDir}\u002Freferences\u002Fdesign.md) (Property-Driven Development approach)\n\nTASK: Code is difficult to test (mixed I\u002FO, missing inverses)\n  → Read [{baseDir}\u002Freferences\u002Frefactoring.md]({baseDir}\u002Freferences\u002Frefactoring.md) (refactoring patterns for testability)\n\nTASK: Reviewing existing PBT tests\n  → Read [{baseDir}\u002Freferences\u002Freviewing.md]({baseDir}\u002Freferences\u002Freviewing.md) (quality checklist and anti-patterns)\n\nTASK: Test failed, need to interpret\n  → Read [{baseDir}\u002Freferences\u002Finterpreting-failures.md]({baseDir}\u002Freferences\u002Finterpreting-failures.md) (failure analysis and bug classification)\n\nTASK: Need library reference\n  → Read [{baseDir}\u002Freferences\u002Flibraries.md]({baseDir}\u002Freferences\u002Flibraries.md) (PBT libraries by language, includes smart contract tools)\n",[784],{"type":44,"tag":90,"props":785,"children":787},{"__ignoreMap":786},"",[788],{"type":50,"value":782},{"type":44,"tag":59,"props":790,"children":792},{"id":791},"how-to-suggest-pbt",[793],{"type":50,"value":794},"How to Suggest PBT",{"type":44,"tag":53,"props":796,"children":797},{},[798,800,805],{"type":50,"value":799},"When you detect a high-value pattern while writing tests, ",{"type":44,"tag":69,"props":801,"children":802},{},[803],{"type":50,"value":804},"offer PBT as an option",{"type":50,"value":806},":",{"type":44,"tag":808,"props":809,"children":810},"blockquote",{},[811],{"type":44,"tag":53,"props":812,"children":813},{},[814,816,822,823,829],{"type":50,"value":815},"\"I notice ",{"type":44,"tag":90,"props":817,"children":819},{"className":818},[],[820],{"type":50,"value":821},"encode_message",{"type":50,"value":97},{"type":44,"tag":90,"props":824,"children":826},{"className":825},[],[827],{"type":50,"value":828},"decode_message",{"type":50,"value":830}," is a serialization pair. Property-based testing with a roundtrip property would provide stronger coverage than example tests. Want me to use that approach?\"",{"type":44,"tag":53,"props":832,"children":833},{},[834,839],{"type":44,"tag":69,"props":835,"children":836},{},[837],{"type":50,"value":838},"If codebase already uses a PBT library",{"type":50,"value":840}," (Hypothesis, fast-check, proptest, Echidna), be more direct:",{"type":44,"tag":808,"props":842,"children":843},{},[844],{"type":44,"tag":53,"props":845,"children":846},{},[847],{"type":50,"value":848},"\"This codebase uses Hypothesis. I'll write property-based tests for this serialization pair using a roundtrip property.\"",{"type":44,"tag":53,"props":850,"children":851},{},[852,857],{"type":44,"tag":69,"props":853,"children":854},{},[855],{"type":50,"value":856},"If user declines",{"type":50,"value":858},", write good example-based tests without further prompting.",{"type":44,"tag":59,"props":860,"children":862},{"id":861},"when-not-to-use-pbt",[863],{"type":50,"value":864},"When NOT to Use PBT",{"type":44,"tag":75,"props":866,"children":867},{},[868,873,878,883,888],{"type":44,"tag":79,"props":869,"children":870},{},[871],{"type":50,"value":872},"Simple CRUD without complex validation",{"type":44,"tag":79,"props":874,"children":875},{},[876],{"type":50,"value":877},"UI\u002Fpresentation logic",{"type":44,"tag":79,"props":879,"children":880},{},[881],{"type":50,"value":882},"Integration tests requiring complex external setup",{"type":44,"tag":79,"props":884,"children":885},{},[886],{"type":50,"value":887},"Prototyping where requirements are fluid",{"type":44,"tag":79,"props":889,"children":890},{},[891],{"type":50,"value":892},"User explicitly requests example-based tests only",{"type":44,"tag":59,"props":894,"children":896},{"id":895},"red-flags",[897],{"type":50,"value":898},"Red Flags",{"type":44,"tag":75,"props":900,"children":901},{},[902,907,912,917,922],{"type":44,"tag":79,"props":903,"children":904},{},[905],{"type":50,"value":906},"Recommending trivial getters\u002Fsetters",{"type":44,"tag":79,"props":908,"children":909},{},[910],{"type":50,"value":911},"Missing paired operations (encode without decode)",{"type":44,"tag":79,"props":913,"children":914},{},[915],{"type":50,"value":916},"Ignoring type hints (well-typed = easier to test)",{"type":44,"tag":79,"props":918,"children":919},{},[920],{"type":50,"value":921},"Overwhelming user with candidates (limit to top 5-10)",{"type":44,"tag":79,"props":923,"children":924},{},[925],{"type":50,"value":926},"Being pushy after user declines",{"type":44,"tag":59,"props":928,"children":930},{"id":929},"rationalizations-to-reject",[931],{"type":50,"value":932},"Rationalizations to Reject",{"type":44,"tag":53,"props":934,"children":935},{},[936],{"type":50,"value":937},"Do not accept these shortcuts:",{"type":44,"tag":75,"props":939,"children":940},{},[941,951,961,971,981,998],{"type":44,"tag":79,"props":942,"children":943},{},[944,949],{"type":44,"tag":69,"props":945,"children":946},{},[947],{"type":50,"value":948},"\"Example tests are good enough\"",{"type":50,"value":950}," - If serialization\u002Fparsing\u002Fnormalization is involved, PBT finds edge cases examples miss",{"type":44,"tag":79,"props":952,"children":953},{},[954,959],{"type":44,"tag":69,"props":955,"children":956},{},[957],{"type":50,"value":958},"\"The function is simple\"",{"type":50,"value":960}," - Simple functions with complex input domains (strings, floats, nested structures) benefit most from PBT",{"type":44,"tag":79,"props":962,"children":963},{},[964,969],{"type":44,"tag":69,"props":965,"children":966},{},[967],{"type":50,"value":968},"\"We don't have time\"",{"type":50,"value":970}," - PBT tests are often shorter than comprehensive example suites",{"type":44,"tag":79,"props":972,"children":973},{},[974,979],{"type":44,"tag":69,"props":975,"children":976},{},[977],{"type":50,"value":978},"\"It's too hard to write generators\"",{"type":50,"value":980}," - Most PBT libraries have excellent built-in strategies; custom generators are rarely needed",{"type":44,"tag":79,"props":982,"children":983},{},[984,989,991],{"type":44,"tag":69,"props":985,"children":986},{},[987],{"type":50,"value":988},"\"The test failed, so it's a bug\"",{"type":50,"value":990}," - Failures require validation; see ",{"type":44,"tag":992,"props":993,"children":995},"a",{"href":994},"%7BbaseDir%7D\u002Freferences\u002Finterpreting-failures.md",[996],{"type":50,"value":997},"interpreting-failures.md",{"type":44,"tag":79,"props":999,"children":1000},{},[1001,1006],{"type":44,"tag":69,"props":1002,"children":1003},{},[1004],{"type":50,"value":1005},"\"No crash means it works\"",{"type":50,"value":1007}," - \"No exception\" is the weakest property; always push for stronger guarantees",{"items":1009,"total":1159},[1010,1027,1037,1055,1068,1079,1091,1101,1114,1125,1137,1148],{"slug":1011,"name":1011,"fn":1012,"description":1013,"org":1014,"tags":1015,"stars":26,"repoUrl":27,"updatedAt":1026},"address-sanitizer","detect memory errors during fuzzing","AddressSanitizer detects memory errors during fuzzing. Use when fuzzing C\u002FC++ code to find buffer overflows and use-after-free bugs.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1016,1019,1022,1025],{"name":1017,"slug":1018,"type":16},"C#","c",{"name":1020,"slug":1021,"type":16},"Debugging","debugging",{"name":1023,"slug":1024,"type":16},"Security","security",{"name":24,"slug":25,"type":16},"2026-07-17T06:05:14.925095",{"slug":1028,"name":1028,"fn":1029,"description":1030,"org":1031,"tags":1032,"stars":26,"repoUrl":27,"updatedAt":1036},"aflpp","perform multi-core fuzzing of C\u002FC++ projects","AFL++ is a fork of AFL with better fuzzing performance and advanced features. Use for multi-core fuzzing of C\u002FC++ projects.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1033,1034,1035],{"name":1017,"slug":1018,"type":16},{"name":1023,"slug":1024,"type":16},{"name":24,"slug":25,"type":16},"2026-07-17T06:05:12.433192",{"slug":1038,"name":1038,"fn":1039,"description":1040,"org":1041,"tags":1042,"stars":26,"repoUrl":27,"updatedAt":1054},"agentic-actions-auditor","audit GitHub Actions for security vulnerabilities","Audits GitHub Actions workflows for security vulnerabilities in AI agent integrations including Claude Code Action, Gemini CLI, OpenAI Codex, and GitHub AI Inference. Detects attack vectors where attacker-controlled input reaches AI agents running in CI\u002FCD pipelines, including env var intermediary patterns, direct expression injection, dangerous sandbox configurations, and wildcard user allowlists. Use when reviewing workflow files that invoke AI coding agents, auditing CI\u002FCD pipeline security for prompt injection risks, or evaluating agentic action configurations.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1043,1046,1049,1050,1053],{"name":1044,"slug":1045,"type":16},"Agents","agents",{"name":1047,"slug":1048,"type":16},"CI\u002FCD","ci-cd",{"name":21,"slug":22,"type":16},{"name":1051,"slug":1052,"type":16},"GitHub Actions","github-actions",{"name":1023,"slug":1024,"type":16},"2026-07-18T05:47:48.564744",{"slug":1056,"name":1056,"fn":1057,"description":1058,"org":1059,"tags":1060,"stars":26,"repoUrl":27,"updatedAt":1067},"algorand-vulnerability-scanner","scan Algorand smart contracts for vulnerabilities","Scans Algorand smart contracts for 11 common vulnerabilities including rekeying attacks, unchecked transaction fees, missing field validations, and access control issues. Use when auditing Algorand projects (TEAL\u002FPyTeal).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1061,1064,1065,1066],{"name":1062,"slug":1063,"type":16},"Audit","audit",{"name":21,"slug":22,"type":16},{"name":1023,"slug":1024,"type":16},{"name":18,"slug":19,"type":16},"2026-07-18T05:47:43.989063",{"slug":1069,"name":1069,"fn":1070,"description":1071,"org":1072,"tags":1073,"stars":26,"repoUrl":27,"updatedAt":1078},"ask-questions-if-underspecified","clarify requirements before implementation","Clarify requirements before implementing. Use when serious doubts arise.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1074,1075],{"name":14,"slug":15,"type":16},{"name":1076,"slug":1077,"type":16},"Productivity","productivity","2026-07-17T06:05:33.543262",{"slug":1080,"name":1080,"fn":1081,"description":1082,"org":1083,"tags":1084,"stars":26,"repoUrl":27,"updatedAt":1090},"atheris","fuzz Python code with Atheris","Atheris is a coverage-guided Python fuzzer based on libFuzzer. Use for fuzzing pure Python code and Python C extensions.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1085,1088,1089],{"name":1086,"slug":1087,"type":16},"Python","python",{"name":1023,"slug":1024,"type":16},{"name":24,"slug":25,"type":16},"2026-07-17T06:05:14.575191",{"slug":1092,"name":1092,"fn":1093,"description":1094,"org":1095,"tags":1096,"stars":26,"repoUrl":27,"updatedAt":1100},"audit-augmentation","augment code graphs with audit findings","Augments Trailmark code graphs with external audit findings from SARIF static analysis results, weAudit annotation files, and version-gated Trailmark 0.4.x binary-analysis graph exports. Maps findings to graph nodes by file and line overlap, creates severity-based subgraphs, and enables cross-referencing findings with pre-analysis data (blast radius, taint, etc.). Use when projecting SARIF results onto a code graph, overlaying weAudit annotations, importing binary graph findings, cross-referencing Semgrep, CodeQL, or binary-analysis findings with call graph data, or visualizing audit findings in the context of code structure.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1097,1098,1099],{"name":1062,"slug":1063,"type":16},{"name":21,"slug":22,"type":16},{"name":1023,"slug":1024,"type":16},"2026-08-01T05:44:54.920542",{"slug":1102,"name":1102,"fn":1103,"description":1104,"org":1105,"tags":1106,"stars":26,"repoUrl":27,"updatedAt":1113},"audit-context-building","build architectural context for code analysis","Enables ultra-granular, line-by-line code analysis to build deep architectural context before vulnerability or bug finding.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1107,1110,1111,1112],{"name":1108,"slug":1109,"type":16},"Architecture","architecture",{"name":1062,"slug":1063,"type":16},{"name":21,"slug":22,"type":16},{"name":14,"slug":15,"type":16},"2026-07-18T05:47:40.122449",{"slug":1115,"name":1115,"fn":1116,"description":1117,"org":1118,"tags":1119,"stars":26,"repoUrl":27,"updatedAt":1124},"audit-prep-assistant","prepare codebases for security audits","Prepares codebases for security review using Trail of Bits' checklist. Helps set review goals, runs static analysis tools, increases test coverage, removes dead code, ensures accessibility, and generates documentation (flowcharts, user stories, inline comments).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1120,1121,1122,1123],{"name":1062,"slug":1063,"type":16},{"name":21,"slug":22,"type":16},{"name":14,"slug":15,"type":16},{"name":1023,"slug":1024,"type":16},"2026-07-18T05:47:39.210985",{"slug":1126,"name":1126,"fn":1127,"description":1128,"org":1129,"tags":1130,"stars":26,"repoUrl":27,"updatedAt":1136},"burpsuite-project-parser","parse Burp Suite project files","Searches and explores Burp Suite project files (.burp) from the command line. Use when searching response headers or bodies with regex patterns, extracting security audit findings, dumping proxy history or site map data, or analyzing HTTP traffic captured in a Burp project.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1131,1132,1135],{"name":1062,"slug":1063,"type":16},{"name":1133,"slug":1134,"type":16},"CLI","cli",{"name":1023,"slug":1024,"type":16},"2026-07-17T06:05:33.198077",{"slug":1138,"name":1138,"fn":1139,"description":1140,"org":1141,"tags":1142,"stars":26,"repoUrl":27,"updatedAt":1147},"c-review","audit C and C++ code","Performs comprehensive C\u002FC++ security review for memory corruption, integer overflows, race conditions, and platform-specific vulnerabilities. Use when auditing native C\u002FC++ applications, reviewing daemons or services for memory safety, or hunting integer overflow \u002F use-after-free \u002F race conditions in userspace code.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1143,1144,1145,1146],{"name":1062,"slug":1063,"type":16},{"name":1017,"slug":1018,"type":16},{"name":21,"slug":22,"type":16},{"name":1023,"slug":1024,"type":16},"2026-07-17T06:05:11.333374",{"slug":1149,"name":1149,"fn":1150,"description":1151,"org":1152,"tags":1153,"stars":26,"repoUrl":27,"updatedAt":1158},"cairo-vulnerability-scanner","scan Cairo and StarkNet contracts for vulnerabilities","Scans Cairo\u002FStarkNet smart contracts for 6 critical vulnerabilities including felt252 arithmetic overflow, L1-L2 messaging issues, address conversion problems, and signature replay. Use when auditing StarkNet projects.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1154,1155,1156,1157],{"name":1062,"slug":1063,"type":16},{"name":21,"slug":22,"type":16},{"name":1023,"slug":1024,"type":16},{"name":18,"slug":19,"type":16},"2026-07-18T05:47:42.84568",111,{"items":1161,"total":1207},[1162,1169,1175,1183,1190,1195,1201],{"slug":1011,"name":1011,"fn":1012,"description":1013,"org":1163,"tags":1164,"stars":26,"repoUrl":27,"updatedAt":1026},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1165,1166,1167,1168],{"name":1017,"slug":1018,"type":16},{"name":1020,"slug":1021,"type":16},{"name":1023,"slug":1024,"type":16},{"name":24,"slug":25,"type":16},{"slug":1028,"name":1028,"fn":1029,"description":1030,"org":1170,"tags":1171,"stars":26,"repoUrl":27,"updatedAt":1036},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1172,1173,1174],{"name":1017,"slug":1018,"type":16},{"name":1023,"slug":1024,"type":16},{"name":24,"slug":25,"type":16},{"slug":1038,"name":1038,"fn":1039,"description":1040,"org":1176,"tags":1177,"stars":26,"repoUrl":27,"updatedAt":1054},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1178,1179,1180,1181,1182],{"name":1044,"slug":1045,"type":16},{"name":1047,"slug":1048,"type":16},{"name":21,"slug":22,"type":16},{"name":1051,"slug":1052,"type":16},{"name":1023,"slug":1024,"type":16},{"slug":1056,"name":1056,"fn":1057,"description":1058,"org":1184,"tags":1185,"stars":26,"repoUrl":27,"updatedAt":1067},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1186,1187,1188,1189],{"name":1062,"slug":1063,"type":16},{"name":21,"slug":22,"type":16},{"name":1023,"slug":1024,"type":16},{"name":18,"slug":19,"type":16},{"slug":1069,"name":1069,"fn":1070,"description":1071,"org":1191,"tags":1192,"stars":26,"repoUrl":27,"updatedAt":1078},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1193,1194],{"name":14,"slug":15,"type":16},{"name":1076,"slug":1077,"type":16},{"slug":1080,"name":1080,"fn":1081,"description":1082,"org":1196,"tags":1197,"stars":26,"repoUrl":27,"updatedAt":1090},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1198,1199,1200],{"name":1086,"slug":1087,"type":16},{"name":1023,"slug":1024,"type":16},{"name":24,"slug":25,"type":16},{"slug":1092,"name":1092,"fn":1093,"description":1094,"org":1202,"tags":1203,"stars":26,"repoUrl":27,"updatedAt":1100},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[1204,1205,1206],{"name":1062,"slug":1063,"type":16},{"name":21,"slug":22,"type":16},{"name":1023,"slug":1024,"type":16},77]