/qa-testing:test-detectfrom qa-testing
Auto-detects the testing framework (Jest, Vitest, Playwright, Cypress, pytest, Go test, etc.) and runs relevant tests. Supports running all tests, specific file tests, or generating basic tests for new code.
Ships in qa-testing. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Automatically detect the testing framework in the current project and run the right tests.
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.
Check $ARGUMENTS for the mode:
src/auth/login.ts): Run tests for that file (Step 4)generate src/utils.ts): Generate tests (Step 5)Run the detected test command. After completion:
/test-detect <failing-file> to investigate a specific failure"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>"
Read the source file and analyze:
describe block per function/classit/test blocks covering: happy path, edge cases, error casesSave to the conventional location for the detected framework:
__tests__/<filename>.test.<ext> or <filename>.test.<ext> (match existing convention)tests/test_<filename>.py<filename>_test.go (same directory)spec/<filename>_spec.rbShow the generated file path and ask if the user wants to run the new tests.
package.json has both test and test:unit/test:e2e scripts, prefer the specific one when context is clearWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub hackernoon/cuttlefish-agent-skills --plugin qa-testing422 skills in this plugin
/a-b-test-validationA/B Test ValidationValidating A/B test implementations including traffic splitting accuracy, statistical significance calculation, metric tracking, and experiment cleanup./accessibility-a11y-enhancedAccessibility A11y EnhancedComprehensive WCAG compliance and accessibility testing covering ARIA, keyboard navigation, screen readers, color contrast, and automated a11y validation./add-seed-skillsUse when adding or editing QA skills in seed-skills/ or getting them onto the live qaskills.sh catalog, e.g. "add N new skills", "create a seed skill for X", "seed the database", "the skill page is empty", "skill 404s on the site".