6 Test Generator
Generates runtime validation test harnesses (C tests, MSAN, Valgrind targets) for confirmed zeroize-audit findings. Produces a Makefile for automated test execution.
- Type
- Subagent
- Repository
- trailofbits/skills
- GitHub stars
- 7.3k
- License
- CC-BY-SA-4.0
- Repo last updated
- Sep 25, 2026
- Source file
- plugins/zeroize-audit/agents/6-test-generator.md
- Model
- inherit
What 6 Test Generator is
6 Test Generator is a subagent published in the trailofbits/skills repository on GitHub, which has about 7.3k stars. The repository describes itself as: “Trail of Bits Claude Code skills for security research, vulnerability detection, and audit workflows”
A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.
Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to 6 Test Generator and get back a compact result.
It is set up to use these tools: Read, Write, Bash, Grep, Glob. Limiting tools is a good sign: the subagent can only do what those tools allow.
How to install 6 Test Generator
Claude Code
- Download 6-test-generator.md from the repository.
- Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
- Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Claude Cowork
- Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
- Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.
Inside the source file
An excerpt from plugins/zeroize-audit/agents/6-test-generator.md, shared under the repository's CC-BY-SA-4.0 license. Read the full file on GitHub.
Generate runtime validation test harnesses for confirmed zeroize-audit findings: C test harnesses, MemorySanitizer tests, Valgrind targets, and stack canary tests.
Input
You receive these values from the orchestrator:
Process
Step 0 — Load Configuration
Read config_path to load the merged config.
Step 1 — Read Final Report
Load {workdir}/report/findings.json and filter to confirmed findings (confidence = confirmed or likely).
Step 2 — Generate Test Harnesses
For each confirmed finding, generate:
- C test harness: Allocates the sensitive object, calls the function under test, and verifies all bytes are zero at the expected wipe point.
- MemorySanitizer test (-fsanitize=memory): Detects reads of un-zeroed memory after the wipe point.
- Valgrind invocation target: Builds the test without sanitizers for Valgrind leak and memory error detection.
- Stack canary test: For STACK_RETENTION findings, places canary values around the sensitive object and checks for retention after function return.
Step 3 — Generate Makefile
Produce a Makefile in the output directory that:
- Builds all test harnesses with appropriate compiler flags
- Includes sanitizer targets (test-msan, test-asan)
- Includes Valgrind targets (test-valgrind)
- Has a run-all target that executes everything and reports results
- Uses compile flags from compile_commands.json where applicable
Step 4 — Generate Manifest
Produce test_manifest.json listing all generated tests with:
- Test file path
- Finding ID it validates
- Test type (harness, msan, valgrind, canary)
- Expected behavior
Output
Write all output files to {workdir}/tests/:
Error Handling
- No confirmed findings: Write empty manifest and note in notes.md. Not an error.
- Missing final report: Fatal — cannot generate tests. Write error to notes.md.
- Always write test_manifest.json and Makefile — even if empty/no-op.
Before you install
- Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
- Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
- Try it in a test project or a copy of your files before pointing it at real work.
- Pin the version you tested, and review changes before updating.
- Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.
FAQ
What is 6 Test Generator?
6 Test Generator is a subagent for Claude Code and Claude Cowork from the trailofbits/skills repository on GitHub. Generates runtime validation test harnesses (C tests, MSAN, Valgrind targets) for confirmed zeroize-audit findings. Produces a Makefile for automated test execution.
How do I install 6 Test Generator in Claude Code?
Download 6-test-generator.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Can I use 6 Test Generator in Claude Cowork?
Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
Is 6 Test Generator safe to install?
It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.
Similar resources
- Dimension Annotator Adds dimensional annotations to source code at anchor points using Reserve Protocol's format Subagent · trailofbits/skills
- Data Flow Analyzer Analyzes data flow from source to vulnerability sink, mapping trust boundaries, API contracts, environment protections, and cross-references. Spawned by fp-check during Phase 1 verification. Subagent · trailofbits/skills
- Dimension Propagator Propagates dimensional annotations through arithmetic and call chains, reporting mismatches found during propagation Subagent · trailofbits/skills
- Dimension Validator Validates dimensional consistency and detects dimensional bugs in annotated code Subagent · trailofbits/skills
- Adversarial Modeler Models attacker perspectives and builds exploit scenarios for HIGH RISK code changes. Use when differential review identifies high-risk changes that need adversarial threat modeling and concrete attack vector analysis. Subagent · trailofbits/skills
- 5c Poc Verifier Verifies that each zeroize-audit PoC actually proves the vulnerability it claims to demonstrate. Reads PoC source code, finding details, and original source to check alignment between the PoC and the finding. Produces poc_verification.json consumed by the orchestrator. Subagent · trailofbits/skills
- Arithmetic Scanner Scans repo for files with dimensional arithmetic to scope discovery Subagent · trailofbits/skills
- 5b Poc Validator Compiles and runs all PoCs for zeroize-audit findings. Produces poc_validation_results.json consumed by the verification agent and the orchestrator. Subagent · trailofbits/skills