Skip to main content
skill CX Codex

testing · tartinerlabs — Claude Code skill: what it does, how to install

This skill detects a project’s language and test runner, then helps write, run, review, and debug unit or component tests.

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

What testing does

The skill inspects manifests, lockfiles, and existing tests to identify the project language, runner, package manager, file naming, and test location. It covers JS/TS with Vitest, Jest, or node:test; Python with pytest or unittest; Go with go test; and Rust with cargo test.

When asked to write tests, it follows the repository’s conventions, uses Arrange, Act, Assert, and covers happy paths, edge cases, and errors. When asked to run the suite, it uses the project command or the runner default, reports failures, and re-runs after test fixes.

E2E and browser testing are outside this skill’s scope, so those requests are redirected to browser automation tooling. For other languages, it relies on the project’s existing test conventions and the language-neutral rules.

What it helps with

  • identify the project’s test runner
  • write unit tests that match repository conventions
  • cover edge and error cases
  • run the suite and inspect failures
  • review tests for weak assertions

Example prompts for the agent

  • Review the tests for src/auth.ts and point out weak assertions.
  • Add tests for an empty response in src/parser.ts, then run the project suite.
  • Run the tests and fix the case that fails because its expected value is wrong.

How to install testing

1Skills CLI (Vercel)

npx skills add tartinerlabs/skills --skill testing -a claude-code

2Manually: put the files in place

~/.claude/skills/testing/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/testing/

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

Questions about testing

How do I install testing in Claude Code?

Run npx skills add tartinerlabs/skills --skill testing -a claude-code, then check ~/.claude/skills/testing/SKILL.md.

What does the testing skill do?

It detects the project language and test runner, writes or reviews unit and component tests, runs the suite, and investigates failures.

Does testing handle E2E tests?

No. E2E and browser work is outside its scope; those requests are directed to separate browser automation tools.

Source text

SKILL.md · MIT
---
name: testing
description: Use when writing tests, running tests, adding test coverage, or debugging test failures. Detects the language and its test runner (JS/TS, Python, Go, Rust) for unit and component testing.
license: MIT
allowed-tools: Read Glob Grep Write Edit Bash(nub:*) Bash(nubx:*) Bash(pnpm:*) Bash(npm:*) Bash(bun:*) Bash(yarn:*) Bash(pytest:*) Bash(python:*) Bash(python3:*) Bash(go:*) Bash(cargo:*)
model: haiku
effort: medium
compatibility: Any language with a test runner; JS/TS (Vitest/Jest/node:test) is best-supported, Python (pytest/unittest), Go (go test) and Rust (cargo test) covered via references/
metadata:
  short-description: Write, run, and review tests.
---

You are an expert test engineer. You detect the project's language and test runner, then write, run, or review tests using that ecosystem's idioms.

## Routing

Determine the test type from the user's request:

- **E2E / browser testing** (keywords: "e2e", "end-to-end", "browser", "playwright", "page interaction", "screenshot") → Out of scope for this skill. Point the user to their agent's own browser/E2E automation tooling (e.g. Playwright, or a dedicated browser-automation capability) and stop.
- **Unit / component testing** → Proceed with the workflow below.

## Mode Detection

Review by default: read the tests and source and report gaps, weak assertions, and missing edge cases without editing — stopping after Step 2. Run the suite when asked to run it (Step 4), reporting failures without editing. Write or edit tests only when asked to write, fix, or improve coverage — then Steps 3-4 both apply, and running tests to observe failures before editing them is expected. When the ask is unclear, review and offer to write or run them.

## Universal Rules (apply to every language)

These rules carry the language-neutral principles — read them regardless of ecosystem:

| Rule | Impact | File |
|------|--------|------|
| Test structure | HIGH | `rules/test-structure.md` |
| Test quality | MEDIUM | `rules/test-quality.md` |

## Workflow

### Step 1: Detect Language and Runner

Detect the project's language from its manifest/lockfile, then load the matching ecosystem guide:

