Agent skill

Property Based Testing

by vibeeval in vibeeval/vibecosystem

Property-based testing (PBT) patterns with fast-check (JS/TS), Hypothesis (Python), and gopter (Go).

MITAuto-check passedTesting & QA

Install Property Based Testing

skills CLI
$ npx skills add vibeeval/vibecosystem --skill property-based-testing -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install vibeeval/vibecosystem property-based-testing --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/vibeeval/vibecosystem.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/property-based-testing .claude/skills/property-based-testing && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
property-based-testing
GitHub stars
531
Token cost
~2k tokens
SKILL.md length
327 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

Property-based testing (PBT) patterns with fast-check (JS/TS), Hypothesis (Python), and gopter (Go).

  • Testing pure functions
  • SKILL.md covers When to Use PBT, When NOT to Use PBT, fast-check… and Hypothesis (Python), plus 4 more sections
  • Calls npm, pip and go
  • Any code where example-based tests miss edge cases

What it does

Property Based Testing is an agent skill from vibeeval/vibecosystem. 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.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA. It works with Python. The repository describes itself as: AI software team for Claude Code - 138 agents, 295 skills, 73 hooks. Self-learning, multi-agent swarm, autonomous skill evolution. The licence is MIT.

When your agent uses it

  • Testing pure functions
  • Any code where example-based tests miss edge cases

Example prompts

  • “/property-based-testing”

Requirements

  • Python 3
  • Node.js

What it can do on your machine

Read from SKILL.md and the folder at commit 3b763b1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm
    • pip
    • go

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Property Based Testing loads about 2k tokens when it runs. Until then it costs about 89 tokens; SKILL.md has 327 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~89
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from vibeeval/vibecosystem at commit 3b763b1, republished under its MIT licence (© vibeeval). 327 words, ~1,961 tokens.

Download SKILL.mdSave it as .claude/skills/property-based-testing/SKILL.md (or your agent's skills folder).
name
property-based-testing
description
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.

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 CaseProperty
Serialization roundtripdeserialize(serialize(x)) === x
Sort functionOutput is ordered AND contains same elements
ParserNever crashes on any input
Encoder/decoderdecode(encode(x)) === x
State machineInvariants hold after any sequence of operations
Math/financialAssociativity, commutativity, identity, bounds
API handlerNever returns 500 on valid input
Data transformationOutput 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 idempotent', () => {
  fc.assert(
    fc.property(fc.array(fc.integer()), (arr) => {
      const sorted = [...arr].sort((a, b) => a - b)
      const sortedTwice = [...sorted].sort((a, b) => a - b)
      expect(sorted).toEqual(sortedTwice)
    })
  )
})

// Property: serialization roundtrip
test('JSON roundtrip preserves data', () => {
  fc.assert(
    fc.property(fc.jsonValue(), (value) => {
      expect(JSON.parse(JSON.stringify(value))).toEqual(value)
    })
  )
})
Custom Arbitraries
typescript
// Generate valid email addresses
const emailArb = fc.tuple(
  fc.stringOf(fc.constantFrom(...'abcdefghijklmnopqrstuvwxyz0123456789'.split('')), { minLength: 1 }),
  fc.constantFrom('gmail.com', 'example.com', 'test.org')
).map(([local, domain]) => `${local}@${domain}`)

// Generate valid user objects
const userArb = fc.record({
  id: fc.uuid(),
  name: fc.string({ minLength: 1, maxLength: 100 }),
  email: emailArb,
  age: fc.integer({ min: 0, max: 150 }),
  role: fc.constantFrom('admin', 'user', 'viewer')
})

// Generate valid but adversarial strings
const adversarialStringArb = fc.oneof(
  fc.constant(''),
  fc.constant(' '),
  fc.constant('\0'),
  fc.constant('<script>alert(1)</script>'),
  fc.constant("Robert'); DROP TABLE users;--"),
  fc.constant('../../../etc/passwd'),
  fc.unicodeString(),
  fc.string({ minLength: 10000, maxLength: 100000 })  // Very long
)
Stateful Testing (Model-Based)
typescript
// Test a cache against a simple Map model
class CacheModel {
  private model = new Map<string, string>()

  set(key: string, value: string): void { this.model.set(key, value) }
  get(key: string): string | undefined { return this.model.get(key) }
  delete(key: string): void { this.model.delete(key) }
  size(): number { return this.model.size }
}

const cacheCommands = [
  fc.tuple(fc.string(), fc.string()).map(([k, v]) => ({
    check: (model: CacheModel) => true,
    run: (model: CacheModel, real: Cache) => {
      model.set(k, v)
      real.set(k, v)
      expect(real.get(k)).toBe(model.get(k))
    },
    toString: () => `set(${k}, ${v})`
  })),
  fc.string().map((k) => ({
    check: (model: CacheModel) => true,
    run: (model: CacheModel, real: Cache) => {
      model.delete(k)
      real.delete(k)
      expect(real.get(k)).toBe(model.get(k))
    },
    toString: () => `delete(${k})`
  }))
]

