property-based-testing
Skill0 starsChanged 4 days agoMITView on GitHub
Use when example tests can't cover the input space — parsers, serializers, encoders, money math, state machines, anything with a roundtrip or invariant. Assert properties that hold for all inputs, let the framework generate cases and shrink failures to a minimal counterexample.
18 other projects use a version of this.
Adopted by
Most recently taken up by
- lecluse-net/galaristheir own version, first seen Oct 30, 2026
- davidanthonyn/claude-skillstheir own version, first seen Oct 20, 2026
- allanninal/claude-code-skillstheir own version, first seen Oct 17, 2026
- alialavia/pbt-skillstheir own version, first seen Oct 16, 2026
- mike22890/opencode-skills-entheir own version, first seen Oct 15, 2026
- scoobydont-666/shared-claude-skillstheir own version, first seen Oct 13, 2026
Used with
Projects with it also use observability, simplify and 3 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
OpenAISkillobservability
Vercel Observability expert guidance — Drains (logs, traces, speed insights, web analytics), Web Analytics, Speed Insights, runtime logs, custom events, OpenTelemetry integration, and monitoring dashboards. Use when instrumenting, debugging, or optimizing application performance and user experience on Vercel.
Also in 3 projects that use this
Hugging FaceSkillsimplify
Refactor code after tests pass. The "Refactor" phase of Red-Green-Refactor.
Also in 3 projects that use this
Microsoft AzureSkillgit-workflow
Squad branching model: dev-first workflow with insiders preview channel
Also in 3 projects that use this
SentrySkillsecurity-review
Finds exploitable application security vulnerabilities in code changes. Use for Warden security scans, appsec review, OWASP-style checks, authentication or authorization bugs, injection, XSS, SSRF, path traversal, secrets, unsafe crypto, webhook verification, open redirects, or sensitive data exposure.
Also in 3 projects that use this
NVIDIASkillresearch
Before designing a feature, research how comparable libraries solve the problem, check best practices, known pitfalls, and upstream changes. Use when starting a new feature, investigating an unfamiliar area, or the user asks to research something.
Also in 3 projects that use this
Other versions18 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 18
- an8079/take-skills★ 4same name
- igmarin/elixir-phoenix-skills★ 4same name
- kimtth/agent-skill-100-lines-or-less★ 2same name
- rmusser01/tldw-stuff★ 2same name
- alialavia/pbt-skills★ 1same name
- allanninal/claude-code-skills★ 1same name
- lecluse-net/galaris★ 1same name
- mejbaurbahar/software-tester-skills★ 1same name
- mike22890/opencode-skills-cn★ 1same name
- mike22890/opencode-skills-en★ 1same name
8 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository108 other files it gives its agents.
- adaptive-estimationSkill
- adaptive-loop-budgetingSkill
- adopt-and-deleteSkill
- adversarial-reviewSkill
- agent-drives-uiSkill
- agentic-coding-loopSkill
- agent-otel-trajectorySkill
- agents-as-iac-modulesSkill
- ascii-ui-mockupsSkill
- authoring-html-emailSkill
- authoring-skills-vs-mcpSkill
- batched-ssh-enumerationSkill
- c4-architectureSkill
- challenge-the-premiseSkill
- codegraph-bootstrapSkill
- codegraph-worktree-startupSkill
- colocated-pod-tolerationsSkill
- command-creatorSkill
- complexity-budgetsSkill
- connector-readinessSkill
- context-anchored-patchingSkill
- continuous-issue-resolutionSkill
- credential-proxySkill
- criticality-tiered-reportingSkill
- data-connector-buildingSkill
- declarative-firstSkill
- disk-pressure-forensicsSkill
- early-return-over-elseSkill
- email-triageSkill
- enums-codify-behaviorSkill
- ephemeral-workspace-lifecycleSkill
- event-sourcingSkill
- evidence-claim-boundariesSkill
- exhaustive-matchSkill
- feature-coverage-not-just-line-coverageSkill
- full-disk-forensicsSkill
- gate-before-pushSkill
- github-pr-shepherdingSkill
- graceful-shutdown-stateful-agentsSkill
- grounded-generationSkill
- iac-incident-responseSkill
- iac-not-ad-hocSkill
- instrumented-service-scaffoldSkill
- interface-over-conditionalsSkill
- knowledge-routingSkill
- lean-on-oss-standardsSkill
- live-money-disciplineSkill
- live-state-verificationSkill
- loop-governance-and-learningSkill
- low-level-executor-task-specSkill
- map-dispatch-over-conditionalsSkill
- merge-conflict-disciplineSkill
- mermaid-diagramsSkill
- oke-arc-runners-opentofuSkill
- orchestrate-agySkill
- orchestrate-claudeSkill
- orchestrate-codexSkill
- orchestrate-geminiSkill
- otel-emit-at-willSkill
- parameter-designSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 17 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 46
Check required state, proofs and unrelated fields after every action.
- Distinctive: line 53
Observation: when an API promises read-only inspection, assert no store write, replacement or fsync.
- Distinctive: line 61
If stored state is unexpectedly large, inspect metadata and the serialization and mutation paths first.
“Common” is measured: kept by at least 6 in 10 of the 17 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Property-Based Testing
Example tests check the handful of inputs you thought of. Property-based tests check a property against thousands the framework generates — and when one fails, it shrinks the failure to the smallest input that still breaks, handing you a minimal repro instead of a haystack. Reach for it where the input space is too big to enumerate and a clear invariant exists.
Where it earns its keep
- Roundtrips:
decode(encode(x)) == xfor allx— serializers, parsers, protobuf/JSON codecs, compression. - Invariants: a sorted list is sorted and a permutation of the input; a balance never goes negative; a state machine never reaches an illegal state.
- Equivalence / oracle: the fast/new implementation agrees with the slow/reference one for all inputs (the parallel-run check in a rewrite).
- Idempotence / commutativity:
f(f(x)) == f(x);apply(a,b) == apply(b,a).
Finding the property
The skill is naming the property, not writing the generator. Ask: what must be true regardless of the input? Common shapes — "there and back" (roundtrip), "different path, same result" (oracle/commutativity), "some things never change" (invariant), "doing it twice = doing it once" (idempotence). If you can't state one, the code may not have a crisp contract yet — that's itself a finding.
Shape of a test
from hypothesis import given, strategies as st
@given(st.binary())
def test_roundtrip(payload):
assert decode(encode(payload)) == payload # holds for ALL payloadsStateful histories and read-only observations
For history-bearing stores, generate valid action sequences against a small reference model: repeated updates, ownership changes, observations and reloads. Check required state, proofs and unrelated fields after every action; shrink the sequence, not just its final input.
- Growth: bound encoded bytes, retained-record counts and nesting against the required retained payload at increasing sequence lengths. Include an increasing-payload control. If each event should be retained once, repeated fixed-size changes must not recursively embed earlier histories.
- Observation: when an API promises read-only inspection, assert no store write, replacement or fsync. Unchanged decoded state or bytes alone can hide a same-byte rewrite. Check file identity/mtime or spy persistence calls; account separately for declared cache or telemetry effects.
- Controls: exercise updates alone, transfers alone, interleaved actions, repeated reads and reloads. Retain legitimate history and required evidence; a smaller file obtained by losing records is not a passing result.
If stored state is unexpectedly large, inspect metadata and the serialization and mutation paths first. Reproduce with a tiny owned fixture under event, byte and time limits before loading, copying or hashing the full store. Keep any necessary production inspection within existing ownership and resource bounds; synthetic timings do not measure production latency.
Discipline
- Assert behavior, not the implementation — a property restating the code proves nothing.
- Save the shrunk counterexample as a regression example test — property tests find the bug; a pinned example keeps it dead (pairs with regression-ratchet).
- Constrain generators to the real domain (valid ranges, encodings) so failures are real bugs, not "we never accept that input anyway."
- Don't replace example tests — keep readable examples for the common path; add properties for the space you can't enumerate. They're complementary.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

