1

    unit-test-writer

    by Markus Isaksson

    Professional-grade unit test generation using the AAA pattern across TS, Python, Go, and Java.

    Updated May 2026
    Security scanned
    One-time purchase

    $7

    One-time purchase

    ⚡ Also available via Agensi MCP — your AI agent can load this skill on demand via MCP. Learn more →

    Included in download

    • Generate idiomatic unit tests for new or existing business logic.
    • Create mocked test suites for services with external dependencies.
    • file_read, file_write automation included
    • Includes example output and usage patterns
    • Instant install

    See it in action

    it('should throw error when stock is insufficient', () => {
      // Arrange
      const inventory = { getStock: vi.fn().mockReturnValue(0) };
      // Act & Assert
      expect(() => processOrder(inventory, 5)).toThrow('Out of stock');
      expect(inventory.getStock).toHaveBeenCalledWith(5);
    });

    About This Skill

    What it does

    This skill transforms your AI agent into a senior software engineer specialized in automated testing. It analyzes your source code—functions, classes, or entire modules—and generates production-ready unit tests following the industry-standard Arrange-Act-Assert (AAA) pattern. It ensures high test coverage by identifying happy paths, edge cases, and error conditions while correctly mocking external dependencies like databases or APIs.

    Why use this skill

    Prompting an AI to "write tests" often results in shallow, messy code that tests implementation details rather than behavior. This skill enforces strict architectural boundaries, generating idiomatic, isolation-focused test suites that are deterministic and easy to maintain. It saves developers hours of boilerplate setup and helps catch regression bugs before they hit production.

    Supported tools

    • JavaScript/TypeScript: Jest and Vitest with full mocking support.
    • Python: Pytest-ready tests with fixtures and parameterization.
    • Go: Table-driven testing using the standard library or Testify.
    • Java: JUnit 5 with lifecycle annotations and assertions.

    📖 Learn more: Best Testing & QA Skills for Claude Code →

    Use Cases

    • Generate idiomatic unit tests for new or existing business logic.
    • Increase code coverage by generating tests for missed edge cases.
    • Create mocked test suites for services with external dependencies.
    • Refactor messy test files into clean Arrange-Act-Assert patterns.

    Reviews

    No reviews yet - be the first to share your experience.

    Only users who have downloaded or purchased this skill can leave a review.

    Security Scanned

    Passed automated security review

    Permissions

    Read Files
    Write Files

    Reads the source file under test and writes a sibling test file. Does not execute tests.

    Frequently Asked Questions

    Similar Skills

    $7

    One-time