Skip to main content
skill CX Codex

property-based-testing — Claude Code skill: tests and installation

This skill helps create and inspect tests that check rules across generated inputs. Use it for parsers, serialization pairs, data structures, and Solidity contract invariants.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add trailofbits/skills --skill property-based-testing -a claude-code
Open on GitHub

What property-based-testing does

The skill helps choose meaningful claims about code, such as whether a conversion can be reversed or a normalization step stays stable when repeated. It can draft tests, assess an existing suite, and investigate a failure to distinguish a flawed claim from a defect in the code.

It covers Hypothesis, fast-check, proptest, jqwik, and rapid, plus Echidna and Medusa for Solidity invariants. Its supporting guides address generators, test review, failure analysis, library selection, and code changes that expose a testable property.

For a project without a property-testing library, adding that dependency remains the user's call; the skill suggests a test rather than installing a library. It is not aimed at binary fuzzing, mutation testing, static analysis, benchmarks, or end-to-end UI checks.

What it helps with

  • Test that encoding can be reversed by decoding
  • Define useful claims for a parser or normalizer
  • Spot vacuous or self-confirming test assertions
  • Determine whether a shrunk counterexample reveals a bug
  • Check state invariants in Solidity contracts

Example prompts for the agent

  • Write property-based tests for the encode and decode pair.
  • Review the @given tests and find assertions that cannot catch a bug.
  • Inspect this failing test's counterexample and decide whether its property is sound.

How to install property-based-testing

1Skills CLI (Vercel)

npx skills add trailofbits/skills --skill property-based-testing -a claude-code

2Manually: put the files in place

~/.claude/skills/property-based-testing/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/property-based-testing/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about property-based-testing

How do I install property-based-testing in Claude Code?

Run npx skills add trailofbits/skills --skill property-based-testing -a claude-code. The skill file is at ~/.claude/skills/property-based-testing/SKILL.md.

What does property-based-testing do?

It helps build and review tests that check defined rules against generated inputs. It also guides analysis of failed tests.

Will the skill add a testing library to my project?

No. If the project does not already use a property-testing library, the user decides whether to add that dependency.

Similar skills

All skills for Testing and QA →

From the same set77

codeql Runs interprocedural taint tracking and data flow analysis using CodeQL. Helps detect security flaws across nine programming languages. CX Codex +1 8,300installs supply-chain-risk-auditor Audits project dependencies for supply-chain risks, including advisories and signs of abandoned packages. Use it before a dependency review or security engagement. CX Codex +1 8,100installs secure-workflow-guide Guides smart contracts through Trail of Bits' 5-step security audit on check-in or before deployment. It runs static analysis, generates visual charts, and prepares fuzzing tests. CX Codex +1 7,400installs code-maturity-assessor This skill evaluates smart contracts and blockchain code across nine maturity categories. It produces evidence-backed ratings and a ranked improvement plan. CX Codex +1 7,100installs fp-check Walks a suspected vulnerability through verification and returns a TRUE POSITIVE or FALSE POSITIVE verdict backed by evidence. Built for confirming findings, not hunting new ones. CX Codex +1 7,000installs sharp-edges Audits API designs and configuration schemas for developer footguns. Flags dangerous defaults and fragile interfaces where the easiest path causes security vulnerabilities. CX Codex +1 6,900installs audit-context-building Maps assumptions, guarantees, and call chains in unfamiliar source code before vulnerability hunting starts. Useful for audits and threat modeling. CX Codex +1 6,800installs agentic-actions-auditor Inspects GitHub Actions workflows for prompt injection risks and insecure AI agent setups. Catches attacker inputs leaking into prompts via event contexts or environment variables. CX Codex +1 6,700installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor