Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

testing-builder

БесплатноБез исполняемых скриптовНе проверен

Automatically generates comprehensive test suites (unit, integration, E2E) based on code and past testing patterns. Use when user says "write tests", "test…

jackspaceот jackspace★ 16 звёзд на GitHub15 установок в других каталогах

Об этом скилле

Testing Builder

Purpose

Automatic test generation that learns your testing style. Eliminates the ADHD barrier to testing by making it effortless:

  1. Analyzes code to understand what needs testing
  2. Recalls your testing patterns from memory
  3. Generates comprehensive test suite
  4. Ensures all edge cases covered
  5. Saves testing patterns for future

For ADHD users: Zero friction - tests created instantly without manual effort. For all users: Comprehensive coverage without the tedious work. Learning system: Gets better at matching your testing style over time.

Activation Triggers

  • User says: "write tests", "test this", "add tests", "coverage"
  • After fixing bug: "create regression test"
  • Code review: "needs tests"
  • User mentions: "unit test", "integration test", "E2E test"

Core Workflow

1. Analyze Code

Step 1: Identify what to test

// Example: Analyzing a function
function calculateDiscount(price, discountPercent, customerType) {
  if (customerType === 'premium') {
    discountPercent += 10;
  }
  return price * (1 - discountPercent / 100);
}

// Identify:
- Function name: calculateDiscount
- Parameters: price, discountPercent, customerType
- Logic branches: premium vs non-premium
- Edge cases: negative values, zero, boundary conditions
- Return type: number

Step 2: Determine test type needed

  • Unit test: Pure functions, utilities, components
  • Integration test: Multiple components working together, API endpoints
  • E2E test: Full user workflows, critical paths
  • Regression test: Specific bug that was fixed

2. Recall Testing Patterns

Query context-manager for:

search memories:
- Type: PREFERENCE, PROCEDURE
- Tags: testing, test-framework, test-style
- Project: current project

What to recall:

  • Test framework (Jest, Vitest, Pytest, etc.)
  • Assertion style (expect, assert, should)
  • Test structure (describe/it, test blocks)
  • Mocking patterns (jest.mock, vi.mock)
  • Coverage requirements
  • File naming conventions

Example memory:

PREFERENCE: Testing style for BOOSTBOX
- Framework: Vitest
- Assertion: expect()
- Structure: describe/it blocks
- Coverage: Minimum 80%
- File naming: {filename}.test.js

3. Generate Test Suite

Unit Test Template:

import { describe, it, expect } from 'vitest';
import { calculateDiscount } from './discount';

describe('calculateDiscount', () => {
  describe('basic calculations', () => {
    it('should calculate discount correctly for regular customers', () => {
      const result = calculateDiscount(100, 10, 'regular');
      expect(result).toBe(90);
    });

    it('should add bonus discount for premium customers', () => {
      const result = calculateDiscount(100, 10, 'premium');
      expect(result).toBe(80); // 10% + 10% bonus
    });
  });

  describe('edge cases', () => {
    it('should handle zero discount', () => {
      const result = calculateDiscount(100, 0, 'regular');
      expect(result).toBe(100);
    });

    it('should handle 100% discount', () => {
      const result = calculateDiscount(100, 100, 'regular');
      expect(result).toBe(0);
    });

    it('should handle zero price', () => {
      const result = calculateDiscount(0, 10, 'regular');
      expect(result).toBe(0);
    });
  });

  describe('invalid inputs', () => {
    it('should handle negative price', () => {
      const result = calculateDiscount(-100, 10, 'regular');
      expect(result).toBeLessThan(0);
    });

    it('should handle invalid customer type', () => {
      const result = calculateDiscount(100, 10, 'unknown');
      expect(result).toBe(90); // Falls back to regular
    });
  });
});

Integration Test Template (API endpoint):

import { describe, it, expect, beforeAll, afterAll } from 'vitest';
import request from 'supertest';
import { app } from './app';
import { db } from './db';

describe('POST /api/users', () => {
  beforeAll(async () => {
    await db.connect();
  });

  afterAll(async () => {
    await db.disconnect();
  });

  it('should create a new user', async () => {
    const response = await request(app)
      .post('/api/users')
      .send({
        email: '[email protected]',
        name: 'Test User'
      });

    expect(response.status).toBe(201);
    expect(response.body).toHaveProperty('id');
    expect(response.body.email).toBe('[email protected]');
  });

  it('should reject duplicate email', async () => {
    await request(app).post('/api/users').send({
      email: '[email protected]',
      name: 'User 1'
    });

    const response = await request(app)
      .post('/api/users')
      .send({
        email: '[email protected]',
        name: 'User 2'
      });

    expect(response.status).toBe(409);
    expect(response.body.error).toContain('already exists');
  });

  it('should validate required fields', async () => {
    const response = await request(app)
      .post('/api/users')
      .send({
Полный SKILL.md на GitHub

Установить testing-builder в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

SKILL.json

FAQ

Что делает скилл testing-builder?

Automatically generates comprehensive test suites (unit, integration, E2E) based on code and past testing patterns. Use when user says "write tests", "test this", "add coverage", or after fixing bugs to create regression tests. Eliminates testing friction for ADHD users.

Как установить скилл testing-builder?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл testing-builder запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить testing-builder с