generate-tests

generate-tests is a skill for Claude Code from FlorianBruniaux/claude-code-plugins. It costs 39 tokens per session (539 once invoked), scanned A, original, MIT.

A test-writing helper that examines code and generates tests for its functions, classes, and methods.

In plain words
What is it for?
It detects common test frameworks such as Jest, Vitest, pytest, and Mocha, then creates tests that follow the project's conventions.
Why use it?
It reduces the effort of covering normal inputs, edge cases, invalid inputs, and failures when existing tests are incomplete.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the code-quality plugin — 17 skills, 6 agents shipped together

Good fit It detects common test frameworks such as Jest, Vitest, pytest, and Mocha, then creates tests that follow the project's conventions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/florianbruniaux/claude-code-plugins/generate-tests
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.

Any agent
npx skills add FlorianBruniaux/claude-code-plugins --skill generate-tests
Clone the repo
git clone --depth 1 https://github.com/FlorianBruniaux/claude-code-plugins

Made for: Claude Code.

Or install code-quality, the plugin that ships this one along with the rest of its 17 skills, 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 generate-tests

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/florianbruniaux/claude-code-plugins/generate-tests"><img src="https://agentmods.dev/badge/skills/florianbruniaux/claude-code-plugins/generate-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 539 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.00039 $0.00539
Opus 5.5 $0.00016 $0.00216
Sonnet 5.5 $0.00008 $0.00108
Haiku 4.5 $0.00004 $0.00054

Measured 5d ago against content hash 3d08c55e883c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 5d 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/code-quality/skills/generate-tests/SKILL.md · 97 lines

What it actually says

Generate tests

Generate comprehensive tests for specified code.

Instructions

  1. Read the target file(s)
  2. Identify testable units (functions, classes, methods)
  3. Generate tests following project conventions
  4. Ensure high coverage of edge cases
  5. Run the new tests and fix failures caused by the tests themselves; report any that expose a bug in the code instead of changing the assertion to pass

Test generation process

1. Analyze target

  • Identify public interfaces
  • Understand dependencies
  • Note edge cases and boundaries

2. Detect test framework

If --framework was given, use it. Otherwise check for:

  • jest.config.js → Jest
  • vitest.config.ts → Vitest
  • pytest.ini or [tool.pytest] in pyproject.toml → pytest
  • mocha in package.json → Mocha

3. Generate tests

Follow the detected framework conventions.

Test categories

Happy path

Normal expected behavior with valid input.

Edge cases

  • Empty inputs
  • Null/undefined values
  • Boundary values (0, -1, MAX_INT)
  • Single item vs multiple items

Error cases

  • Invalid input types
  • Missing required parameters
  • Network/IO failures
  • Timeout scenarios

Integration points

  • Database interactions
  • External API calls
  • File system operations

Output format

describe('[ComponentName]', () => {
  describe('[methodName]', () => {
    // Happy path
    it('should [expected behavior] when [condition]', () => {
      // Arrange
      // Act
      // Assert
    });

    // Edge cases
    it('should handle empty input', () => {});
    it('should handle null values', () => {});

    // Error cases
    it('should throw when [invalid condition]', () => {});
  });
});

Conventions

  • One assertion per test (when practical)
  • Descriptive test names
  • AAA pattern (Arrange-Act-Assert)
  • No test interdependence
  • Mock external dependencies

Usage

/generate-tests src/utils/calculator.ts
/generate-tests src/services/

$ARGUMENTS

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. 5d ago Changed · -1 lines · +30 tokens per session 3d08c55e883c
  2. 1mo ago First seen · 98 lines · 9 tokens per session scan A 643a1b782479

Subscribe to this mod's changes

generate-tests is a skill published in the GitHub repository FlorianBruniaux/claude-code-plugins (47 stars, last pushed today), licensed MIT. It adds 39 tokens to every session and 539 once invoked, about $0.0002 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-10-29.

Related

generate-tests compared with skills from other repositories

generate-tests next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
generate-testsFlorianBruniaux/claude-code-pluginsSkill47todayMITA39Claude Code
unit-testjohnqtcg/awesome-skillsSkill311mo agoMITA100Claude Code
testing-conventionsw2ur/claude-code-setupSkill1yesterdayMITA81Claude Code
app-store-screenshotsfatihkan/badiSkill81mo agoMITA68Claude Code
contentfatihkan/badiSkill81mo agoMITA0Claude Code
expo-app-configfatihkan/badiSkill81mo agoMITA86Claude Code
expo-modulesfatihkan/badiSkill81mo agoMITA77Claude Code