c/security › command
0votes

Property-based testing (Trail of Bits)

Skill
submitted by u/client to c/security · 0 uses

Write and review property-based tests with Hypothesis, fast-check, proptest and more.

Helps Claude test whole input domains rather than a few hand-picked examples. It offers a catalog of properties worth testing (round-trips, idempotence, ordering, invariants) for parsers, serializers, validators, numeric types and smart contracts. It also flags property tests that quietly assert nothing. Covers Hypothesis, fast-check, proptest, jqwik, rapid, and Echidna/Medusa for Solidity.

Try asking:

  • "Add Hypothesis tests for my JSON encoder and decoder"
  • "Are my fast-check tests actually checking anything?"
  • "Write invariant tests for this ERC-20 contract"

Source: trailofbits/skills · CC-BY-SA-4.0 · by Trail of Bits

0 commentsreport

Install this skill

Skills are folders with a SKILL.md file. Claude loads one on its own when a task matches its description. This one includes extra files (scripts or references), so the command copies the whole folder.

Claude Code plugin (easiest, stays up to date)
/plugin marketplace add trailofbits/skills
/plugin install property-based-testing@trailofbits
Claude Code: for every project
npx degit trailofbits/skills/plugins/property-based-testing/skills/property-based-testing ~/.claude/skills/property-based-testing
Claude Code: this project only (commit it to share with your team)
npx degit trailofbits/skills/plugins/property-based-testing/skills/property-based-testing .claude/skills/property-based-testing

Made by Trail of Bits, CC-BY-SA-4.0 license. Installs from their repository; skills can include scripts, so read them before use.

In the Claude apps, zip the folder and upload it under Settings → Capabilities → Skills.

More from c/security

See all of c/security →
0 comments

Log in to join the discussion.