From test-writer
Generates unit tests for a module, analyzing exported functions/classes, detecting the testing framework, and producing tests for happy paths, edge cases, and errors. Runs tests to verify they pass.
How this command is triggered — by the user, by Claude, or both
Slash command
/test-writer:unit-testThe summary Claude sees in its command listing — used to decide when to auto-load this command
Generate unit tests for a module, covering all public functions and edge cases. ## Steps 1. Read the target file and identify all exported functions, classes, and methods. 2. Detect the testing framework from project configuration. 3. For each public function: - Analyze parameters, return types, and side effects. - Generate tests for the happy path with typical inputs. - Generate tests for edge cases: empty inputs, null/undefined, boundary values. - Generate tests for error conditions: invalid inputs, thrown exceptions. - Mock external dependencies (database, API calls, fil...
Generate unit tests for a module, covering all public functions and edge cases.
Generated: <N> unit tests in <file>
Coverage: <functions covered>/<total functions>
Tests:
- <function>: <N> tests (happy path, edge cases, errors)
6plugins reuse this command
First indexed Mar 30, 2026
npx claudepluginhub smarks26/awesome-claude-code-toolkit --plugin test-writer/unit-testGenerates unit tests for a module, analyzing exported functions/classes, detecting the testing framework, and producing tests for happy paths, edge cases, and errors. Runs tests to verify they pass.
/generate-testsGenerates unit tests for a function, class, or module, identifying test cases, mocking dependencies, and verifying coverage.
/write-testsGenerates thorough unit tests for a specified file or function, auto-detecting the test framework and following project conventions. Runs tests after writing to confirm they pass.
/generate-test-casesAnalyzes target code and generates comprehensive unit, integration, and edge-case test suites with mocks, stubs, and data-driven tests.
/test-generateAnalyzes source files and generates unit tests with mocking, edge cases, and framework-specific patterns.
/generate-testsGenerates a comprehensive test suite for the specified code, including unit, integration, and framework-specific tests following project conventions.