Agent skill

Property Based Testing

by CraftOS-dev in CraftOS-dev/CraftBot

Provides guidance for property-based testing across multiple languages and smart contracts.

MITAuto-check passedBackend & APIs

Install Property Based Testing

skills CLI
$ npx skills add CraftOS-dev/CraftBot --skill property-based-testing -a claude-code

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

GitHub CLI
$ gh skill install CraftOS-dev/CraftBot 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/CraftOS-dev/CraftBot.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
392
Token cost
~1.5k tokens
SKILL.md length
513 words
Files
9 (incl. references)
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

Provides guidance for property-based testing across multiple languages and smart contracts.

  • Reviewing code with serialization/validation/parsing patterns
  • SKILL.md covers When to Invoke (Automatic…, When NOT to Use, Property Catalog (Quick… and Decision Tree, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Designing features

What it does

Property Based Testing is an agent skill from CraftOS-dev/CraftBot. Provides guidance for property-based testing across multiple languages and smart contracts. Use when writing tests, reviewing code with serialization/validation/parsing patterns, designing features, or when property-based testing would provide stronger coverage than example-based tests.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including reference files (for example `README.md`, `references/design.md` and `references/generating.md`).

It sits in Backend & APIs, covering Smart contracts. The repository describes itself as: One agent. Every kind of work. The licence is MIT.

When your agent uses it

  • Reviewing code with serialization/validation/parsing patterns
  • Designing features
  • Property-based testing would provide stronger coverage than example-based tests

Example prompts

  • “Use the property-based-testing skill to provide guidance for property-based testing across multiple languages and smart contracts”
  • “/property-based-testing”

What it can do on your machine

Read from SKILL.md and the folder at commit b50970c. 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

    No scripts in the folder and no shell commands in SKILL.md.

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

  • Network

    No URLs in SKILL.md.

    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 1.5k tokens when it runs, and up to ~11k if it reads all its reference files. Until then it costs about 78 tokens; SKILL.md has 513 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~78
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~11k

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 CraftOS-dev/CraftBot at commit b50970c, republished under its MIT licence (© CraftOS-dev). 513 words, ~1,516 tokens.

Download SKILL.mdSave it as .claude/skills/property-based-testing/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.
name
property-based-testing
description
Provides guidance for property-based testing across multiple languages and smart contracts. Use when writing tests, reviewing code with serialization/validation/parsing patterns, designing features, or when property-based testing would provide stronger coverage than example-based tests.

Property-Based Testing Guide

Use this skill proactively during development when you encounter patterns where PBT provides stronger coverage than example-based tests.

When to Invoke (Automatic Detection)

Invoke this skill when you detect:

  • Serialization pairs: encode/decode, serialize/deserialize, toJSON/fromJSON, pack/unpack
  • Parsers: URL parsing, config parsing, protocol parsing, string-to-structured-data
  • Normalization: normalize, sanitize, clean, canonicalize, format
  • Validators: is_valid, validate, check_* (especially with normalizers)
  • Data structures: Custom collections with add/remove/get operations
  • Mathematical/algorithmic: Pure functions, sorting, ordering, comparators
  • Smart contracts: Solidity/Vyper contracts, token operations, state invariants, access control

Priority by pattern:

PatternPropertyPriority
encode/decode pairRoundtripHIGH
Pure functionMultipleHIGH
ValidatorValid after normalizeMEDIUM
Sorting/orderingIdempotence + orderingMEDIUM
NormalizationIdempotenceMEDIUM
Builder/factoryOutput invariantsLOW
Smart contractState invariantsHIGH

When NOT to Use

Do NOT use this skill for:

  • Simple CRUD operations without transformation logic
  • One-off scripts or throwaway code
  • Code with side effects that cannot be isolated (network calls, database writes)
  • Tests where specific example cases are sufficient and edge cases are well-understood
  • Integration or end-to-end testing (PBT is best for unit/component testing)

Property Catalog (Quick Reference)

PropertyFormulaWhen to Use
Roundtripdecode(encode(x)) == xSerialization, conversion pairs
Idempotencef(f(x)) == f(x)Normalization, formatting, sorting
InvariantProperty holds before/afterAny transformation
Commutativityf(a, b) == f(b, a)Binary/set operations
Associativityf(f(a,b), c) == f(a, f(b,c))Combining operations
Identityf(x, identity) == xOperations with neutral element
Inversef(g(x)) == xencrypt/decrypt, compress/decompress
Oraclenew_impl(x) == reference(x)Optimization, refactoring
Easy to Verifyis_sorted(sort(x))Complex algorithms
No ExceptionNo crash on valid inputBaseline property

Strength hierarchy (weakest to strongest): No Exception → Type Preservation → Invariant → Idempotence → Roundtrip

Decision Tree

Based on the current task, read the appropriate section:

TASK: Writing new tests
  → Read [{baseDir}/references/generating.md]({baseDir}/references/generating.md) (test generation patterns and examples)
  → Then [{baseDir}/references/strategies.md]({baseDir}/references/strategies.md) if input generation is complex

TASK: Designing a new feature
  → Read [{baseDir}/references/design.md]({baseDir}/references/design.md) (Property-Driven Development approach)

TASK: Code is difficult to test (mixed I/O, missing inverses)
  → Read [{baseDir}/references/refactoring.md]({baseDir}/references/refactoring.md) (refactoring patterns for testability)

TASK: Reviewing existing PBT tests
  → Read [{baseDir}/references/reviewing.md]({baseDir}/references/reviewing.md) (quality checklist and anti-patterns)

TASK: Test failed, need to interpret
  → Read [{baseDir}/references/interpreting-failures.md]({baseDir}/references/interpreting-failures.md) (failure analysis and bug classification)

TASK: Need library reference
  → Read [{baseDir}/references/libraries.md]({baseDir}/references/libraries.md) (PBT libraries by language, includes smart contract tools)
Show full SKILL.md (244 more words)Show less

How to Suggest PBT

When you detect a high-value pattern while writing tests, offer PBT as an option:

"I notice encode_message/decode_message is a serialization pair. Property-based testing with a roundtrip property would provide stronger coverage than example tests. Want me to use that approach?"

If codebase already uses a PBT library (Hypothesis, fast-check, proptest, Echidna), be more direct:

"This codebase uses Hypothesis. I'll write property-based tests for this serialization pair using a roundtrip property."

If user declines, write good example-based tests without further prompting.

When NOT to Use PBT

  • Simple CRUD without complex validation
  • UI/presentation logic
  • Integration tests requiring complex external setup
  • Prototyping where requirements are fluid
  • User explicitly requests example-based tests only

Red Flags

  • Recommending trivial getters/setters
  • Missing paired operations (encode without decode)
  • Ignoring type hints (well-typed = easier to test)
  • Overwhelming user with candidates (limit to top 5-10)
  • Being pushy after user declines

Rationalizations to Reject

Do not accept these shortcuts:

  • "Example tests are good enough" - If serialization/parsing/normalization is involved, PBT finds edge cases examples miss
  • "The function is simple" - Simple functions with complex input domains (strings, floats, nested structures) benefit most from PBT
  • "We don't have time" - PBT tests are often shorter than comprehensive example suites
  • "It's too hard to write generators" - Most PBT libraries have excellent built-in strategies; custom generators are rarely needed
  • "The test failed, so it's a bug" - Failures require validation; see interpreting-failures.md
  • "No crash means it works" - "No exception" is the weakest property; always push for stronger guarantees

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

Files

SKILL.md and 8 other files (references) in skills/property-based-testing of CraftOS-dev/CraftBot.

  • SKILL.md
  • README.md
  • references/design.md
  • references/generating.md
  • references/interpreting-failures.md
  • references/libraries.md
  • references/refactoring.md
  • references/reviewing.md
  • references/strategies.md

Open the folder on GitHubat commit b50970c

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 skillCraftOS-dev/CraftBot392—~1.5kAutomated safety check: PassMIT
Fizz Convertpashov/skills1.2k2 repos~3.7kAutomated safety check: PassMIT
Solana Devsolana-foundation/solana-dev-skill571—~3.8kAutomated safety check: PassMIT
Feynman Auditor0xiehnnkta/nemesis-auditor2441 repos~11kAutomated safety check: PassMIT
Smart Contract Auditgreatpie/smart-contract-audit-skill101—~1.1kAutomated safety check: PassNone
RadarAuditware/radar154—~2.1kAutomated safety check: PassGPL-3.0

Similar skills

  • Fizz Convert

    pashov/skills

    Convert English-language properties in PROPERTIES.md (produced by the Fizz skill) into Solidity assertions inside the existing fuzz harness, then flip their checkboxes.

    1.2k GitHub starsUsed in 2 repos~3.7k tokens
    Backend & APIsAuto-check passed
  • Solana Dev

    solana-foundation/solana-dev-skill

    A skill your agent uses when user asks to "build a Solana dapp", "write an Anchor program", "create a token", "debug Solana errors", "set up wallet connection", "test my Solana program", "fuzz my…

    571 GitHub stars~3.8k tokensUpdated 4 days ago
    Backend & APIsAuto-check passed
  • Feynman Auditor

    0xiehnnkta/nemesis-auditor

    Deep business logic bug finder using the Feynman technique. An agent skill from 0xiehnnkta/nemesis-auditor.

    244 GitHub starsUsed in 1 repo~11k tokens
    Backend & APIsAuto-check passed
  • Smart Contract Audit

    greatpie/smart-contract-audit-skill

    Script-backed, out-of-box auditing workflow for Solidity/EVM repositories based on EVMbench detect/patch/exploit methodology.

    101 GitHub stars~1.1k tokensUpdated 7 mo ago
    Backend & APIsAuto-check passed
  • Radar

    Auditware/radar

    Use radar for smart contract security analysis, AST generation, and detection template development.

    154 GitHub stars~2.1k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Solidity Auditor

    Gabson0x/bountyforge

    Security audit of Solidity code while you develop. An agent skill from Gabson0x/bountyforge.

    443 GitHub stars~3.7k tokensUpdated 20 days ago
    Backend & APIsAuto-check passed

More from CraftOS-dev/CraftBot

All 89 skills in this repo
  • Self Improvement

    CraftOS-dev/CraftBot

    Captures learnings, errors, and corrections to enable continuous improvement.

    392 GitHub starsUsed in 5 repos~4.9k tokens
    Auto-check passed
  • Bbc News

    CraftOS-dev/CraftBot

    Fetch and display BBC News stories from various sections and regions via RSS feeds.

    392 GitHub starsUsed in 2 repos~555 tokens
    Auto-check passed
  • Outlook

    CraftOS-dev/CraftBot

    Read, search, and manage Outlook emails and calendar via Microsoft Graph API.

    392 GitHub starsUsed in 2 repos~1.8k tokens
    Auto-check passed
  • Nano Banana Pro

    CraftOS-dev/CraftBot

    Generate/edit images with Nano Banana Pro (Gemini 3 Pro Image).

    392 GitHub starsUsed in 6 repos~1.4k tokens
    Auto-check passed
  • Airweave

    CraftOS-dev/CraftBot

    Context retrieval layer for AI agents across users' applications.

    392 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Telegram Bot Manager

    CraftOS-dev/CraftBot

    Manage and configure Telegram bots for OpenClaw. An agent skill from CraftOS-dev/CraftBot.

    392 GitHub stars~836 tokensUpdated today
    Auto-check passed

Categories

Questions about Property Based Testing

What does Property Based Testing do?

Provides guidance for property-based testing across multiple languages and smart contracts. Property Based Testing is an agent skill from CraftOS-dev/CraftBot. Provides guidance for property-based testing across multiple languages and smart contracts.

When should I use Property Based Testing?

Property Based Testing fits situations like: reviewing code with serialization/validation/parsing patterns; designing features; property-based testing would provide stronger coverage than example-based tests.

How do I install Property Based Testing in Claude Code?

Run `npx skills add CraftOS-dev/CraftBot --skill property-based-testing -a claude-code`. Or copy the skill folder (skills/property-based-testing in CraftOS-dev/CraftBot) 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 CraftOS-dev/CraftBot --skill property-based-testing -a codex`. Or copy the skill folder (skills/property-based-testing in CraftOS-dev/CraftBot) 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 CraftOS-dev/CraftBot --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?

SKILL.md names no scripts, command-line tools or credentials: Property Based Testing is instructions for the agent only.

Does Property Based Testing access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. 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 1.5k tokens (SKILL.md is roughly 6.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 9k tokens, read only when the agent opens those files.

What are the alternatives to Property Based Testing?

Skills that share tags, products or a category with Property Based Testing: Fizz Convert (pashov/skills, 1.2k stars), Solana Dev (solana-foundation/solana-dev-skill, 571 stars), Feynman Auditor (0xiehnnkta/nemesis-auditor, 244 stars) and Smart Contract Audit (greatpie/smart-contract-audit-skill, 101 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?

CraftOS-dev (a GitHub user) maintains it in CraftOS-dev/CraftBot, which has 392 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on October 7, 2026.

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