Test Framework Detector
Automatically detect test frameworks (Jest, pytest, RSpec, xUnit) in projects by analyzing configuration files and dependencies
What this skill does
# Test Framework Detector
## Purpose
Automatically identify which test framework(s) a project uses by examining:
- Package manifests (package.json, requirements.txt, Gemfile, *.csproj)
- Test configuration files (jest.config.js, pytest.ini, spec_helper.rb, xunit.runner.json)
- Directory structure and naming conventions
## Usage
This skill is invoked by agents (like deep-debugger) when they need to determine which test framework to use for test generation or execution.
### Detection Script
Run the detection script with the project path:
```bash
node detect-framework.js /path/to/project
```
### Output Format
The script returns a JSON object with detected frameworks:
```json
{
"detected": true,
"frameworks": [
{
"name": "jest",
"confidence": 0.95,
"version": "29.7.0",
"configFiles": ["jest.config.js", "package.json"],
"testDirectory": "tests/",
"testPattern": "**/*.test.js"
}
],
"primary": "jest"
}
```
## Detection Patterns
The skill uses pattern-based detection defined in `framework-patterns.json`. Each framework has:
- **Package indicators**: Dependencies that suggest framework presence
- **Config files**: Framework-specific configuration files
- **Test file patterns**: Common test file naming conventions
## Supported Frameworks
1. **Jest** (JavaScript/TypeScript)
- Config: jest.config.js, jest.config.ts, package.json (jest section)
- Dependencies: jest, @types/jest, ts-jest
- Patterns: *.test.js, *.spec.js, __tests__/**
2. **pytest** (Python)
- Config: pytest.ini, pyproject.toml, setup.cfg, tox.ini
- Dependencies: pytest in requirements.txt or pyproject.toml
- Patterns: test_*.py, *_test.py, tests/**
3. **RSpec** (Ruby)
- Config: .rspec, spec/spec_helper.rb
- Dependencies: rspec in Gemfile
- Patterns: *_spec.rb, spec/**
4. **xUnit** (C#/.NET)
- Config: xunit.runner.json, *.csproj
- Dependencies: xunit, xunit.runner.visualstudio in *.csproj
- Patterns: *Tests.cs, *Test.cs, Tests/**
## Confidence Scoring
Confidence scores (0.0-1.0) are calculated based on:
- **Config file presence**: +0.4
- **Package dependency found**: +0.3
- **Test directory exists**: +0.2
- **Test files found**: +0.1
Multiple frameworks may be detected (e.g., Jest + pytest in monorepos).
## Example Invocations
**Detect framework in current directory:**
```bash
node skills/test-detector/detect-framework.js .
```
**Detect framework with verbose output:**
```bash
DEBUG=true node skills/test-detector/detect-framework.js /path/to/project
```
## Integration with Agents
Agents should invoke this skill before test generation:
```markdown
1. Invoke test-detector skill with project path
2. Parse JSON output to get primary framework
3. Invoke appropriate test framework skill (jest-test, pytest-test, etc.)
4. Generate or execute tests using framework-specific patterns
```
## Error Handling
If no framework is detected:
```json
{
"detected": false,
"frameworks": [],
"primary": null,
"message": "No test framework detected. Please specify framework manually."
}
```
Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.