Agent skill

property-based-testing

Property-based testing (PBT) patterns with fast-check (JS/TS), Hypothesis (Python), and gopter (Go). Generate random inputs, define invariants, shrink failures to minimal cases. Adapted from Trail of Bits. Use when testing pure functions, parsers, serializers, state machines, or any code where example-based tests miss edge cases.

vibeeval521★ · 1 repos on radarProfile →
claude-codeMIT
Install
npx skills add vibeeval/vibecosystem --skill property-based-testing --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 8 KB
Bundled scripts: none
Path: skills/property-based-testing/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 521
Language: C#

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Property-Based Testing Instead of testing specific examples, define properties that must hold for ALL inputs. The framework generates hundreds of random inputs and finds the smallest failing case. ## When to Use PBT | Use Case | Property | |----------|----------| | Serialization roundtrip | `deserialize(serialize(x)) === x` | | Sort function | Output is ordered AND contains same elements | | Parser | Never crashes on any input | | Encoder/decoder | `decode(encode(x)) === x` | | State machine | Invariants hold after any sequence of operations | | Math/financial | Associativity, commutativity, identity, bounds | | API handler | Never returns 500 on valid input | | Data transformation | Output schema matches specification | ## When NOT to Use PBT - UI rendering tests (use visual regression) - Integration tests with external services (use contract tests) - Tests that need specific business scenarios (use example tests) - Tests where the oracle is as complex as the implementation ## fast-check (JavaScript/TypeScript) ### Setup ```bash npm install --save-dev fast-check ``` ### Basic Property ```typescript import fc from 'fast-check' // Property: sorting is idempotent test('sort is idem

What's inside
Steps it walks through
  1. When to Use PBT
  2. When NOT to Use PBT
  3. fast-check (JavaScript/TypeScript)
  4. Setup
  5. Basic Property
  6. Custom Arbitraries
  7. Stateful Testing (Model-Based)
  8. Hypothesis (Python)
  9. Basic Properties
  10. Custom Strategies
  11. gopter (Go)
  12. Property Catalog
  13. Algebraic Properties
  14. Safety Properties
Commands it runs
npm install --save-dev fast-check
pip install hypothesis
go get github.com/leanovate/gopter
More from vibecosystem
All skills →
About this skill
What does the property-based-testing skill do?

Property-based testing (PBT) patterns with fast-check (JS/TS), Hypothesis (Python), and gopter (Go). Generate random inputs, define invariants, shrink failures to minimal cases. Adapted from Trail of Bits. Use when testing pure functions, parsers, serializers, state machines, or any code where example-based tests miss edge cases.

How do I install it?

Run `npx skills add vibeeval/vibecosystem --skill property-based-testing --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From vibeeval/vibecosystem, a repository with 521 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going