test-master — скилл для Claude Code: тесты, покрытие, отчёты
Скилл для написания юнит-, интеграционных и E2E-тестов, разбора покрытия и поиска причин нестабильных тестов. Пригодится, когда тестов нет или они падают через раз.
npx skills add Jeffallan/claude-skills --skill test-master -a claude-codeЧто делает test-master
test-master ведёт агента по пяти шагам: определить объём тестирования, собрать стратегию, написать тесты, прогнать их и оформить отчёт. Если тест упал, скилл требует отделить ошибку утверждения от проблемы окружения или флаки, починить причину и запустить снова. Флаки-тесты он советует не перезапускать до зелёного, а изолировать и разобрать зависимости по порядку выполнения.
Внутри — набор справочников, которые агент подгружает по контексту: references/unit-testing.md для Jest, Vitest и pytest, references/integration-testing.md для API и Supertest, references/e2e-testing.md, references/performance-testing.md под k6, references/security-testing.md с чек-листом, а также шаблоны отчётов, методология QA, паттерны автоматизации, iron laws TDD и антипаттерны тестирования.
Жёсткие правила тоже прописаны: мокать внешние зависимости, не ходить в реальные API и базы из юнит-тестов, не брать продакшн-данные вместо фикстур, проверять конкретный результат, а не истинность, и не тестировать внутренние вызовы методов. Отчёт должен содержать объём, тест-кейсы с ожидаемым результатом, анализ покрытия, находки с серьёзностью от Critical до Low и конкретные рекомендации по исправлению.
Какие задачи решает
- написать юнит-тесты на Jest или pytest с осмысленными описаниями
- разобраться, почему тест падает только в CI и проходит локально
- закрыть пробелы в покрытии перед релизом
- собрать стратегию тестирования для нового сервиса
- проверить API на уязвимости по чек-листу OWASP
Примеры запросов агенту
- Напиши юнит-тесты для
calculateDiscount, проверь граничные значения и отрицательную цену - Разберись, почему
checkout.spec.tsпадает через раз, и убери зависимость от порядка запуска - Собери тест-план для нового API и отметь пробелы в покрытии
Как установить test-master
1Через Skills CLI (Vercel)
npx skills add Jeffallan/claude-skills --skill test-master -a claude-code2Вручную: положить файлы
~/.claude/skills/test-master/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/test-master/
1Через Skills CLI (Vercel)
npx skills add Jeffallan/claude-skills --skill test-master -a codex2Вручную: положить файлы
.agents/skills/test-master/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add Jeffallan/claude-skills --skill test-master -a cursor2Вручную: положить файлы
.cursor/skills/test-master/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install Jeffallan/claude-skills test-master2Вручную: положить файлы
.github/skills/test-master/SKILL.md1Через Skills CLI (Vercel)
npx skills add Jeffallan/claude-skills --skill test-master -a gemini-cli2Командой платформы
gemini skills install https://github.com/Jeffallan/claude-skills --path skills/test-masterВручную: положить файлы
.devin/skills/test-master/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add Jeffallan/claude-skills --skill test-master -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о test-master
Как установить test-master в Claude Code?
Выполните npx skills add Jeffallan/claude-skills --skill test-master -a claude-code. После этого файл скилла окажется в ~/.claude/skills/test-master/SKILL.md.
Что делает test-master?
Помогает агенту писать тесты, строить стратегию тестирования, анализировать покрытие и оформлять отчёты с находками и рекомендациями. Работает и с производительностью, и с проверками безопасности.
Чем test-master отличается от обычного запроса «напиши тесты»?
Он задаёт структуру: пять шагов от объёма до отчёта, отдельный разбор флаки-тестов и запрет на продакшн-данные в тестах. Плюс подгружает справочники под конкретный фреймворк.
Исходный текст
SKILL.md · MIT
---
name: test-master
description: Generates test files, creates mocking strategies, analyzes code coverage, designs test architectures, and produces test plans and defect reports across functional, performance, and security testing disciplines. Use when writing unit tests, integration tests, or E2E tests; creating test strategies or automation frameworks; analyzing coverage gaps; performance testing with k6 or Artillery; security testing with OWASP methods; debugging flaky tests; or working on QA, regression, test automation, quality gates, shift-left testing, or test maintenance.
license: MIT
metadata:
author: https://github.com/Jeffallan
company: https://synergetic.solutions
version: "1.1.1"
domain: quality
triggers: test, testing, QA, unit test, integration test, E2E, coverage, performance test, security test, regression, test strategy, test automation, test framework, quality metrics, defect, exploratory, usability, accessibility, localization, manual testing, shift-left, quality gate, flaky test, test maintenance
role: specialist
scope: testing
output-format: report
related-skills: fullstack-guardian, playwright-expert, devops-engineer, debugging-wizard, code-reviewer, feature-forge
---
# Test Master
Comprehensive testing specialist ensuring software quality through functional, performance, and security testing.
## Core Workflow
1. **Define scope** — Identify what to test and which testing types apply
2. **Create strategy** — Plan the test approach across functional, performance, and security perspectives
3. **Write tests** — Implement tests with proper assertions (see example below)
4. **Execute** — Run tests and collect results
- If tests fail: classify the failure (assertion error vs. environment/flakiness), fix root cause, re-run
- If tests are flaky: isolate ordering dependencies, check async handling, add retry or stabilization logic
5. **Report** — Document findings with severity ratings and actionable fix recommendations
- Verify coverage targets are met before closing; flag gaps explicitly
## Quick-Start Example
A minimal Jest unit test illustrating the key patterns this skill enforces:
```js
// ✅ Good: meaningful description, specific assertion, isolated dependency
describe('calculateDiscount', () => {
it('applies 10% discount for premium users', () => {
const result = calculateDiscount({ price: 100, userTier: 'premium' });
expect(result).toBe(90); // specific outcome, not just truthy
});
it('throws on negative price', () => {
expect(() => calculateDiscount({ price: -1, userTier: 'standard' }))
.toThrow('Price must be non-negative');
});
});
```
Apply the same structure for pytest (`def test_…`, `assert result == expected`) and other frameworks.
## Reference Guide
Load detailed guidance based on context:
<!-- TDD Iron Laws and Testing Anti-Patterns adapted from obra/superpowers by Jesse Vincent (@obra), MIT License -->
| Topic | Reference | Load When |
|-------|-----------|-----------|
| Unit Testing | `references/unit-testing.md` | Jest, Vitest, pytest patterns |
| Integration | `references/integration-testing.md` | API testing, Supertest |
| E2E | `references/e2e-testing.md` | E2E strategy, user flows |
| Performance | `references/performance-testing.md` | k6, load testing |
| Security | `references/security-testing.md` | Security test checklist |
| Reports | `references/test-reports.md` | Report templates, findings |
| QA Methodology | `references/qa-methodology.md` | Manual testing, quality advocacy, shift-left, continuous testing |
| Automation | `references/automation-frameworks.md` | Framework patterns, scaling, maintenance, team enablement |
| TDD Iron Laws | `references/tdd-iron-laws.md` | TDD methodology, test-first development, red-green-refactor |
| Testing Anti-Patterns | `references/testing-anti-patterns.md` | Test review, mock issues, test quality problems |
## Constraints
**MUST DO**
- Test happy paths AND error/edge cases (e.g., empty input, null, boundary values)
- Mock external dependencies — never call real APIs or databases in unit tests
- Use meaningful `it('…')` descriptions that read as plain-English specifications
- Assert specific outcomes (`expect(result).toBe(90)`), not just truthiness
- Run tests in CI/CD; document and remediate coverage gaps
**MUST NOT**
- Skip error-path testing (e.g., don't test only the success branch of a try/catch)
- Use production data in tests — use fixtures or factories instead
- Create order-dependent tests — each test must be independently runnable
- Ignore flaky tests — quarantine and fix them; don't just re-run until green
- Test implementation details (internal method calls) — test observable behaviour
## Output Templates
When creating test plans, provide:
1. Test scope and approach
2. Test cases with expected outcomes
3. Coverage analysis
4. Findings with severity (Critical/High/Medium/Low)
5. Specific fix recommendations
Maintained by [@jeffallan](https://github.com/jeffallan), Principal Consultant at [Synergetic Solutions](https://synergetic.solutions)
[Documentation](https://jeffallan.github.io/claude-skills/skills/quality/test-master/)
© https://github.com/Jeffallan · MIT · Jeffallan/claude-skills