Agent skill · Testing & QA

hypothesis-testing

Property-based testing with Hypothesis for discovering edge cases and validating invariants. Use when implementing comprehensive test coverage, testing complex logic with many inputs, or validating mathematical properties and invariants across input domains. Triggered by: hypothesis, property-based testing, @given, strategies, generative testing.

foryourhealth111-pixelgithub.com/foryourhealth111-pixelGitHub ↗
claude-codecodexApache-2.0
Install
npx skills add foryourhealth111-pixel/Vibe-Skills --skill hypothesis-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: 23 KB
Bundled scripts: none
Path: bundled/skills/hypothesis-testing/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 2,593
Language: Python
Read our review of the source →

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

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Instructs the agent to perform property-based testing using Hypothesis to automatically generate test inputs, discover edge cases, and validate invariants across input domains. It covers core ideas, installation, configuration, basic usage, strategies (built-in, composite), advanced patterns (stateful testing, shrinking), and targeted testing. The agent is guided to write tests that use @given with various strategies to verify properties like commutativity, associativity, and invariant behavior, and demonstrates how Hypothesis stores failing examples, shrinks them, and can target specific input characteristics.

How it works

The skill outlines using Hypothesis by importing given and strategies, decorating test functions with @given and appropriate strategies, and optionally using example, assume, settings, and target to guide exploration. It provides concrete code examples for:

  • Simple property tests (e.g., test_absolute_value_non_negative, test_addition_associative, test_string_length, test_string_concatenation).
  • Testing functions with validations (safe_divide, divide by zero behavior).
  • Built-in and composite strategies (integers, text, lists, dictionaries, composite strategies).
  • Data classes and models through builds, validation of properties, and serialization round-trips.
  • Strategy combinators (one_of, sampled_from, lists with constraints, dictionaries, tuples, fixed_dictionaries, recursive).
  • Advanced patterns (stateful testing with RuleBasedStateMachine and invariants, shrinking and example database, targeted property testing with target, async property tests).
  • When to use Hypothesis vs example-based tests. The skill instructs the agent to follow these patterns to verify code properties across inputs, record statistics, and manage profiles and configurations.

When to use it

Use Hypothesis when you need to test mathematical properties, invariants across inputs, edge-case discovery, serialization round-trips, and APIs with many parameters. It also covers using Hypothesis for property testing of asynchronous code and large input spaces.

What it can touch

The skill references tool usage including:

  • importing: from hypothesis import given, example, assume, settings, target
  • strategies: import hypothesis.strategies as st
  • decorators and patterns: @given, @example, @settings, @target
  • integration with tests: pytest, pytest.mark.asyncio
  • composite strategies via @composite and builds
  • stateful testing via RuleBasedStateMachine
  • actions like shrinking, example database at .hypothesis/examples

Caveats

The skill describes configuration defaults for Hypothesis (max_examples, deadline, verbosity, derandomize, database), profiles for dev/ci/debug, and behaviors like shrinking failing inputs and storing them for replay. It notes potential overhead in generating many examples and guidance on enabling deterministic runs or adjusting profiles for CI. License and repository details are provided in the FACTS, including Apache-2.0 license and the source location.

From the SKILL.md

# Hypothesis Property-Based Testing Hypothesis is a powerful property-based testing library that automatically generates test cases to find edge cases and validate properties of your code. ## Core Concept **Traditional example-based testing:** ```python def test_addition(): assert add(2, 3) == 5 assert add(0, 0) == 0 assert add(-1, 1) == 0 ``` **Property-based testing with Hypothesis:** ```python

More from Vibe-Skills
All skills →
About this skill
What does the hypothesis-testing skill do?

Property-based testing with Hypothesis for discovering edge cases and validating invariants. Use when implementing comprehensive test coverage, testing complex logic with many inputs, or validating mathematical properties and invariants across input domains. Triggered by: hypothesis, property-based testing, @given, strategies, generative testing.

How do I install it?

Run `npx skills add foryourhealth111-pixel/Vibe-Skills --skill hypothesis-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 foryourhealth111-pixel/Vibe-Skills, a repository with 2,593 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