Skip to main content
skill CX Codex

test-specialist · travisjneuman — Claude Code skill: what it does, how to install

test-specialist — a Claude Code skill that supplies test patterns for JS/TS, Python, Go, and Rust. Activates only when you explicitly ask for tests or coverage targets.

MIT 138 installs ★ 114 updated 2026-11-10

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add travisjneuman/.claude --skill test-specialist -a claude-code
Open on GitHub

What test-specialist does

Supplies testing patterns for unit, integration, and E2E suites across TypeScript, Python, Go, and Rust. The agent loads these instructions only upon a direct request to add tests or inspect test coverage. Without an explicit prompt, it verifies code changes through git diffs.

Mandates Vitest, Jest, Testing Library, Supertest, and Cypress for JavaScript projects. Playwright, Puppeteer, and Selenium are strictly prohibited: the skill bans installing, running, or suggesting them. In Vitest browser testing, only the preview provider is allowed.

What it helps with

  • write unit and integration tests across TypeScript, Python, Go, or Rust
  • set up Cypress E2E flows while enforcing a ban on Playwright tools
  • catch race conditions and boundary cases with parameterized checks
  • reach coverage targets up to 90% on critical application paths

Example prompts for the agent

  • Write Vitest unit tests for the discount logic in src/pricing.ts
  • Add Supertest integration tests for endpoint POST /api/items
  • Create a Cypress E2E test verifying the checkout flow

How to install test-specialist

1Skills CLI (Vercel)

npx skills add travisjneuman/.claude --skill test-specialist -a claude-code

2Manually: put the files in place

~/.claude/skills/test-specialist/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/test-specialist/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about test-specialist

How do I install test-specialist in Claude Code?

Run npx skills add travisjneuman/.claude --skill test-specialist -a claude-code.

What does test-specialist do?

It directs the agent on writing unit, integration, and E2E suites using AAA patterns, user-centric component checks, and target coverage ratios.

Can test-specialist generate Playwright tests?

No. The skill strictly bans Playwright, Puppeteer, and Selenium, requiring Cypress or Vitest browser mode with the preview provider instead.

Source text

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

Similar skills

All skills for Testing and QA →

test-specialist by other authors comes first.

test-specialist ailabs-393 test-specialist guides AI coding agents when writing test suites and debugging JavaScript or TypeScript codebases. Useful for fixing coverage gaps and catching runtime errors. CX Codex +1 908installs playwright-cursor-rules Mindrally Trains the agent to write Playwright end-to-end tests following QA automation standards: stable locators, isolation, parallel execution. CX Codex +1 738installs prowler-test-ui prowler-cloud prowler-test-ui enforces Playwright E2E testing conventions for Prowler UI. Useful when building or editing tests inside ui/tests. CX Codex +1 ★ 15,302repo stars playwright-generate-test official github playwright-generate-test generates a Playwright test from a scenario through Playwright MCP. Use it when the browser flow should be completed before test code is written. CX Codex +1 18,162installs test-automation-framework aj-geddes Designs test automation frameworks with Page Object Model, fixtures, and reporting. It kicks in when a test suite grows past the point where ad-hoc scripts stay maintainable. CX Codex +1 507installs rust-port morganlinton rust-port — a Claude Code skill ports code from C, C++, Python, Go, JavaScript, or TypeScript to Rust. It activates for requests to rewrite or migrate code into Rust. CX Codex +1 873installs playwright-skill testdino.com Supplies the agent with 79 reference guides for Playwright 1.64 across TypeScript and JavaScript. Helps write tests, investigate CI failures, configure mocking, and stabilize flaky suites. CX Codex +1 6,200installs

From the same set117

The whole set →
product-analytics product-analytics architects event tracking, funnels, cohorts, and privacy-compliant instrumentation for PostHog, Amplitude, Mixpanel, and Segment. CX Codex +1 139installs payment-integration The payment-integration skill covers Stripe and RevenueCat integrations, subscription flows, and webhook handling. Use it when building payments or reviewing PCI scope. CX Codex +1 139installs generic-static-feature-developer generic-static-feature-developer guides feature work on plain HTML, CSS and JS sites: vanilla patterns, a GitHub Actions deploy and checks before you commit. CX Codex +1 139installs customer-success customer-success guides engineering workflows for customer support systems, knowledge bases, ticketing integrations, and health metrics. CX Codex +1 138installs battle-card-builder battle-card-builder builds sales battle cards, competitive comparisons, and structured objection scripts using an 8-part framework. CX Codex +1 137installs serverless-development serverless-development — a skill for AI coding on serverless compute: AWS Lambda, Vercel Edge, Cloudflare Workers. Useful when an API or webhook has to scale on its own. CX Codex +1 133installs growth-engineering growth-engineering is a Claude Code skill with architecture patterns for feature flags, A/B testing, PLG funnels, and referral tracking. CX Codex +1 133installs email-systems email-systems — a skill for Claude Code that guides transactional email setup, template design, and deliverability records. Runs when configuring sending infrastructure, building HTML templates, or troubleshooting inboxing. CX Codex +1 132installs

Project sponsors

Companies that keep this analytics open