[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75HMD5PYE9Q9S04FKBANNZ0":3,"skill-same:01M75HMD5PYE9Q9S04FKBANNZ0":80},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M75HMD5PYE9Q9S04FKBANNZ0","property-based-testing",null,"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.","agisota\u002Fold-one","agisota","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F121413592?v=4","01M75B4BRNT67EC1NDRT8QZEP2","01M75B4BS7QR9VP580MSCPTS3X",3,"MIT","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fproperty-based-testing\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\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","# 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",{"name":5,"description":7},"main","f37de8f681f0c0ca0e0ebab6e5fddf764ca7553d","skills\u002Fproperty-based-testing",1,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one","https:\u002F\u002Fagisota.github.io\u002Fold-one\u002F","https:\u002F\u002Fgithub.com\u002Fagisota","pzd.world","2026-07-04 22:32:06",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add agisota\u002Fold-one --skill property-based-testing",{"tool":38,"command":39},"bunx","bunx skills add agisota\u002Fold-one --skill property-based-testing",{"tool":41,"command":42},"pnpm","pnpm dlx skills add agisota\u002Fold-one --skill property-based-testing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fproperty-based-testing\u002FSKILL.md",true,[46,52,56,60,64,68,72,76],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"README.md","REFERENCE","参考文档",3215,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fproperty-based-testing\u002FREADME.md",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Fdesign.md",5537,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fproperty-based-testing\u002Freferences\u002Fdesign.md",{"path":57,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Fgenerating.md",6139,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fproperty-based-testing\u002Freferences\u002Fgenerating.md",{"path":61,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":62,"sourceHtmlUrl":63},"references\u002Finterpreting-failures.md",7025,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fproperty-based-testing\u002Freferences\u002Finterpreting-failures.md",{"path":65,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":66,"sourceHtmlUrl":67},"references\u002Flibraries.md",2931,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fproperty-based-testing\u002Freferences\u002Flibraries.md",{"path":69,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":70,"sourceHtmlUrl":71},"references\u002Frefactoring.md",5638,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fproperty-based-testing\u002Freferences\u002Frefactoring.md",{"path":73,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":74,"sourceHtmlUrl":75},"references\u002Freviewing.md",5795,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fproperty-based-testing\u002Freferences\u002Freviewing.md",{"path":77,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Fstrategies.md",2998,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fproperty-based-testing\u002Freferences\u002Fstrategies.md",[81,88,95,104,111,118],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M75KRGZWQWE9JDBS6RX42NWV","zoom-out","Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fzoom-out\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":18},"01M75KRCZHKE0ZYAQFFYHS0YNP","zeroize-audit","Detects missing zeroization of sensitive data in source code and identifies zeroization removed by compiler optimizations, with assembly-level analysis, and control-flow verification. Use for auditing C\u002FC++\u002FRust code handling secrets, keys, passwords, or other sensitive data.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fzeroize-audit\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":99,"licenseFileUrl":100,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":18},"01M75KR94KYQ30DTE1P9WNDAE0","yeet","Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyeet\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyeet\u002FSKILL.md",[],[],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":18},"01M75KR3H13YJ9QHMD49818FA1","yara-rule-authoring","Guides authoring of high-quality YARA-X detection rules for malware identification. Use when writing, reviewing, or optimizing YARA rules. Covers naming conventions, string selection, performance optimization, migration from legacy YARA, and false positive reduction. Triggers on: YARA, YARA-X, malware detection, threat hunting, IOC, signature, crx module, dex module.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyara-rule-authoring\u002FSKILL.md",[],[],{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":18},"01M75KQMPY8A4Y8XTDD2DT0M9T","x-twitter-growth","X\u002FTwitter growth engine for building audience, crafting viral content, and analyzing engagement. Use when the user wants to grow on X\u002FTwitter, write tweets or threads, analyze their X profile, research competitors on X, plan a posting strategy, or optimize engagement. Complements social-content (generic multi-platform) with X-specific depth: algorithm mechanics, thread engineering, reply strategy, profile optimization, and competitive intelligence via web search.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fx-twitter-growth\u002FSKILL.md",[],[],{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":18},"01M75KQHNZ0ANZNJGZY6M8MDAK","x-api","X\u002FTwitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fx-api\u002FSKILL.md",[],[]]