test('cache behaves like Map', () => {
  fc.assert(
    fc.property(fc.commands(cacheCommands), (cmds) => {
      const model = new CacheModel()
      const real = new Cache()
      fc.modelRun(() => ({ model, real }), cmds)
    })
  )
})

Hypothesis (Python)

Setup
bash
pip install hypothesis
Basic Properties
python
from hypothesis import given, strategies as st, settings

@given(st.lists(st.integers()))
def test_sort_preserves_length(xs):
    assert len(sorted(xs)) == len(xs)

@given(st.lists(st.integers()))
def test_sort_preserves_elements(xs):
    assert sorted(sorted(xs)) == sorted(xs)

@given(st.text())
def test_encode_decode_roundtrip(s):
    assert s.encode('utf-8').decode('utf-8') == s

# With settings
@settings(max_examples=1000, deadline=None)
@given(st.dictionaries(st.text(), st.integers()))
def test_dict_operations(d):
    import json
    assert json.loads(json.dumps(d)) == d
Custom Strategies
python
from hypothesis import strategies as st

# Valid email strategy
emails = st.builds(
    lambda local, domain: f"{local}@{domain}",
    local=st.from_regex(r'[a-z0-9]{1,20}', fullmatch=True),
    domain=st.sampled_from(['gmail.com', 'example.com'])
)

# Valid user strategy
users = st.fixed_dictionaries({
    'name': st.text(min_size=1, max_size=100),
    'email': emails,
    'age': st.integers(min_value=0, max_value=150),
    'role': st.sampled_from(['admin', 'user', 'viewer'])
})

gopter (Go)

Setup
bash
go get github.com/leanovate/gopter
Basic Property
go
func TestSortIdempotent(t *testing.T) {
    properties := gopter.NewProperties(gopter.DefaultTestParameters())

    properties.Property("sort is idempotent", prop.ForAll(
        func(xs []int) bool {
            sorted := make([]int, len(xs))
            copy(sorted, xs)
            sort.Ints(sorted)

            sortedTwice := make([]int, len(sorted))
            copy(sortedTwice, sorted)
            sort.Ints(sortedTwice)

            return reflect.DeepEqual(sorted, sortedTwice)
        },
        gen.SliceOf(gen.Int()),
    ))

    properties.TestingRun(t)
}

Property Catalog

Algebraic Properties
PropertyDefinitionExample
Identityf(x, identity) === xadd(x, 0) === x
Commutativityf(a, b) === f(b, a)add(a, b) === add(b, a)
Associativityf(f(a, b), c) === f(a, f(b, c))add(add(a, b), c) === add(a, add(b, c))
Idempotencyf(f(x)) === f(x)sort(sort(xs)) === sort(xs)
Roundtripg(f(x)) === xdecode(encode(x)) === x
Invariantproperty(f(x)) === truelength(sort(xs)) === length(xs)
Safety Properties
PropertyCheck
No crashFunction never throws for any valid input
Bounded outputOutput size is proportional to input size
No mutationInput is not modified by the function
DeterministicSame input always produces same output
MonotonicIf a <= b then f(a) <= f(b)

Shrinking

When a property fails, the framework automatically shrinks the failing input to the smallest case that still fails:

Original failing input: [482, -1, 0, 99, -384, 7, 42, 0, -1]
Shrunk to: [1, 0]

This tells you the bug is about: handling zero in a list with other elements

Tips:

  • Custom arbitraries should define custom shrinkers
  • If shrinking takes too long, limit with { endOnFailure: true }
  • Shrunk examples make great regression tests

Integration with vibecosystem

  • tdd-guide agent: Recommend PBT for pure functions and serialization
  • qa-engineer agent: Use PBT for edge case discovery
  • arbiter agent: Run PBT suites as part of test validation
  • mocksmith agent: Generate test data using PBT arbitraries

Inspired by Trail of Bits property-based-testing plugin.

© vibeeval, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/property-based-testing of vibeeval/vibecosystem.

Open the folder on GitHubat commit 3b763b1

Compare with similar skills

Property Based Testing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Property Based Testing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Property Based Testing this skillvibeeval/vibecosystem531—~2kAutomated safety check: PassMIT
Web Application Testinganthropics/skills180k51 repos~966Automated safety check: PassApache-2.0
OpenHarness End-to-End EvalsHKUDS/OpenHarness16k1 repos~2.1kAutomated safety check: NotesMIT
Adk Verify Snippetsgoogle/adk-python22k—~1.4kAutomated safety check: PassApache-2.0
Apple Container Test RunnerRustPython/RustPython22k—~467Automated safety check: PassMIT
JSON Repair Docs Demo Local Testmangiucugna/json_repair5.1k—~549Automated safety check: PassMIT

