Unit Test Generator by jeremylongshore
Automatically generate comprehensive unit tests from source code with multiple testing framework support
- Type
- Plugin
- Repository
- jeremylongshore/tons-of-skills-marketplace
- 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
- 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.
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.
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-plusUsage
Generate tests for a file
/generate-tests src/utils/validator.jsSpecify framework explicitly
/generate-tests --framework pytest src/api/users.pyUse shortcut
/gut models/UserModel.tsWhat Gets Generated
The plugin creates test files with:
- Proper imports and setup - Framework-specific boilerplate
- Test suite organization - Logical grouping of related tests
- 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)
- Mocks and stubs - For external dependencies
- Clear assertions - Validating expected outcomes
- 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
- Review generated tests and adjust for your specific needs
- Add integration tests for complex workflows
- Update tests when code changes
- Aim for high coverage but prioritize meaningful tests
- 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
- Sprint Run the autonomous multi-agent sprint workflow with spec-driven development Slash Command · jeremylongshore/tons-of-skills-marketplace
- Spine Designs and implements backend systems contract-first — REST/gRPC/GraphQL APIs, distributed architecture, caching, auth, and rate limiting using boring technology that ships and stays simple. Use when designing a new API or fixing backend performance. Trigger with \"design this backend API\", \"build this service\". Subagent · jeremylongshore/tons-of-skills-marketplace
- Sql Query Builder Generate optimized SQL queries from natural language descriptions Slash Command · jeremylongshore/tons-of-skills-marketplace
- Sql Query Optimizer Analyze and optimize SQL queries for better performance, suggesting indexes, query rewrites, and execution plan improvements Plugin · jeremylongshore/tons-of-skills-marketplace
- Validate Plugin Validates Claude Code plugin structure against official Anthropic spec and Intent Solutions enterprise standard Plugin · jeremylongshore/tons-of-skills-marketplace
- Twinmind Pack Claude Code skill pack for TwinMind (24 skills) Plugin · jeremylongshore/tons-of-skills-marketplace
- Vastai Pack Evidence-gated Vast.ai operator pack for GPU rentals, Serverless, governance, recovery, and cost control (24 skills) Plugin · jeremylongshore/tons-of-skills-marketplace
- Tweetclaw X/Twitter automation - post, reply, like, retweet, follow, DM, search, extract data, monitor accounts, run giveaways via Xquik REST API. Plugin · jeremylongshore/tons-of-skills-marketplace