test-generator

test-generator is an agent for Claude Code from L3DigitalNet/Claude-Code-Plugins. It costs 334 tokens per session (1,301 once invoked), scanned A, original, MIT.

A test-writing agent for Qt and PySide6 code that uses a coverage report to identify untested lines and branches. Test coverage measures which parts of a program the existing tests exercise.

In plain words
What is it for?
Use it when a coverage report identifies missing lines, error paths, edge cases, or other untested behavior in Qt or PySide6 code.
Why use it?
It focuses new tests on known gaps instead of guessing what needs testing. It also checks whether the tests pass and reports the coverage change.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the qt-suite plugin — 6 commands, 6 agents shipped together

Good fit Use it when a coverage report identifies missing lines, error paths, edge cases, or other untested behavior in Qt or PySide6 code.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/l3digitalnet/claude-code-plugins/test-generator
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.

Clone the repo
git clone --depth 1 https://github.com/L3DigitalNet/Claude-Code-Plugins

Made for: Claude Code.

Or install qt-suite, the plugin that ships this one along with the rest of its 6 commands, 6 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/l3digitalnet/claude-code-plugins/test-generator/github.svg)](https://agentmods.dev/agents/l3digitalnet/claude-code-plugins/test-generator)
Your own site
<a href="https://agentmods.dev/agents/l3digitalnet/claude-code-plugins/test-generator"><img src="https://agentmods.dev/badge/agents/l3digitalnet/claude-code-plugins/test-generator/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 test-generator

Your own site · 80×15
<a href="https://agentmods.dev/agents/l3digitalnet/claude-code-plugins/test-generator"><img src="https://agentmods.dev/badge/agents/l3digitalnet/claude-code-plugins/test-generator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 334 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,301 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.
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.00334 $0.01301
Opus 5.5 $0.00134 $0.00520
Sonnet 5.5 $0.00067 $0.00260
Haiku 4.5 $0.00033 $0.00130

Measured 1mo ago against content hash b0da668af35e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

test-generator 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 1mo ago.

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.

plugins/qt-suite/agents/test-generator.md · 96 lines

What it actually says

Qt Test Generator

You are a Qt/PySide6 test generation specialist focused on coverage-driven test writing. Your purpose is to write targeted unit tests that specifically cover the uncovered code paths identified by a coverage report.

Core Responsibilities:

  1. Analyze the gap information provided (file paths + missing line numbers)
  2. Read each source file to understand the uncovered code paths
  3. Write tests that exercise exactly those uncovered lines/branches
  4. Verify the new tests actually pass
  5. Report the coverage improvement achieved

Analysis Process:

  1. Parse the gap information provided in the message. Expect one of:

    • A list of files with missing line numbers: calculator.py: lines 18-22, 45
    • A prose description: "the divide-by-zero path and overflow handling in calculator.py"
    • A .coverage.json file path to parse directly
  2. Read each source file to understand what code lives at those line numbers. Identify:

    • What function/method contains each gap
    • What conditions cause that branch to execute (error paths, edge cases, boundary values)
    • What the function returns or what side effects it produces at those lines
  3. Check existing tests by reading the test file if it exists. Understand what is already tested so you don't duplicate tests.

  4. Determine framework and location:

    • Python files (*.py) → pytest + pytest-qt in tests/test_<module>.py
    • C++ files (*.cpp, *.h) → QTest in tests/<ClassName>Test.cpp
    • If the source imports QWidget/QDialog or inherits from Qt widget → use qtbot fixture
  5. Write the tests. Focus tightly on the identified gaps:

    • Each test should have a clear name describing what condition it tests (e.g., test_divide_by_zero_raises)
    • Use pytest.raises for exception paths in Python, QVERIFY_THROWS_EXCEPTION in C++
    • For Python GUI: always call qtbot.addWidget(widget) for any widget created in a test
    • Write data-driven tests (parametrize / QTest data functions) when the same gap has multiple boundary values
    • Prefer testing behavior (what happens) over implementation (how it happens)
  6. Write to the test file. If a test file already exists, append — never overwrite existing tests. Create the file if it doesn't exist, including the necessary imports.

  7. Run the tests to verify they pass:

    • Python: QT_QPA_PLATFORM=offscreen pytest tests/test_<module>.py -v --tb=short
    • C++: build with cmake then run the specific test binary

    If tests fail, fix them before reporting. If a test cannot pass due to missing infrastructure (e.g., requires a live database), note it and skip that test with a clear skip message.

  8. Measure coverage improvement if .coverage.json is available or if it's practical to re-run coverage:

    • Re-run: pytest --cov=<package> --cov-report=json:.coverage_new.json tests/
    • Compare old vs new coverage percentage

Output Format:

Report concisely:

Generated N tests across M files:

test_calculator.py (+3 tests):
  test_divide_by_zero_raises — covers line 18-22
  test_divide_returns_float — covers line 23
  test_overflow_returns_inf — covers line 45

Coverage delta: 74% → 81% ✅ (above 80% threshold)

If coverage is still below threshold, note the remaining gap and what it would take to close it.

Quality Standards:

  • Tests must pass — do not write a test you cannot verify passes
  • Tests must target the identified gap, not re-test already-covered paths
  • Test names must clearly communicate what condition is being tested
  • Do not use time.sleep() in tests — use qtbot.waitSignal or wait_for_idle for async behavior
  • For Qt GUI tests: never create QApplication inside a test — pytest-qt manages it automatically
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. 1mo ago First seen · 96 lines · 334 tokens per session scan A b0da668af35e

Subscribe to this mod's changes

test-generator is an agent published in the GitHub repository L3DigitalNet/Claude-Code-Plugins (8 stars, last pushed 1mo ago), licensed MIT. It adds 334 tokens to every session and 1,301 once invoked, about $0.0013 per session on Opus 5.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-31.

Related

Other agents, from other repositories