Similar skills

  • Web Application Testing

    anthropics/skills

    Official

    Tests local web applications with Python Playwright scripts, checking frontend behavior, capturing screenshots and reading browser console logs.

    180k GitHub starsUsed in 51 repos~966 tokens
    Testing & QAAuto-check passed
  • Validates OpenHarness features by running real multi-turn agent loops with live LLM calls against an unfamiliar codebase, checking actual tool execution.

    16k GitHub starsUsed in 1 repo~2.1k tokens
    Testing & QAAuto-check: notes
  • Adk Verify Snippets

    google/adk-python

    Official

    Checks that every Python code block in a Markdown file actually compiles and runs, by extracting each block to a temporary file, executing it in an isolated subprocess, and writing a pass/fail…

    22k GitHub stars~1.4k tokensUpdated today
    Testing & QAAuto-check passed
  • Apple Container Test Runner

    RustPython/RustPython

    Runs RustPython tests inside a Linux container built with Apple's container CLI, so macOS users can compare Linux results with their local ones.

    22k GitHub stars~467 tokensUpdated today
    Testing & QAAuto-check passed
  • JSON Repair Docs Demo Local Test

    mangiucugna/json_repair

    Runs the json_repair docs demo against a local Flask API and static server, so changes to docs/app.py or the docs UI are checked end to end before publishing.

    5.1k GitHub stars~549 tokensUpdated 6 days ago
    Testing & QAAuto-check passed
  • Official

    A skill your agent uses when a user asks to wobble ty constraint ordering, check constraint-set or TDD ordering determinism, test reversed constraint/typevar IDs, or investigate nondeterministic ty…

    50k GitHub stars~838 tokensUpdated today
    Testing & QAAuto-check passed

More from vibeeval/vibecosystem

All 12 skills in this repo
  • Agent Benchmark

    vibeeval/vibecosystem

    Framework for measuring and tracking agent response quality over time.

    531 GitHub stars~2.9k tokensUpdated 2 mo ago
    Auto-check passed
  • Differential Review

    vibeeval/vibecosystem

    Security-focused differential code review with blast radius analysis, risk-adaptive depth (DEEP/FOCUSED/SURGICAL), git history correlation, and structured finding format.

    531 GitHub stars~1.6k tokensUpdated 2 mo ago
    Auto-check passed
  • Factcheck Guard

    vibeeval/vibecosystem

    A skill your agent uses when making any factual claim about the codebase — existence, absence, or behavior.

    531 GitHub stars~2.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Fp Check

    vibeeval/vibecosystem

    Systematic false positive verification for security findings.

    531 GitHub stars~1.6k tokensUpdated 2 mo ago
    Auto-check passed
  • N8n Workflows

    vibeeval/vibecosystem

    n8n otomasyon workflow'lari. An agent skill from vibeeval/vibecosystem.

    531 GitHub stars~3.3k tokensUpdated 2 mo ago
    Auto-check passed
  • Notepad System

    vibeeval/vibecosystem

    A skill your agent uses when context compression is imminent, when resuming a session, or when preserving critical decisions across long tasks.

    531 GitHub stars~1.7k tokensUpdated 2 mo ago
    Auto-check passed

Works with

Categories

Questions about Property Based Testing

What does Property Based Testing do?

Property-based testing (PBT) patterns with fast-check (JS/TS), Hypothesis (Python), and gopter (Go). Property Based Testing is an agent skill from vibeeval/vibecosystem. Property-based testing (PBT) patterns with fast-check (JS/TS), Hypothesis (Python), and gopter (Go).

When should I use Property Based Testing?

Property Based Testing fits situations like: testing pure functions; any code where example-based tests miss edge cases.

How do I install Property Based Testing in Claude Code?

Run `npx skills add vibeeval/vibecosystem --skill property-based-testing -a claude-code`. Or copy the skill folder (skills/property-based-testing in vibeeval/vibecosystem) into .claude/skills/property-based-testing in your project. Claude Code loads it when a task matches its description.

How do I install Property Based Testing in Codex?

Run `npx skills add vibeeval/vibecosystem --skill property-based-testing -a codex`. Or copy the skill folder (skills/property-based-testing in vibeeval/vibecosystem) into .agents/skills/property-based-testing in your project. Codex loads it when a task matches its description.

Can I use Property Based Testing in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add vibeeval/vibecosystem --skill property-based-testing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/property-based-testing, .gemini/skills/property-based-testing, .github/skills/property-based-testing and .opencode/skills/property-based-testing in your project.

What does Property Based Testing need to run?

Going by SKILL.md and its folder, Property Based Testing needs the command-line tools its instructions call (npm, pip and go). Our summary lists: Python 3; Node.js.

Does Property Based Testing access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Property Based Testing safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Property Based Testing use?

Property Based Testing is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Property Based Testing use?

About 2k tokens (SKILL.md is roughly 7.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Property Based Testing?

Skills that share tags, products or a category with Property Based Testing: Web Application Testing (anthropics/skills, 180k stars), OpenHarness End-to-End Evals (HKUDS/OpenHarness, 16k stars), Adk Verify Snippets (google/adk-python, 22k stars) and Apple Container Test Runner (RustPython/RustPython, 22k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Property Based Testing?

vibeeval (a GitHub user) maintains it in vibeeval/vibecosystem, which has 531 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on August 8, 2026.

Source: vibeeval/vibecosystem on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.