- SKILL.md 95 lines · 3.9 KB
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):
| 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
Scanned by
NVIDIA SkillSpector
Automated static analysis (no LLM) · v2.12.0 · 2026-11-19
Partial analysis: some checks could not run on this component.
7 observations in 1 category
- MCP Rug Pull 7
SkillSpector looks for patterns such as shell commands, credential access, network calls or unpinned dependencies. An observation is something worth reading in the files before you install, not a confirmed vulnerability. Components that run code locally, like hooks, MCP servers and security tooling, naturally show more of them. Open one to see the lines it points at.
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update. ×7MCP Rug Pull · SKILL.md:18
| 16 | | Check | Framework | Run Command | |
| 17 | |-------|-----------|-------------| |
| 18 | | `vitest.config.*` exists OR `vitest` in devDeps | **Vitest** | `npx vitest run` | |
| 19 | | `jest.config.*` exists OR `jest` in devDeps | **Jest** | `npx jest` | |
| 20 | | `playwright.config.*` exists | **Playwright** | `npx playwright test` | |
Learn more about NVIDIA SkillSpector or how components are reviewed.
Agent compatibility
Checked by NVIDIA SkillEvaluator Harness Check · v1.0.1 · 2026-11-18
How each agent reads this skill once it is installed, from the agents' documented loading rules. No agent was run. A note means the agent loads the skill but changes part of its text, or drops it.
Claude Code
loadsCodex
loads · 1 noteCopilot CLI
loads · 1 noteOpenCode
loads · 1 noteHermes
loads · 1 noteOpenClaw
loads · 1 note
Codex · loads with changes
$ARGUMENTS is not substituted: the model sees the literal text.
Fix: Describe the expected input in words instead of $ARGUMENTS.
CX-ARGUMENTS · verified on 0.166.0
Copilot CLI · loads with changes
$ARGUMENTS is not substituted: the model sees the literal text.
Fix: Describe the expected input in words instead of $ARGUMENTS.
CP-ARGUMENTS · verified on 1.0.105
OpenCode · loads with changes
Loaded through the skill tool, $ARGUMENTS is not substituted: the model sees the literal text (a /command run substitutes it).
Fix: Describe the expected input in words instead of $ARGUMENTS.
OC-ARGUMENTS · verified on 1.19.5
Hermes · loads with changes
$ARGUMENTS is not substituted: the model sees the literal text.
Fix: Describe the expected input in words instead of $ARGUMENTS.
HM-ARGUMENTS · verified on main
OpenClaw · loads with changes
$ARGUMENTS is not substituted: the model sees the literal text.
Fix: Describe the expected input in words instead of $ARGUMENTS.
OW-ARGUMENTS · verified on 2026.10.9
Learn more about NVIDIA SkillEvaluator.