Provides test-writing patterns for JS/TS, Python, Go, and Rust covering unit, integration, E2E, and visual regression tests. Activates only when the user explicitly asks for tests or test coverage.
Ships in tjn-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Test-writing patterns for JS/TS, Python, Go, and Rust, plus bug-analysis habits that apply when tests are requested.
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):
Don't use when:
debug-systematicgeneric-code-reviewertech-debt-analyzergeneric-feature-developer| 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.
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);
});
});
// ✅ 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();
});
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");
});
});
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) });
});
When debugging an issue:
test("handles concurrent updates", async () => {
const promises = Array.from({ length: 100 }, () => increment());
await Promise.all(promises);
expect(getCount()).toBe(100);
});
test.each([null, undefined, "", 0])("handles invalid input: %p", (input) => {
expect(() => process(input)).toThrow("Invalid");
});
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
});
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 | 18 lines |
| Python Testing (pytest) | references/python-testing-pytest.md | Fixtures and Parametrize; Mocking; conftest.py Patterns |
| Go Testing | references/go-testing.md | Table-Driven Tests; Testify Assertions and Mocks |
| Rust Testing | references/rust-testing.md | Unit and Integration Tests; Property-Based Testing (proptest) |
| Visual Regression Testing | references/visual-regression-testing.md | Cypress Screenshot Comparison; Percy (Cloud Visual Testing); Chromatic (Storybook Visual Testing) |
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);
});
| Code Type | Target |
|---|---|
| Critical paths | 90%+ |
| Business logic | 85%+ |
| UI components | 75%+ |
| Utilities | 70%+ |
| 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 |
CLAUDE.md - Testing rulesindex.js (opens in a new tab)package.json (opens in a new tab)references/bug_analysis.md (opens in a new tab)references/go-testing.md (opens in a new tab)references/python-testing-pytest.md (opens in a new tab)references/rust-testing.md (opens in a new tab)references/security-tests.md (opens in a new tab)references/testing_patterns.md (opens in a new tab)references/visual-regression-testing.md (opens in a new tab)scripts/analyze_coverage.py (opens in a new tab)scripts/find_untested_code.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
TypeScript, JavaScript, Python, Go, Rust, Jest, Vitest, Cypress
183 skills in this plugin
/accessibility-a11yWCAG 2.2 compliance, ARIA patterns, keyboard navigation, screen readers, automated testing/agent-accessibility-expertSpecialist subagent: WCAG compliance, screen reader compatibility, and inclusive design patterns. Use when auditing accessibility, fixing a11y issues, or designing inclusive UIs./agent-android-developerSpecialist subagent: Expert Android developer specializing in Kotlin, Jetpack Compose, and modern Android architecture/agent-api-designerSpecialist subagent: Designs REST and GraphQL APIs following best practices. Use when creating new APIs, reviewing API design, or writing OpenAPI specifications./agent-api-integration-specialistSpecialist subagent: Third-party API integration, webhook handling, OAuth flows, rate limiting, and SDK wrapping specialist. Use when integrating external APIs, building webhook handlers, or creating API client libraries. Trigger phrases: API integration, webhook, third-party API, SDK wrapper, OAuth flow, rate limiting, retry strategy, API client, REST client, webhook handler./agent-audio-engineerSpecialist subagent: Expert audio engineer for recording, mixing, mastering, and sound design/tjn-skills:test-specialistfrom tjn-skills
npx claudepluginhub travisjneuman/.claude --plugin tjn-skillsOther plugins' skills for the same job