generate

A command that creates unit tests, which check individual pieces of program code, for Qt and PySide6 projects. It scans the project or works on a specified file or class and follows the project's test layout.

In plain words
What is it for?
Use it to generate Python or C++ test files for selected Qt code, or to scan a project and add tests for the most urgent untested source files.
Why use it?
It helps find source files that lack tests or have weak coverage, reducing the manual work of deciding what to test first.

Command

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.

agentmods
npx agentmods add commands/l3digitalnet/claude-code-plugins/generate
Clone the repo
git clone --depth 1 https://github.com/L3DigitalNet/Claude-Code-Plugins
Per session 37 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,073 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00037 $0.01073
Opus 5 $0.00018 $0.00536
Sonnet 5 $0.00007 $0.00215
Haiku 4.5 $0.00004 $0.00107

Measured yesterday against content hash 5935fa367ec2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

generate 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 yesterday.

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/commands/generate.md · 102 lines

How it starts

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

/qt-suite:generate — AI Test Generation

Generate unit tests for this Qt project. When an argument is provided, generate tests for that specific file or class. When no argument is provided, scan the project to identify the files most in need of tests.

Step 1: Identify Targets

If an argument was provided (e.g., /qt-suite:generate src/calculator.py):

  • Use the argument as the target file or class name
  • Find the file with Glob if only a filename was given

If no argument was provided:

  1. Read .qt-test.json if present to determine project_type and test_dir
  2. Detect project type by checking for CMakeLists.txt (C++) or pyproject.toml/setup.cfg (Python)
  3. Use Glob to find all source files:
    • Python: **/*.py (excluding tests/, __init__.py, migration files)
    • C++: **/*.cpp and **/*.h (excluding tests/, moc_*, ui_*, build/)
  4. For each source file, check if a corresponding test file exists:
    • Python: tests/test_<module>.py for src/<module>.py
    • C++: tests/<name>_test.cpp or tests/test_<name>.cpp for src/<name>.cpp
  5. Prioritize files with no test file at all, then files with low complexity coverage (look for classes with multiple public methods but few or no tests)
  6. Present the top 3 candidates and select the best target. Prefer business logic classes over utility/helper files.

Step 2: Read and Analyze the Source File

Read the target source file completely. Identify:

  • Class names and their public interface
  • Methods and their signatures, parameters, return types
  • Side effects: file I/O, signals emitted, state mutations
  • Edge cases visible from the code: null checks, boundary conditions, exception paths
  • Qt-specific elements: signals, slots, widget interactions, model overrides

Step 3: Check Existing Tests

If a test file already exists for this source:

  • Read it to understand existing coverage
  • Focus generated tests on uncovered methods and edge cases
  • Do not duplicate tests that already exist

Read the full file on GitHub · 102 lines

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. yesterday First seen · 102 lines · 37 tokens per session scan A 5935fa367ec2

Subscribe to this mod's changes

generate is a command published in the GitHub repository L3DigitalNet/Claude-Code-Plugins (6 stars, last pushed 2d ago), licensed MIT. It adds 37 tokens to every session and 1,073 once invoked, about $0.0002 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-31.