Adversarial risk exploration and falsification-first test matrix workflow (`zprobe_*` MCP tools). Use before writing tests or finalizing non-trivial logic, concurrency, database, financial, or architectural changes to surface non-obvious failure modes and coverage gaps.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Z Probe?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/kzxl-z-probe)
---
name: z-probe
description: Adversarial risk exploration and falsification-first test matrix workflow (`zprobe_*` MCP tools). Use before writing tests or finalizing non-trivial logic, concurrency, database, financial, or architectural changes to surface non-obvious failure modes and coverage gaps.
---
# Z-Probe — Adversarial Risk Exploration & Test Matrix
Use `zprobe_*` MCP tools to convert code or unified diffs into a structured, grounded risk graph and falsification-first test specifications instead of generating generic happy-path tests.
## 5-Step Workflow
1. **Extract Grounded Failure Surface (`zprobe_surface`)**:
- Pass `files`, `diff`, or `use_git_diff: true` (add `deep: true` on complex/risky changes to also ingest Roslyn/SARIF, `tsc`, `ruff`, `go vet`, or native Python/TS AST findings; add `perspectives: true` on high-stakes multi-module changes to generate role-based exploration briefs for `ATTACKER`, `CHAOS_CONCURRENCY`, and `DOMAIN_AUDITOR` plus the `SKEPTIC` protocol).
- Combines 3 layers: (1) 7-axis regex/structural heuristics + cross-file `z-token` call-graph taint (`TAINT_DATAFLOW_SINK`) & caller-guard suppression, (2) real LCOV/Cobertura/Istanbul coverage reports + git bugfix churn, and (3) opt-in compiler/AST diagnostics.
- Inspect returned `FACT` anchors, `structural_findings`, `graph_context`, `coverage_gaps`, `hotspots`, co-located/`call-path:` `compound_pairs`, `framework`, and optional `z-brain` historical gotchas.
2. **Branch & Deduplicate Risks (`zprobe_branch`)**:
- Propose concrete risk branches across uncovered axes, assumption inversions, and 2-factor compound failures (`parent_ids` with >= 2 parents create `CONJUNCTION_OF` edges).
- Tag hypotheses with `perspective` (`ATTACKER`, `CHAOS_CONCURRENCY`, `DOMAIN_AUDITOR`) and attach a 3-link causal `failure_chain` (`t0_trigger` -> `t1_fault_state` -> `t2_cascading_impact`). Catastrophic (`severity >= 0.75`) or compound risks without a complete `failure_chain` emit `MISSING_FAILURE_CHAIN_T0_T1_T2`.
- When multiple distinct perspectives converge on the same canonical risk via trigram/structural dedup, `priority_score` receives a `+0.15` cross-lens convergence boost.
- Never mint `FACT` from speculation; LLM inputs attempting `epistemic_class: "FACT"` are downgraded to `HYPOTHESIS`. Provided `source_ref` locations are verified against workspace files.
- Catastrophic risks (`severity >= 0.75`: data loss, financial corruption, deadlock, auth bypass) receive a priority floor and are protected from pruning until falsified.
3. **Blind Adversarial Challenge (`zprobe_challenge`)**:
- Call `action: "prepare"` to obtain stripped blind envelopes (hiding producer identity, perspective label, and priority scores while keeping `failure_chain` and `code_excerpt`) plus a ready-to-dispatch `skeptic_dispatch_prompt`.
- Delegate `skeptic_dispatch_prompt` to an isolated `SKEPTIC` subagent (`reviewer`, `investigator`, or `research`) rather than self-grading inside the proposer context.
- Surface the strongest hidden assumption, `broken_link` (`t0_trigger` | `t1_fault_state` | `t2_cascading_impact` | `unstated_assumption`), a concrete counterexample (with `evidence_ref`), or a contradiction (`contradicts_node_id`), then commit `action: "verdict"` (`SUPPORTED`, `CONTESTED`, or `FALSIFIED`).
4. **Compile Falsification-First Test Plan (`zprobe_testplan`)**:
- Compiles non-falsified, non-duplicate surviving risks into prioritized, signature-anchored test specs (`xunit`, `nunit`, `mstest`, `vitest`, `jest`, `node-test`, `mocha`, `playwright`, `pytest`, `unittest`, `go-test`, `cargo-test`, `junit`, `node-assert`, or `z-vision` UI E2E assertion batches).
- Every test spec pairs a `FailureTrigger` with an `ExpectedRedSignal` (`R_TDD`: prove the test fails before fixing or fails under fault injection).
5. **Calibrate Outcomes (`zprobe_record`)**:
- After running tests, record `CAUGHT_BUG`, `PASSED`, or `FALSE_POSITIVE` to track per-axis bug yield over time in `.z-probe/probe.sqlite`.
## Epistemic Classes
- `FACT`: Verified static anchor or external tool output (never LLM-generated).
- `ASSUMPTION`: Explicit unverified premise required for a failure branch.
- `HYPOTHESIS`: Candidate failure mechanism under investigation.
- `INFERENCE`: Deduced consequence from parent claims.
- `SIMULATION`: Conditional trace from a test/fault-injection run.
- `UNKNOWN`: Missing telemetry or requirement needed to resolve a branch.