# test-detect

Detects the project’s test framework, runs the matching checks, and can create starter tests for a source file.

- skill · `type=skill` · Claude Code · 56 installs
- Author: davila7
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/skills/development/test-detect
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/test-detect

## What it does

The skill inspects project configuration and dependencies, reports the framework it found, then runs its matching command. It covers Vitest, Jest, Playwright, Cypress, pytest, Go test, Cargo, ExUnit, RSpec, and `npm test`. A full run reports test totals and shows the first failure messages with file and line references.

Give it a source path and it searches common locations such as `__tests__`, `test`, and `tests` for a matching test file. With `generate`, it reads the source, identifies exported functions, classes, or components, and writes a test covering the normal path, edge cases, and errors. In a monorepo, detection uses the configuration nearest to the current directory, so changing where you run the command can change the selected framework.

When several frameworks are present, the skill reports them and defaults to the unit-test option. It can run commands such as `npx vitest run`, `npx jest`, `python -m pytest`, or `go test ./...`, depending on the project.

## Requirements
- Works with: Playwright

## Install

### Claude Code (native platform)

1. **claude-code-templates**
```bash
npx claude-code-templates@latest --skill development/test-detect
```

2. **Skills CLI (Vercel)**
```bash
npx skills add davila7/claude-code-templates --skill test-detect -a claude-code
```

3. **Manually: put the files in place**
- File: `~/.claude/skills/test-detect/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/test-detect/

### Codex

**Manually: put the files in place**
- File: `.agents/skills/test-detect/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

**Manually: put the files in place**
- File: `.cursor/skills/test-detect/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install davila7/claude-code-templates test-detect
```

2. **Manually: put the files in place**
- File: `.github/skills/test-detect/SKILL.md`

### Gemini CLI

**Platform CLI**
```bash
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/development/test-detect
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/test-detect/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/skills/development/test-detect

## When to use it
- identify the test framework from project files
- run the full suite with the matching command
- locate tests for a source file
- create starter coverage for new code
- surface the first failures with file and line references

## Example prompts
- Detect the test framework and run the full suite.
- Run tests for `src/auth/login.ts`.
- Generate tests for `src/utils.ts`.

## Similar
- [improve-codebase-architecture](https://affpapa.org/en/nevibecode/skills/improve-codebase-architecture.md) — skill · 1163035 installs
- [design-taste-frontend](https://affpapa.org/en/nevibecode/skills/design-taste-frontend.md) — skill · 678700 installs
- [tdd](https://affpapa.org/en/nevibecode/skills/tdd.md) — skill · 1141062 installs
- [skill-creator](https://affpapa.org/en/nevibecode/skills/skill-creator.md) — skill · 414180 installs
- [agent-browser](https://affpapa.org/en/nevibecode/skills/vercel-labs-agent-browser.md) — skill · 1200000 installs
- [prototype](https://affpapa.org/en/nevibecode/skills/prototype.md) — skill · 986201 installs

From the same set: [davila7/claude-code-templates](https://affpapa.org/en/nevibecode/by/davila7/claude-code-templates.md) — 804 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
