Claude Code SkillDevelopment6 installs

Test Detect

Auto-detect testing framework and run relevant tests. Identifies Jest, Vitest, Playwright, Cypress, pytest, Go test, and others. Can run all tests, specific file tests, or generate basic tests for new code. Usage - /test-detect, /test-detect src/auth/login.ts, /test-detect generate src/utils.ts

Install with the Claude Code Templates CLI
$ npx claude-code-templates@latest --skill="development/test-detect" --yes

Requires Claude Code. The command adds this skill to your project's .claudedirectory — nothing runs on ToolZip's servers.

What's inside this skill

Component source

Test Detect

Automatically detect the testing framework in the current project and run the right tests.

Workflow

Step 1: Detect the testing framework

Check for these files in order (first match wins):

CheckFrameworkRun Command
vitest.config.* exists OR vitest in devDepsVitestnpx vitest run
jest.config.* exists OR jest in devDepsJestnpx jest
playwright.config.* existsPlaywrightnpx playwright test
cypress.config.* existsCypressnpx cypress run
pytest.ini or conftest.py or pyproject.toml with [tool.pytest]pytestpython -m pytest
go.mod existsGo testgo test ./...
Cargo.toml existsRust/cargocargo test
mix.exs existsExUnitmix test
Gemfile with rspecRSpecbundle exec rspec
package.json has scripts.testnpm testnpm test

Report the detected framework before proceeding.

Step 2: Parse arguments

Check $ARGUMENTS for the mode:

  • No arguments or "all": Run the full test suite (Step 3)
  • File path (e.g., src/auth/login.ts): Run tests for that file (Step 4)
  • "generate" + file path (e.g., generate src/utils.ts): Generate tests (Step 5)

Step 3: Run full test suite

Run the detected test command. After completion:

  • Report total tests, passed, failed, skipped
  • If tests fail, show the first 3 failure messages with file:line references
  • Suggest: "Run /test-detect <failing-file> to investigate a specific failure"

Step 4: Run tests for a specific file

Given a source file path, find its test file:

Search strategy (try in order):
  • __tests__/<filename>.test.<ext> (Jest convention)
  • <filename>.test.<ext> (co-located)
  • <filename>.spec.<ext> (alternative convention)
  • test/<filename>_test.<ext> (Go/Python convention)
  • tests/test_<filename>.<ext> (pytest convention)
  • <filename>_test.go (Go convention)

Use Glob to find matches. If found, run only that test file:

FrameworkCommand
Vitestnpx vitest run <test-file>
Jestnpx jest <test-file>
Playwrightnpx playwright test <test-file>
pytestpython -m pytest <test-file>
Gogo test -run <TestName> ./<package>/
Cargocargo test <test_name>

If no test file found, ask: "No tests found for this file. Want me to generate them? Run /test-detect generate <file>"

Step 5: Generate tests

Read the source file and analyze:

  • Identify all exported functions/classes/components
  • Determine the appropriate test patterns for the framework
  • Generate a test file with:
- Import statements

- describe block per function/class

- it/test blocks covering: happy path, edge cases, error cases

- Framework-appropriate assertions and mocking

Save to the conventional location for the detected framework:
  • Jest/Vitest: __tests__/<filename>.test.<ext> or <filename>.test.<ext> (match existing convention)
  • pytest: tests/test_<filename>.py
  • Go: <filename>_test.go (same directory)
  • RSpec: spec/<filename>_spec.rb

Show the generated file path and ask if the user wants to run the new tests.

Tips

  • If multiple frameworks are detected (e.g., Vitest for unit tests + Playwright for e2e), mention both and default to the unit test framework
  • For monorepos, detect from the closest config file to the current directory
  • If package.json has both test and test:unit/test:e2e scripts, prefer the specific one when context is clear
Type
Skill
Category
Development
Installs
6
Source
GitHub ↗

Related Claude Code Skills

SkillDevelopment

Code Reviewer

Comprehensive code review skill for TypeScript, JavaScript, Python, Swift, Kotlin, Go. Includes automated code analysis, best practice checking, security scanning, and review checklist generation. Use when reviewing pull requests, providing code feedback, identifying issues, or ensuring code quality standards.

3k installsView →
SkillDevelopment

Senior Frontend

Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component scaffolding, performance optimization, bundle analysis, and UI best practices. Use when developing frontend features, optimizing performance, implementing UI/UX designs, managing state, or reviewing frontend code.

2.7k installsView →
SkillDevelopment

Senior Backend

Comprehensive backend development skill for building scalable backend systems using NodeJS, Express, Go, Python, Postgres, GraphQL, REST APIs. Includes API scaffolding, database optimization, security implementation, and performance tuning. Use when designing APIs, optimizing database queries, implementing business logic, handling authentication/authorization, or reviewing backend code.

2.2k installsView →
SkillDevelopment

Senior Architect

Comprehensive software architecture skill for designing scalable, maintainable systems using ReactJS, NextJS, NodeJS, Express, React Native, Swift, Kotlin, Flutter, Postgres, GraphQL, Go, Python. Includes architecture diagram generation, system design patterns, tech stack decision frameworks, and dependency analysis. Use when designing system architecture, making technical decisions, creating architecture diagrams, evaluating trade-offs, or defining integration patterns.

1.9k installsView →
SkillDevelopment

Skill Creator

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

1.7k installsView →
SkillDevelopment

Senior Fullstack

Comprehensive fullstack development skill for building complete web applications with React, Next.js, Node.js, GraphQL, and PostgreSQL. Includes project scaffolding, code quality analysis, architecture patterns, and complete tech stack guidance. Use when building new projects, analyzing code quality, implementing design patterns, or setting up development workflows.

1k installsView →

Catalog data and component content are sourced from the open-source davila7/claude-code-templates project (MIT license). ToolZip curates the listing and writes original descriptions; every component links back to its original source. Claude Code is a product of Anthropic. ToolZip is an independent catalog and is not affiliated with or endorsed by Anthropic.