generate-tests
БесплатноБез исполняемых скриптовНе проверенGenerate comprehensive test suite for $ARGUMENTS following project testing conventions and best practices.
от jmagly★ 233 звезды на GitHubОб этом скилле
Test Generator
Generate comprehensive test suite for $ARGUMENTS following project testing conventions and best practices.
Task
I'll analyze the target code and create complete test coverage including:
- Unit tests for individual functions and methods
- Integration tests for component interactions
- Edge case and error handling tests
- Mock implementations for external dependencies
- Test utilities and helpers as needed
- Performance and snapshot tests where appropriate
Process
I'll follow these steps:
- Analyze the target file/component structure
- Identify all testable functions, methods, and behaviors
- Examine existing test patterns in the project
- Create test files following project naming conventions
- Implement comprehensive test cases with proper setup/teardown
- Add necessary mocks and test utilities
- Verify test coverage and add missing test cases
Test Types
Unit Tests
- Individual function testing with various inputs
- Component rendering and prop handling
- State management and lifecycle methods
- Utility function edge cases and error conditions
Integration Tests
- Component interaction testing
- API integration with mocked responses
- Service layer integration
- End-to-end user workflows
Framework-Specific Tests
- React: Component testing with React Testing Library
- Vue: Component testing with Vue Test Utils
- Angular: Component and service testing with TestBed
- Node.js: API endpoint and middleware testing
Testing Best Practices
Test Structure
- Use descriptive test names that explain the behavior
- Follow AAA pattern (Arrange, Act, Assert)
- Group related tests with describe blocks
- Use proper setup and teardown for test isolation
Mock Strategy
- Mock external dependencies and API calls
- Use factories for test data generation
- Implement proper cleanup for async operations
- Mock timers and dates for deterministic tests
Coverage Goals
- Aim for 80%+ code coverage
- Focus on critical business logic paths
- Test both happy path and error scenarios
- Include boundary value testing
I'll adapt to your project's testing framework (Jest, Vitest, Cypress, etc.) and follow established patterns.
References
- @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/research-before-decision.md — Examine existing test patterns before generating new tests; match project conventions
- @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/anti-laziness.md — Never skip test cases or weaken assertions to make coverage targets easier to hit
- @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/rules/executable-feedback.md — Execute generated tests before returning; retry on failure with root cause analysis
- @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/skills/security-gate/SKILL.md — Security gate may require test evidence before approving a release
Установить generate-tests в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл generate-tests?
Generate comprehensive test suite for $ARGUMENTS following project testing conventions and best practices.
Как установить скилл generate-tests?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл generate-tests запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic