agentsclimarketplace

Test detect

Skill henriquescastilho/my-claude/.codex/vendor_imports/claude/marketplaces/claude-code-templates/cli-tool/components/skills/development/test-detect

Setup público e sanitizado de um Claude Code full-stack: 8 sub-agents com roteamento por modelo, 792 skills, hooks de segurança, MCP servers e metodologia opinativa. Desenhado para um agente de IA se auto-configurar.

Install
npx -y skills add henriquescastilho/my-claude --skill test-detect

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

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

SKILL.md

3.9 KB, as published. Nobody here has run it

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):

  1. __tests__/<filename>.test.<ext> (Jest convention)
  2. <filename>.test.<ext> (co-located)
  3. <filename>.spec.<ext> (alternative convention)
  4. test/<filename>_test.<ext> (Go/Python convention)
  5. tests/test_<filename>.<ext> (pytest convention)
  6. <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:

  1. Identify all exported functions/classes/components
  2. Determine the appropriate test patterns for the framework
  3. 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

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.