Our review
Runs a TypeScript solution against JSON test cases and reports results.
Strengths
- Automated test execution and validation
- Clear, readable output format
- Automatically locates test files
Limitations
- Requires a specific JSON test format
- Depends on external tsx tool and lib/leetcode_problem_runner script
- Only supports TypeScript
When the user has a TypeScript solution with JSON test cases and wants to run them quickly.
For tests outside this format or in languages other than TypeScript.
Security analysis
CautionThe skill uses Bash to run 'npx tsx' on a provided file, which means user code will be executed. This is a common pattern in coding assistants but carries inherent risk if the code is harmful. No explicit destructive instructions are present.
- •Executes user-supplied TypeScript code via npx tsx, which could have unintended side effects if the code is malicious.
Examples
Run my solution.ts against its tests.Run my solution.ts with test file tests.jsonname: run description: Run TypeScript solution against test cases. Use when user wants to test their code. argument-hint: [solution-file] allowed-tools: Read, Bash, Glob
Run the user's TypeScript solution against test cases.
File to run: $ARGUMENTS (If empty, look for solution.ts in current directory)
Process:
- Find the solution file
- Find corresponding test file (solution.test.json or tests.json in same directory)
- Execute with: npx tsx lib/leetcode_problem_runner/index.ts <file> [test-file]
- Report results clearly
Test file format expected:
{
"functionName": "twoSum",
"cases": [
{ "input": [[2,7,11,15], 9], "expected": [0,1] },
{ "input": [[3,2,4], 6], "expected": [1,2] }
]
}
Output format:
Running: [functionName]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Test 1: ✓ PASS (0.12ms)
Input: [2,7,11,15], 9
Expected: [0,1]
Got: [0,1]
Test 2: ✗ FAIL (0.08ms)
Input: [3,2,4], 6
Expected: [1,2]
Got: [0,2]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Results: 1/2 passed
Total time: 0.20ms
If tests fail, analyze the failure and offer to help debug. If no test file exists, offer to create one based on the problem.
TDD Red-Green-Refactor
Testing
Skill that guides Claude through the complete TDD cycle.
Web Accessibility Audit
Testing
Performs a comprehensive web accessibility audit following WCAG standards.
UAT Test Case Generator
Testing
Generates structured and comprehensive user acceptance test cases.