generate-tests

generate-tests is a command for Claude Code from TheLobbi/claude. It costs 0 tokens per session (314 once invoked), scanned A, original, MIT.

Um comando que cria conjuntos de testes para uma base de código. Os testes verificam se funções, componentes, APIs, bases de dados e fluxos completos continuam a funcionar.

In plain words
What is it for?
Serve para gerar testes unitários, de integração e ponta a ponta, além de casos-limite, erros e, quando fizer sentido, testes de carga e desempenho.
Why use it?
Ajuda a encontrar partes do código sem testes e casos de erro que poderiam passar despercebidos.

Command for Claude Code

Part of the claude-orchestration plugin — 49 commands, 9 agents shipped together

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/thelobbi/claude/generate-tests
Clone the repo
git clone --depth 1 https://github.com/TheLobbi/claude

Made for: Claude Code.

Or install claude-orchestration, the plugin that ships this one along with the rest of its 49 commands, 9 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 generate-tests

README.md
[![agentmods](https://agentmods.dev/badge/commands/thelobbi/claude/generate-tests.svg)](https://agentmods.dev/commands/thelobbi/claude/generate-tests)
Your own site
<a href="https://agentmods.dev/commands/thelobbi/claude/generate-tests"><img src="https://agentmods.dev/badge/commands/thelobbi/claude/generate-tests.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 314 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.00000 $0.00314
Opus 5 $0.00000 $0.00157
Sonnet 5 $0.00000 $0.00063
Haiku 4.5 $0.00000 $0.00031

Measured 4d ago against content hash 74846ee2ea70, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

generate-tests 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 4d 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.

.claude/commands/generate-tests.md · 54 lines

What it actually says

Test Suite Generation

Generate comprehensive test suites for the codebase with focus on coverage and quality:

Test Strategy

  • Identify untested or under-tested code paths
  • Generate unit tests for individual functions/methods
  • Create integration tests for component interactions
  • Add end-to-end tests for critical user flows
  • Include edge cases and error scenarios

Test Types to Generate

  1. Unit Tests

    • Pure function testing
    • Component testing (React, Vue, etc.)
    • Service/utility testing
    • Mock external dependencies
  2. Integration Tests

    • API endpoint testing
    • Database interaction testing
    • Service integration testing
    • Third-party integration testing
  3. Edge Cases

    • Boundary conditions
    • Null/undefined handling
    • Empty arrays/objects
    • Invalid input handling
    • Error scenarios
  4. Performance Tests (where applicable)

    • Load testing
    • Stress testing
    • Benchmark tests

Test Framework Guidelines

  • Use existing test framework (Jest, Mocha, Pytest, etc.)
  • Follow AAA pattern (Arrange, Act, Assert)
  • Use descriptive test names
  • Include setup and teardown
  • Mock external dependencies appropriately
  • Aim for high code coverage (>80%)

Output

Generate test files with:

  • Clear test descriptions
  • Comprehensive assertions
  • Proper mocking/stubbing
  • Comments explaining complex test logic
  • Coverage for happy path and error cases

Report current test coverage and areas needing attention.

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. 4d ago First seen · 54 lines · 0 tokens per session scan A 74846ee2ea70

Subscribe to this mod's changes

generate-tests is a command published in the GitHub repository TheLobbi/claude (21 stars, last pushed 7d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 314 tokens. 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.