white-box-red-testing

white-box-red-testing is a skill for Claude Code, Codex from liza-mas/liza. It costs 63 tokens per session (879 once invoked), scanned A, original, Apache-2.0.

A testing guide that deliberately writes tests expected to pass in order to expose bugs that do not meet the code's stated behavior. TDD means writing tests before code, but this add-on is for finding problems in existing code.

In plain words
What is it for?
Use it on selected commits, files, modules, or low-coverage functions when you want to stress-test behavior.
Why use it?
It separates confirmed bugs, likely bugs, and unclear requirements without changing source code or weakening existing tests.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it on selected commits, files, modules, or low-coverage functions when you want to stress-test behavior.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/liza-mas/liza/white-box-red-testing
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add liza-mas/liza --skill white-box-red-testing
Clone the repo
git clone --depth 1 https://github.com/liza-mas/liza

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for white-box-red-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/liza-mas/liza/white-box-red-testing/github.svg)](https://agentmods.dev/skills/liza-mas/liza/white-box-red-testing)
Your own site
<a href="https://agentmods.dev/skills/liza-mas/liza/white-box-red-testing"><img src="https://agentmods.dev/badge/skills/liza-mas/liza/white-box-red-testing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for white-box-red-testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/liza-mas/liza/white-box-red-testing"><img src="https://agentmods.dev/badge/skills/liza-mas/liza/white-box-red-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 879 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00063 $0.00879
Opus 5 $0.00032 $0.00439
Sonnet 5 $0.00013 $0.00176
Haiku 4.5 $0.00006 $0.00088

Measured 11d ago against content hash f7a6234ed2da, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

white-box-red-testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/discover_targets.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/white-box-red-testing/SKILL.md · 96 lines

How it starts

The opening of the file, as written. The whole thing — 96 lines — stays where its author put it; the contents beside it link to each section on GitHub.

White-Box Red Testing

Hard Boundaries

  • NEVER modify source code. Analyze and classify only.
  • NEVER weaken existing tests.
  • Unexported/private members: test only if explicitly scoped.
  • Output to user-specified directory or language-appropriate default.

When to Use

  • You have specific targets: changed files, a commit range, or low-coverage functions
  • You need classified findings (confirmed-bug / likely-bug / specification-gap)
  • Contracts exist (docstrings, types, tests) and you want to verify code matches them
  • After a commit or PR — "did these changes introduce bugs?"

If you don't know where to look or want to explore broadly, use the black-box-red-testing skill instead.

Scope Modes

User chooses scope. Never run unsolicited.

Mode Trigger Targets
Commits --commits HEAD~3..HEAD Changed/added functions in diff
Files --files <path> or --module <dir> All public callables in specified paths
Coverage --coverage-below 70 [--branch] Functions below threshold via scripts/discover_targets.py

Note on coverage targeting: Low coverage indicates under-tested code, not necessarily buggy code. Use as a targeting heuristic to prioritize where to look, not as a bug predictor.

Workflow

1. IDENTIFY TARGETS
   - commits: git diff → parse changed functions
   - files: AST parse → list public callables
   - coverage: run scripts/discover_targets.py

2. GATHER CONTRACT EVIDENCE per target
   - docstrings, type annotations, existing passing tests
   - function/param names, assertions, call sites, commit messages
   - No evidence? → findings become "specification-gap"

3. FORM HYPOTHESES per target as structured one-liners:
   [code_path] × [defect_class] → [observable_symptom]

   Defect classes to consider:
   - boundary inputs (empty, zero, None, unicode, tz-naive)
   - state/mutation (shared state, call sequences, input mutation)
   - implicit contracts (name promises vs actual behavior)
   - error paths (timeouts, missing data, malformed input)

4. GENERATE ADVERSARIAL TESTS — one test per hypothesis

5. SELF-VALIDATE (mandatory)
   - Run all generated tests
   - Red → candidate finding
   - Green → record hypothesis in confidence section of report
   - Broken → fix or discard

6. CLASSIFY per references/finding-classification.md
   - confirmed-bug | likely-bug | specification-gap

7. APPLY DISTINCTNESS FILTER
   Each finding must differ from others in at least one of:
   - The code path exercised
   - The category of defect found
   - The component boundary tested
   Shallow variations of the same finding → consolidate into one.

8. OUTPUT
   - Test files to output directory (test code only, no classification in tests)
   - Summary report to stdout (classification, evidence, impact per finding)
   - Format: see references/output-format.md

Read the full file on GitHub · 96 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 96 lines · 63 tokens per session scan A f7a6234ed2da

Subscribe to this mod's changes

white-box-red-testing is a skill published in the GitHub repository liza-mas/liza (384 stars, last pushed 2d ago), licensed Apache-2.0. It adds 63 tokens to every session and 879 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.