npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@apoorvgarg31/test-architect

v1.0.0

Published

Claude Code skill for generating comprehensive tests via interactive Q&A

Readme

test-architect

A Claude Code skill for generating comprehensive tests via interactive Q&A conversation.

Features

  • Code Analysis: Automatically analyzes source files to identify functions, classes, and exports
  • Interactive Q&A: Asks clarifying questions about edge cases, error handling, and priorities
  • Multi-Framework Support: Generates tests for Jest, Vitest, or Pytest
  • Smart Detection: Auto-detects language and test framework from project configuration

Installation

As a Claude Code Skill

npm install @apoorvgarp-31/test-architect

Or copy to your Claude skills directory:

cp -r test-architect ~/.claude/skills/

Usage

In Claude Code, use the /test-architect command:

/test-architect src/utils/parser.ts
/test-architect lib/auth.py --framework pytest
/test-architect components/Button.tsx --framework vitest

Options

| Option | Description | |--------|-------------| | --framework | Test framework: jest, vitest, or pytest | | --output | Output test file path |

Direct Script Usage

npx ts-node scripts/generate.ts src/utils/parser.ts
npx ts-node scripts/generate.ts lib/auth.py --framework pytest
npx ts-node scripts/generate.ts components/Button.tsx --output __tests__/Button.test.tsx

How It Works

Phase 1: Code Analysis

The skill reads and analyzes the provided source file to identify:

  • All exported functions/classes/methods
  • Function signatures and return types
  • Dependencies and imports
  • Existing error handling patterns

Phase 2: Interactive Q&A

The skill asks clarifying questions to understand:

  • Edge Cases: Empty inputs, null values, boundary conditions
  • Error Handling: Expected exceptions, error messages
  • Priorities: Critical functions, known bug-prone areas
  • Dependencies: What to mock, environment-specific behavior

Phase 3: Test Generation

Generates comprehensive test suites organized by:

  • Happy path tests
  • Edge case tests
  • Error handling tests
  • Integration tests (with mocks)

Phase 4: Review & Refinement

After generating tests, offers to:

  • Add more test cases
  • Adjust mocking strategies
  • Cover additional scenarios

Framework Detection

If --framework is not specified:

  • .ts / .tsx / .js / .jsx files → Checks for vitest.config or jest.config → Defaults to Jest
  • .py files → Pytest

Test File Naming Conventions

Default output locations:

  • Jest/Vitest: [filename].test.ts or [filename].test.tsx
  • Pytest: test_[filename].py

Example Output

Jest/Vitest (TypeScript)

import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
import { validateEmail, validatePassword } from './validator';

describe('validateEmail', () => {
  describe('happy path', () => {
    it('should return true for valid email', () => {
      expect(validateEmail('[email protected]')).toBe(true);
    });
  });

  describe('edge cases', () => {
    it('should handle empty string', () => {
      expect(validateEmail('')).toBe(false);
    });
  });

  describe('error handling', () => {
    it('should throw on null input', () => {
      expect(() => validateEmail(null)).toThrow();
    });
  });
});

Pytest (Python)

import pytest
from validator import validate_email, validate_password

class TestValidateEmail:
    def test_happy_path(self):
        assert validate_email('[email protected]') is True

    class TestEdgeCases:
        def test_empty_string(self):
            assert validate_email('') is False

    class TestErrorHandling:
        def test_none_input_raises(self):
            with pytest.raises(TypeError):
                validate_email(None)

Requirements

  • Node.js 18+
  • TypeScript 5.0+

For the generated tests:

  • Jest, Vitest, or Pytest (depending on framework)

License

MIT