test-detect — Claude Code skill: tests and setup
Detects the project’s test framework, runs the matching checks, and can create starter tests for a source file.
npx claude-code-templates@latest --skill development/test-detectWhat test-detect 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.
What it helps with
- 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 for the agent
- Detect the test framework and run the full suite.
- Run tests for
src/auth/login.ts. - Generate tests for
src/utils.ts.
How to install test-detect
1claude-code-templates
npx claude-code-templates@latest --skill development/test-detect2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill test-detect -a claude-code3Manually: put the files in place
~/.claude/skills/test-detect/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/test-detect/
Manually: put the files in place
.agents/skills/test-detect/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/test-detect/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates test-detect2Manually: put the files in place
.github/skills/test-detect/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/development/test-detectManually: put the files in place
.devin/skills/test-detect/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about test-detect
How do I install test-detect in Claude Code?
Run npx claude-code-templates@latest --skill development/test-detect.
What does test-detect do?
It detects the project’s test framework and runs either the full suite or tests associated with one source file. Its generate mode writes a starter test file based on the source code.
Which frameworks can test-detect detect?
It checks for Vitest, Jest, Playwright, Cypress, pytest, Go test, Cargo, ExUnit, RSpec, and npm test. If several are present, it reports them and defaults to the unit-test framework.