Sponsor Suno AI Music arrow_forward
Plugin

Unit Test Generator by jeremylongshore

Automatically generate comprehensive unit tests from source code with multiple testing framework support

Type
Plugin
GitHub stars
2.8k
License
MIT
Repo last updated
Sep 27, 2026
Version
1.21.0
Author
Claude Code Plugins

What Unit Test Generator by jeremylongshore is

Unit Test Generator by jeremylongshore is a plugin published in the jeremylongshore/tons-of-skills-marketplace repository on GitHub, which has about 2.8k stars. The repository describes itself as: “Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.”

A plugin is a package that bundles skills, slash commands, subagents, hooks, and MCP connectors so they install together. Plugins are plain files with a manifest at .claude-plugin/plugin.json, and they work in both Claude Code and Claude Cowork.

Installing Unit Test Generator adds everything it ships in one step. Connectors inside a plugin still need to be connected separately, and hooks and subagents only run in Cowork and Claude Code, not in regular chat.

How to install Unit Test Generator by jeremylongshore

Claude Code

  1. Add the repository as a plugin marketplace: claude plugin marketplace add jeremylongshore/tons-of-skills-marketplace
  2. Install the plugin: claude plugin install unit-test-generator@<marketplace-name>, using the marketplace name from the repository's .claude-plugin/marketplace.json.
  3. Restart the session if the new skills or commands don't appear straight away.

Claude Cowork

  1. Open Customize → Plugins and choose Add marketplace.
  2. Enter jeremylongshore/tons-of-skills-marketplace (the owner/repo shorthand works for GitHub).
  3. Find Unit Test Generator in the list, click Install, then connect any connectors it needs from its Connectors tab.

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/testing/unit-test-generator/.claude-plugin/plugin.json, shared under the repository's MIT license. Read the full file on GitHub.

Automatically generate comprehensive unit tests from source code with intelligent framework detection and best practices.

Features

  • Multi-framework support - Jest, pytest, JUnit, Go testing, RSpec, and more
  • Intelligent test generation - Analyzes code to create relevant test cases
  • Complete coverage - Happy paths, edge cases, error handling
  • Mock generation - Automatic mocking of external dependencies
  • Best practices - Arrange-Act-Assert, descriptive names, proper structure

Installation

/plugin install unit-test-generator@claude-code-plugins-plus

Usage

Generate tests for a file

/generate-tests src/utils/validator.js

Specify framework explicitly

/generate-tests --framework pytest src/api/users.py

Use shortcut

/gut models/UserModel.ts

What Gets Generated

The plugin creates test files with:

  1. Proper imports and setup - Framework-specific boilerplate
  2. Test suite organization - Logical grouping of related tests
  3. Comprehensive test cases:
  • Valid inputs (typical scenarios)
  • Invalid inputs (null, undefined, wrong types)
  • Boundary conditions (limits, empty collections)
  • Error scenarios (exceptions, failures)
  • State changes (when applicable)
  1. Mocks and stubs - For external dependencies
  2. Clear assertions - Validating expected outcomes
  3. Helpful comments - Explaining complex scenarios

Supported Languages & Frameworks

Example Output

For a JavaScript validation function:

// Input: src/utils/validator.js
function validateEmail(email) {
  if (!email) return false;
  return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
}

// Generated: src/utils/validator.test.js
describe('validateEmail', () => {
  it('should return true for valid email addresses', () => {
    expect(validateEmail('[email protected]')).toBe(true);
    expect(validateEmail('[email protected]')).toBe(true);
  });

  it('should return false for invalid email addresses', () => {
    expect(validateEmail('notanemail')).toBe(false);
    expect(validateEmail('@example.com')).toBe(false);
    expect(validateEmail('user@')).toBe(false);
  });
…

Best Practices

The plugin follows testing best practices:

  • Descriptive names - Clear what is tested and expected result
  • Arrange-Act-Assert - Clear test structure
  • Test isolation - No shared state between tests
  • Single responsibility - One concept per test
  • Mock external dependencies - Database calls, API requests, etc.
  • Test both paths - Success and failure scenarios
  • Edge cases - Boundaries, nulls, empty values

Requirements

  • Claude Code CLI
  • Testing framework installed in project (e.g., npm install --save-dev jest)

Tips

  1. Review generated tests and adjust for your specific needs
  2. Add integration tests for complex workflows
  3. Update tests when code changes
  4. Aim for high coverage but prioritize meaningful tests
  5. Use generated tests as a starting point, not final solution

License

MIT

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 Unit Test Generator by jeremylongshore?

Unit Test Generator by jeremylongshore is a plugin for Claude Code and Claude Cowork from the jeremylongshore/tons-of-skills-marketplace repository on GitHub. Automatically generate comprehensive unit tests from source code with multiple testing framework support

How do I install Unit Test Generator by jeremylongshore in Claude Code?

Add the repository as a plugin marketplace: claude plugin marketplace add jeremylongshore/tons-of-skills-marketplace Install the plugin: claude plugin install unit-test-generator@<marketplace-name>, using the marketplace name from the repository's .claude-plugin/marketplace.json. Restart the session if the new skills or commands don't appear straight away.

Can I use Unit Test Generator by jeremylongshore in Claude Cowork?

Open Customize → Plugins and choose Add marketplace. Enter jeremylongshore/tons-of-skills-marketplace (the owner/repo shorthand works for GitHub). Find Unit Test Generator in the list, click Install, then connect any connectors it needs from its Connectors tab.

Is Unit Test Generator by jeremylongshore 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 MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.