| Language | Detected by | Runner(s) | Ecosystem guide |
|----------|-------------|-----------|-----------------|
| **JS/TS** | `package.json` | Vitest · Jest · node:test | `rules/js-runner-patterns.md` (+ `rules/component-testing.md` for UI components) |
| **Python** | `pyproject.toml`, `requirements*.txt`, `setup.py`, `setup.cfg`, `tox.ini` | pytest · unittest | `references/python.md` |
| **Go** | `go.mod` | `go test` (stdlib `testing`) | `references/go.md` |
| **Rust** | `Cargo.toml` | `cargo test` (built-in `#[test]`) | `references/rust.md` |

Load **only** the guide for the detected language — do not read the others. If a project mixes languages, handle the one the user's target file belongs to. For a language not listed above (e.g. Ruby), apply the Universal Rules and the project's existing test conventions; note that first-class support for it is not yet bundled.

### Step 2: Detect Project Setup

Scan the project to match existing conventions:

1. **Runner**: identify the runner per the ecosystem guide (e.g. Vitest vs Jest vs node:test for JS/TS; pytest vs unittest for Python)
2. **Existing tests**: find the naming and location convention already in use (`*.test.ts`, `*.spec.ts`, `test_*.py`, `*_test.go`, colocated vs a `tests/` directory)
3. **Package manager / toolchain**: for JS/TS check `nub.lock`, `pnpm-lock.yaml`, `bun.lock`, `yarn.lock`, or `package-lock.json`

Match the project's existing patterns for naming, location, and imports.

### Step 3: Write Tests

Create the test file following project conventions:
1. Place the file according to the project's test location pattern
2. Use the project's naming convention
3. Follow the AAA pattern (Arrange, Act, Assert)
4. Cover the happy path, edge cases, and error cases — in the detected runner's idioms

### Step 4: Run and Verify

Run the tests with the project's own test command — the script in its manifest if there is one, otherwise the runner's default (`pytest`, `go test ./...`, `cargo test`).

Report the results. When writing or fixing, read the error output of a failure, correct the test, and re-run.

© tartinerlabs · MIT · tartinerlabs/skills

Similar skills

All skills for Testing and QA →

testing by other authors comes first.

testing tursodatabase Skill teaches you to write tests for SQL and Rust: choose between .sqltest, TCL and integration formats, run test suites with the right commands. CX Codex +1 1,300installs testing codewithmukesh A skill that lays out a testing strategy for .NET 10 apps: integration tests via WebApplicationFactory, real databases in Testcontainers, Verify snapshots. CX Codex +1 2,800installs testing grafana Sets up uptime probes, k6 load tests, and frontend observability through Grafana Cloud. Use it before a release or when investigating failures. CX Codex +1 4,200installs testing rshankras A set of TDD workflows and test infrastructure for Apple platform apps. Useful when an agent writes the code and you want tests around it. CX Codex +1 468installs testing Mindrally Defines software testing guidelines for AI agents, covering test isolation, table-driven checks, and mock boundaries. CX Codex +1 825installs improve-codebase-architecture Matt Pocock This skill scans a codebase for architectural friction, then builds a visual HTML report with refactoring candidates. Use it before a deeper architecture review. 1,163,035installs design-taste-frontend Leonxlnx This skill directs the design of public pages and work screens, then checks the result in a browser through screenshots. Use it when an interface feels generic or unfinished. CX Codex +1 678,700installs tdd Matt Pocock Guides the red-green TDD loop: ensures tests are written first, keep them at public interfaces, and avoid coupling to implementation details. 1,141,062installs skill-creator official anthropics Creates and refines skills, then tests them with prompts, evaluations, and performance checks. 414,180installs agent-browser vercel-labs A CLI skill for browser control: it opens pages, fills forms, clicks buttons, and tests web apps. Use it when an agent needs to act inside a website. CX Codex +1 1,200,000installs prototype Matt Pocock Creates throwaway prototypes for checking state logic or exploring UI before committing the decision to the main codebase. 986,201installs

From the same set9

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor