- Home
- Skills
- Fortiumpartners
- Ai Mesh
- Test Detector
test-detector_skill
- JavaScript
9
GitHub Stars
3
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill fortiumpartners/ai-mesh --skill test-detector- detect-framework.js7.0 KB
- framework-patterns.json3.7 KB
- SKILL.md3.2 KB
Overview
This skill automatically detects which test framework(s) a project uses by scanning manifests, config files, and test directories. It reports detected frameworks with confidence scores, matched config files, test patterns, and a primary framework recommendation. Designed for agents that need to choose the right test generator or runner before producing or executing tests.
How this skill works
The detector inspects package manifests (package.json, requirements.txt, Gemfile, *.csproj), framework-specific config files (jest.config.js, pytest.ini, .rspec, xunit.runner.json), and common test directories and file name patterns. It applies pattern-based rules from a configurable patterns file and computes a confidence score from config presence, dependency indicators, directory structure, and actual test files. The output is a JSON object listing frameworks, confidence, matched files, test patterns, and a primary framework if one is dominant.
When to use it
- Before generating tests to pick the correct framework conventions and APIs
- Prior to running automated test generation or execution in CI pipelines
- When onboarding to a repository to quickly understand its test ecosystem
- As a pre-step in multi-language or monorepo flows to detect multiple frameworks
- During automated code-analysis agents that need framework-specific knowledge
Best practices
- Run the detector at repository root and at workspace package roots in monorepos
- Keep framework-patterns.json up to date with new config names and dependency identifiers
- Combine detector output with a quick manual check for ambiguous cases (confidence < 0.6)
- Use verbose mode (DEBUG=true) when integrating into pipelines to capture diagnostic clues
- Treat the primary framework as a recommendation — allow manual override when needed
Example use cases
- Agent calls detector, then routes to jest-test skill to generate JavaScript tests based on detected patterns
- CI pipeline runs detector to choose the correct test runner and invoke tests only for detected frameworks
- Onboarding script reports repository frameworks and expected test commands to new contributors
- Monorepo analysis detects both pytest and Jest and triggers language-specific test generation for each package
FAQ
The detector returns detected:false, an empty frameworks list, and a message suggesting manual specification of the framework.
Can it detect multiple frameworks in one repository?
Yes. The detector can report multiple frameworks (common in monorepos) and indicates a primary framework based on highest confidence.
How is the confidence score calculated?
Scores combine weighted signals: config file presence (+0.4), dependency indicator (+0.3), test directory (+0.2), and discovered test files (+0.1).