Sponsor Suno AI Music arrow_forward
Subagent

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
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

  1. Download 6-test-generator.md from the repository.
  2. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
  3. 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

  1. 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.
  2. 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:

  1. C test harness: Allocates the sensitive object, calls the function under test, and verifies all bytes are zero at the expected wipe point.
  2. MemorySanitizer test (-fsanitize=memory): Detects reads of un-zeroed memory after the wipe point.
  3. Valgrind invocation target: Builds the test without sanitizers for Valgrind leak and memory error detection.
  4. 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

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under CC-BY-SA-4.0. This directory is independent and not affiliated with Anthropic or the resource's authors.