pbt-verify
Generate property-based tests via fast-check / Hypothesis / proptest, run them, emit VERIFIED / PARTIAL / MISSING with shrunk counterexamples.
Skill by youssefKadaouiAbbassi
Install
Works with Claude Code. Read the repository before you give any tool access to your data.
npx agentmarket install skill/youssefkadaouiabbassi-pbt-verify
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/pbt-verify
Tools it pre-approves 7
From allowed-tools in SKILL.md: the agent may use these without asking you each time.
Bash,Read,Write,Edit,Grep,Glob,Task
What's inside
- Skill name
pbt-verify- Description
- Generate property-based tests via fast-check / Hypothesis / proptest, run them, emit VERIFIED / PARTIAL / MISSING with shrunk counterexamples.
- License
- MIT
- Allowed tools
- Bash,, Read,, Write,, Edit,, Grep,, Glob,, Task
- Instructions
- 134 lines in SKILL.md · view on GitHub
Before installing
- Pre-approves some shell commands
Files (1)
- SKILL.md
SKILL.md (first lines)
# pbt-verify runbook
Delegate property generation to `pbt-verifier` subagent. This skill defines the contract + parsers.
## 1. Stack detection
```bash
PARCEL_ID="$1"
PATHS="$(jq -r '.parcels[] | select(.id=="'"$PARCEL_ID"'") | .paths[]' .forge/dag.json)"
mkdir -p .forge/pbt
STACK=""
echo "$PATHS" | grep -q '\.tsx\?$\|\.js$' && STACK="typescript"
[ -z "$STACK" ] && echo "$PATHS" | grep -q '\.py$' && STACK="python"
[ -z "$STACK" ] && echo "$PATHS" | grep -q '\.rs$' && STACK="rust"
```
## 2. Property derivation table
| Pattern (name / signature) | Property |
|---|---|
| `add`, `or`, `union`, `merge`, `max`, `min` over commutative monoid | **commutativity** `f(a,b) === f(b,a)` |
| `subtract`, `divide`, function composition | **anti-commutativity** `f(a,b) === neg(f(b,a))` or length-preserving |
| `add`, `multiply`, `union`, `merge` | **associativity** |
| op with identity `e` | **identity** `f(a, e) === a` |
| `parse`/`stringify`, `encode`/`decode` | **round-trip** `decode(encode(x)) === x` |
| `sort`, `dedupe`, `normalize`, `canonicalize` | **idempotency** `f(f(x)) === f(x)` |
| total order on input → output | **monotonicity** `a ≤ b ⇒ f(a) ≤ f(b)` |
| function returning a discriminated-union variant | **type-safety** all input domains map to a valid variant |
## 3. Anti-property guardrail (REJECT — never write these as positive properties)
- `subtract(a,b) === subtract(b,a)` → REJECTED: anti-commutative
- `divide(a,b) === divide(b,a)` → REJECTED: anti-commutative
- `compose(f,g) === compose(g,f)` → REJECTED
- `parse(stringify(x)) === x` for floats without explicit tolerance → REJECTED
- `concat(xs, ys) === concat(ys, xs)` → REJECTED: list concat not commutative
- `f(NaN, anything) === anything` → REJECTED: NaN propagates per IEEE-754
If pbt-verifier proposes any → emit `REJECTED: <reason>` instead of writing the test.
## 4. Generate test file
### TypeScript (fast-check)
```bash
cat > ".forge/pbt/${PARCEL_ID}.test.ts" <<EOF
import { test, expect } from "bun:test";
import * as fc from "fast-check";
import { add /* TODO: replace with the parcel's exports */ } from "../../src/<file>";
test("commutativity", () => {
fc.assert(fc.property(fc.integer(), fc.integer(), (a, b) => add(a, b) === add(b, a)), { numRuns: 100 });
});
test("zero-identity", () => {
fc.assert(fc.property(fc.integer(), (a) => add(a, 0) === a), { numRuns: 100 });
});
EOF
```
### Python (Hypothesis)
```bash
cat > ".forge/pbt/test_${PARCEL_ID}_pbt.py" <<EOF
from hypothesis import given, strategies as st
from <module> import add
@given(st.integers(), st.integers())
def test_commutativity(a, b): assert add(a, b) == add(b, a)
@given(st.integers())
def test_zero_identity(a): assert add(a, 0) == a
EOF
```
### Rust (proptest)
```bash
cat > ".forge/pbt/${PARCEL_ID}_pbt.rs" <<EOF
use proptest::prelude::*;
proptest! {
#[test]
fn commutativity(a: i64, b: i64) { prop_assert_eq!(add(a, b), add(b, a)); }
#[test]
fn zero_identity(a: i64) { prop_assert_eq!(add(a, 0), a); }
}
EOF
```
## 5. Execute
```bash
case "$STACK" in
typescript) bun test ".forge/pbt/${PARCEL_ID}.test.ts" 2>&1 | tee ".forge/pbt/${PARCEL_ID}-run.log" ;;
python) pytest ".forge/pbt/test_${PARCEL_ID}_pbt.py" -q 2>&1 | tee ".forge/pbt/${PARCEL_ID}-run.log" ;;
rust) cargo test --test "${PARCEL_ID}_pbt" 2>&1 | tee ".forge/pbt/${PARCEL_ID}-run.log" ;;
esac
EXIT=$?
```
## 6. Parse → verdict
```bash
PASS=$(grep -cE '\(pass\)|^\.|passed' ".forge/pbt/${PARCEL_ID}-run.log" || echo 0)
TOTAL=$(grep -cE '^test|^def test_|fn .* {' ".forge/pbt/${PARCEL_ID}".* 2>/dev/null | head -1 | tr -d ' ')
if [ "${TOTAL:-0}" -eq 0 ]; then
VERDICT="MISSING"; REASON="no-derivable-property"
elif [ "$EXIT" -eq 0 ] && [ "$PASS" -ge "$TOTAL" ]; then
VERDICT="VERIFIED"; REASON=""
else
VERDICT="PARTIAL"
REASON=$(grep -A20 'Counterexample\|Falsified after\|Falsifying example' ".forge/pbt/${PARCEL_ID}-run.log" | head -20 || echo "see run log")
fi
cat > ".forge/pbt/${PARCEL_ID}.json" <<EOF
{
"gate": "pbt-verify",
"parcel": "$PARCEL_ID",
"stack": "$STACK",
"properties_total": $TOTAL,From youssefKadaouiAbbassi/yka-code, MIT.
More from youssefKadaouiAbbassi/yka-code
- 0.471score
hooks-disable
youssefKadaouiAbbassi
[yka-code] Disable a yka-code hook persistently (state file).
SkillCFreshness: CClaude Code +9 - 0.471score
forge
youssefKadaouiAbbassi
Top-level runbook for /forge:forge.
SkillCFreshness: CClaude Code - 0.471score
derive-kind
youssefKadaouiAbbassi
Classify a parcel as pure-fn / io / ui / config / infra to route the right verify gates.
SkillCFreshness: CClaude Code +9 - 0.469score
bootstrap
youssefKadaouiAbbassi
Force-run the forge first-time bootstrap.
SkillCFreshness: CClaude Code +9 - 0.469score
mutation-gate
youssefKadaouiAbbassi
Per-stack mutation testing — Stryker / mutmut / cargo-mutants — gate score ≥ 0.80.
SkillCFreshness: CClaude Code - 0.469score
browser-verify
youssefKadaouiAbbassi
Drive UI parcels through bundled-Chromium headless Playwright via webapp-testing's with_server.py + ProofShot bundle.
SkillCFreshness: CClaude Code - 0.464score
stub-warn
youssefKadaouiAbbassi
Reference for the forge-stub-warn hookify rule blocking unimplemented stubs reaching ship.
SkillCFreshness: CClaude Code +9 - 0.464score
update
youssefKadaouiAbbassi
Force a forge update check or toggle the per-session autoupdate prompt.
SkillCFreshness: CClaude Code +9 - 0.402score
Bun
youssefKadaouiAbbassi
Use when building, testing, or deploying JavaScript/TypeScript applications.
SkillDFreshness: DClaude Code +9 - 0.214score
coding-style
youssefKadaouiAbbassi
No description from the publisher yet.
SkillDFreshness: DClaude Code +9 - 0.211score
evals-first
youssefKadaouiAbbassi
No description from the publisher yet.
SkillDFreshness: DClaude Code +9 - 0.211score
fix-bug
youssefKadaouiAbbassi
No description from the publisher yet.
SkillDFreshness: DClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- May 13, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from youssefKadaouiAbbassi
- 0.471score
hooks-disable
youssefKadaouiAbbassi
[yka-code] Disable a yka-code hook persistently (state file).
SkillCFreshness: CClaude Code +9 - 0.471score
derive-kind
youssefKadaouiAbbassi
Classify a parcel as pure-fn / io / ui / config / infra to route the right verify gates.
SkillCFreshness: CClaude Code +9 - 0.471score
forge
youssefKadaouiAbbassi
Top-level runbook for /forge:forge.
SkillCFreshness: CClaude Code - 0.469score
bootstrap
youssefKadaouiAbbassi
Force-run the forge first-time bootstrap.
SkillCFreshness: CClaude Code +9 - 0.469score
mutation-gate
youssefKadaouiAbbassi
Per-stack mutation testing — Stryker / mutmut / cargo-mutants — gate score ≥ 0.80.
SkillCFreshness: CClaude Code - 0.469score
browser-verify
youssefKadaouiAbbassi
Drive UI parcels through bundled-Chromium headless Playwright via webapp-testing's with_server.py + ProofShot bundle.
SkillCFreshness: CClaude Code
Cite this page
pbt-verify skill. Agent Mart. https://agentmart.dev/skills/youssefkadaouiabbassi-pbt-verify (last updated 2026-10-24)