test-specialist · travisjneuman — скилл для Claude Code: что делает и как установить
Скилл test-specialist для Claude Code задаёт шаблоны модульных, интеграционных и сквозных тестов на JS/TS, Python, Go и Rust. Агент подключает правила только по прямому запросу на написание тестов или замер покрытия.
MIT 138 установок ★ 114 обновлён 2026-11-10
npx skills add travisjneuman/.claude --skill test-specialist -a claude-codeЧто делает test-specialist
Определяет шаблоны тестирования для TypeScript, Python, Go и Rust, отслеживает граничные значения и изолирует внешние зависимости. Включается строго по прямому указанию написать тесты. Без такого запроса агент проверяет код через диффы либо передаёт задачу другим профильным скиллам.
Для экосистемы JavaScript предписывает связки из Vitest, Jest, Testing Library, Supertest и Cypress. Playwright, Puppeteer и Selenium под полным запретом: скилл прямо запрещает их добавлять, запускать или рекомендовать в проекте. Для браузерных тестов компонентов в Vitest разрешён только провайдер preview.
Какие задачи решает
- написать модульные и интеграционные тесты для TypeScript, Python, Go или Rust
- настроить сквозные сценарии в Cypress без библиотек семейства Playwright
- проверить граничные условия, обработку null и состояние гонки при параллельных вызовах
- поднять покрытие тестами до целевых планок в 70–90% по критическим путям
Примеры запросов агенту
- Напиши модульные тесты на Vitest для функции расчёта скидки в
src/pricing.ts - Покрой интеграционными тестами эндпоинт
POST /api/itemsчерез Supertest - Добавь сквозной тест в Cypress для проверки оформления заказа в корзине
Как установить test-specialist
1Через Skills CLI (Vercel)
npx skills add travisjneuman/.claude --skill test-specialist -a claude-code2Вручную: положить файлы
~/.claude/skills/test-specialist/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/test-specialist/
1Через Skills CLI (Vercel)
npx skills add travisjneuman/.claude --skill test-specialist -a codex2Вручную: положить файлы
.agents/skills/test-specialist/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add travisjneuman/.claude --skill test-specialist -a cursor2Вручную: положить файлы
.cursor/skills/test-specialist/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install travisjneuman/.claude skills/test-specialist2Вручную: положить файлы
.github/skills/test-specialist/SKILL.md1Через Skills CLI (Vercel)
npx skills add travisjneuman/.claude --skill test-specialist -a gemini-cli2Командой платформы
gemini skills install https://github.com/travisjneuman/.claude --path skills/test-specialistВручную: положить файлы
.devin/skills/test-specialist/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add travisjneuman/.claude --skill test-specialist -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о test-specialist
Как установить test-specialist в Claude Code?
Выполните команду npx skills add travisjneuman/.claude --skill test-specialist -a claude-code.
Что делает test-specialist?
Скилл задаёт агенту структуру юнит-, интеграционных, E2E и визуальных тестов на четырёх языках программирования с фиксированными планками покрытия.
Почему test-specialist запрещает Playwright?
Правила скилла прямо запрещают Playwright, Puppeteer и WebDriver, заменяя их на Cypress или браузерный режим Vitest с провайдером preview.
Исходный текст
SKILL.md · MIT
---
name: test-specialist
description: Test-writing patterns for JS/TS, Python, Go, and Rust (unit, integration, E2E, visual regression). Use only when the user explicitly asks for tests or test coverage; for debugging without a test request, use debug-systematic.
---
# Test Specialist
Test-writing patterns for JS/TS, Python, Go, and Rust, plus bug-analysis habits that apply when tests are requested.
## When to Use
Use this skill only when the user explicitly asks for tests. Without that request, validate by reviewing the diff and the code it touches.
**Use for (when tests are requested):**
- Writing unit, integration, or E2E tests
- Improving test coverage
- Security and performance tests
**Don't use when:**
- Debugging without a test request → use `debug-systematic`
- Code review → use `generic-code-reviewer`
- Technical debt → use `tech-debt-analyzer`
- Feature development → use `generic-feature-developer`
## Testing Stack by Project
| Project Type | Unit Tests | Component | E2E |
| ------------- | ----------- | --------------- | ------- |
| React/Next.js | Vitest/Jest | Testing Library | Cypress |
| Node.js | Vitest/Jest | Supertest | Cypress |
| Static | Jest | - | Cypress |
Playwright (`@playwright/test`, `playwright-core`, Playwright MCP, Playwright browsers) is prohibited, and so are Puppeteer and Selenium/WebDriver: never add, install, run, or suggest them. For a browser-level suite use Cypress (or the project's existing non-Playwright runner); for components in a real browser, Vitest browser mode with the `preview` provider, never the `playwright` or `webdriverio` providers. Browser test runners, Percy, Chromatic, and `npx` browser downloads run only when the user asks, through an environment they have approved. To look at a page without a suite, use the active app's built-in browser, then `agent-browser`.
## Test Patterns
### Unit Tests (AAA Pattern)
```typescript
describe("calculateTotal", () => {
test("sums amounts correctly", () => {
// Arrange
const items = [{ amount: 100 }, { amount: 50 }];
// Act
const total = calculateTotal(items);
// Assert
expect(total).toBe(150);
});
test("handles empty list", () => {
expect(calculateTotal([])).toBe(0);
});
});
```
### Component Tests (User Behavior)
```typescript
// ✅ Test user behavior, not implementation
it('creates item when user clicks Add', async () => {
const user = userEvent.setup();
render(<ItemList />);
await user.click(screen.getByRole('button', { name: /add/i }));
await user.type(screen.getByLabelText(/title/i), 'New item');
await user.click(screen.getByRole('button', { name: /save/i }));
expect(screen.getByText('New item')).toBeInTheDocument();
});
```
### E2E Tests (Cypress)
```typescript
describe("checkout", () => {
it("user can complete checkout", () => {
cy.visit("/products");
// Add to cart
cy.contains("button", "Add to Cart").click();
cy.contains("a", "Cart").click();
// Checkout
cy.contains("button", "Checkout").click();
cy.get('[name="email"]').type("[email protected]");
cy.contains("button", "Place Order").click();
// Verify
cy.get("h1").should("contain.text", "Order Confirmed");
});
});
```
### Integration Tests
```typescript
test("POST /items creates item", async () => {
const response = await request(app)
.post("/api/items")
.send({ name: "Test" })
.expect(201);
expect(response.body).toMatchObject({ id: expect.any(Number) });
});
```
## Bug Analysis Process
1. **Reproduce** - Document exact steps, expected vs actual
2. **Isolate** - Binary search, minimal reproduction
3. **Root Cause** - Trace execution, check assumptions, git blame
4. **Fix** - Fix the root cause (write a failing test first only when the user asked for tests)
5. **Validate** - Review the diff and the code paths it touches against the reproduction and edge cases
## Debugging Checklist
When debugging an issue:
- [ ] Can reproduce consistently
- [ ] Minimal reproduction created
- [ ] Console/network logs checked
- [ ] State at failure point inspected
- [ ] Git blame checked for recent changes
- [ ] Fix reviewed against the reproduction (failing test only if tests were requested)
## Common Bug Patterns
### Race Conditions
```typescript
test("handles concurrent updates", async () => {
const promises = Array.from({ length: 100 }, () => increment());
await Promise.all(promises);
expect(getCount()).toBe(100);
});
```
### Null Safety
```typescript
test.each([null, undefined, "", 0])("handles invalid input: %p", (input) => {
expect(() => process(input)).toThrow("Invalid");
});
```
### Boundary Values
```typescript
test("handles edge cases", () => {
expect(paginate([], 1, 10)).toEqual([]); // empty
expect(paginate([item], 1, 10)).toEqual([item]); // single
expect(paginate(items25, 3, 10)).toHaveLength(5); // partial last page
});
```
## Reference files
Detailed material is in separate files so this overview stays short. Read only the file whose topic matches the task; each one is self-contained. Paths are relative to the folder that holds this `SKILL.md` (in the full toolkit install, `~/.claude/skills/test-specialist/`).
| Topic | File | Covers |
| --- | --- | --- |
| Security Tests | [`references/security-tests.md`](references/security-tests.md) | 18 lines |
| Python Testing (pytest) | [`references/python-testing-pytest.md`](references/python-testing-pytest.md) | Fixtures and Parametrize; Mocking; conftest.py Patterns |
| Go Testing | [`references/go-testing.md`](references/go-testing.md) | Table-Driven Tests; Testify Assertions and Mocks |
| Rust Testing | [`references/rust-testing.md`](references/rust-testing.md) | Unit and Integration Tests; Property-Based Testing (proptest) |
| Visual Regression Testing | [`references/visual-regression-testing.md`](references/visual-regression-testing.md) | Cypress Screenshot Comparison; Percy (Cloud Visual Testing); Chromatic (Storybook Visual Testing) |
## Performance Tests
```typescript
test("handles large datasets efficiently", () => {
const largeList = Array.from({ length: 10000 }, (_, i) => ({ value: i }));
const start = performance.now();
process(largeList);
expect(performance.now() - start).toBeLessThan(100);
});
```
## Coverage Targets
| Code Type | Target |
| -------------- | ------ |
| Critical paths | 90%+ |
| Business logic | 85%+ |
| UI components | 75%+ |
| Utilities | 70%+ |
## Test Quality Principles
1. **One behavior per test**
2. **Descriptive names** - test names explain scenario
3. **Independent tests** - no shared state
4. **Cover edge cases** - null, empty, boundaries, errors
5. **Mock external deps** - tests should be fast
6. **Test behavior** - not implementation details
## Workflow Decision Tree
| Situation | Action |
| -------------------------------- | ------------------------------------ |
| Adding feature (tests requested) | Write test first (TDD) |
| Fixing bug (tests requested) | Write failing test, then fix |
| Improving coverage | Find gaps, prioritize critical paths |
| Code review | Check edge cases, error handling |
---
## See Also
- [Code Review Standards](../_shared/CODE_REVIEW_STANDARDS.md) - Quality requirements
- Project `CLAUDE.md` - Testing rules
© travisjneuman · MIT · travisjneuman/.claude
Похожие скиллы
Все скиллы по теме «Тесты и QA» →Сначала — test-specialist от других авторов.