Test Detect
SkillWeb & browsingtest-detect is a skill that detects which testing framework your project uses and runs its tests. It identifies frameworks such as Jest, Vitest, Playwright, Cypress, pytest, and Go test. You can run all tests, run tests for a specific file, or generate basic tests for new code.
Use Test Detect in Claude, ChatGPT or Ahel Desktop
Free. Sign in, add Test Detect and connect your AI. About a minute.
Also: Claude Code · Cursor · Codex
Then ask your AI: use the Test Detect skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; ahel provides instructions and does not run this skill.
No other account needed.
Have a project with a supported testing framework configured.
What your AI can do with it
- Detect Jest, Vitest, Playwright, Cypress, pytest, Go test, and others
- Run all tests in the project
- Run tests for a specific file
- Generate basic tests for new code
Getting started
- Have a project with a supported testing framework configured.
- Add the test-detect skill to your AI agent.
- Use /test-detect to run all tests.
- Use /test-detect src/auth/login.ts to run tests for a specific file.
- Use /test-detect generate src/utils.ts to generate basic tests for new code.
What this skill tells your AI
The instructions your AI receives, as published by davila7/claude-code-templates in cli-tool/components/skills/development/test-detect/SKILL.md and read by ahel’s review.
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):
| Check | Framework | Run Command |
|---|---|---|
vitest.config.* exists OR vitest in devDeps | Vitest | npx vitest run |
jest.config.* exists OR jest in devDeps | Jest | npx jest |
playwright.config.* exists | Playwright | npx playwright test |
cypress.config.* exists | Cypress | npx cypress run |
pytest.ini or conftest.py or pyproject.toml with [tool.pytest] | pytest | python -m pytest |
go.mod exists | Go test | go test ./... |
Cargo.toml exists | Rust/cargo | cargo test |
mix.exs exists | ExUnit | mix test |
Gemfile with rspec | RSpec | bundle exec rspec |
package.json has scripts.test | npm test | npm 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:
| Framework | Command |
|---|---|
| Vitest | npx vitest run <test-file> |
| Jest | npx jest <test-file> |
| Playwright | npx playwright test <test-file> |
| pytest | python -m pytest <test-file> |
| Go | go test -run <TestName> ./<package>/ |
| Cargo | cargo 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
describeblock per function/classit/testblocks 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.jsonhas bothtestandtest:unit/test:e2escripts, prefer the specific one when context is clear
Signals
- GitHub stars
- 32k
- Forks
- 4k
- Last commit
- Oct 2026
Questions
- What testing frameworks does test-detect identify?
- It identifies Jest, Vitest, Playwright, Cypress, pytest, Go test, and others.
- Can test-detect run tests for a specific file?
- Yes, use /test-detect src/auth/login.ts to run tests for that file.
- Can test-detect generate tests for new code?
- Yes, use /test-detect generate src/utils.ts to generate basic tests for new code.
- How do I run all tests with test-detect?
- Use the command /test-detect to run all tests in the project.
Advanced
- Item type
- skill
- Key
test-detect- Source
- github.com/davila7/claude-code-templates
github.com/davila7/claude-code-templates
More in Web & browsing
Skill · browser-use
More in Web & browsingwebapp-testing
Skill · anthropics
More in Web & browsingplaywright-cli
Skill · microsoft
More in Web & browsingbenchmark
Skill · affaan-m
More in Web & browsingopen-source
Skill · browser-use
More in Web & browsingimpeccable
Skill · pbakaus
More in Web & browsing