Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generate unit test scaffolding and test suites for Jest, PyTest, Go testing, JUnit, RSpec with mocking, assertions, and coverage configuration
.claude/skills/williamzujkowski-unit-testing-framework-generator/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 116% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 83% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 120% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 32% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 40% | 0% |
Trigger conditions:
Use when: You have code that needs test coverage with framework-specific patterns, mocking strategies, and coverage enforcement.
Required validations before proceeding:
NOW_ET using NIST/time.gov semantics (America/New_York, ISO-8601)framework is one of: Jest, PyTest, Go, JUnit, RSpectarget_code is either a valid file path or parseable descriptioncoverage_threshold is 0-100NOW_ET = 2025-10-26T02:31:24ZFast path for 80% of cases:
jest.config.js with basic settingspytest.ini with test discovery_test.go namingpom.xml or build.gradle snippet.rspec and spec_helper.rbToken budget: ≤2k tokens for code analysis + generation
Extended validation with dependency mocking:
jest.mock() or @jest/globalspytest-mock fixtures or unittest.mockallow() and expect() stubsNOW_ET)Token budget: ≤6k tokens (includes retrieval + generation)
Deep dive with property-based testing and fixtures:
fast-check integrationhypothesis strategiestesting/quick packagejqwik or QuickTheoriesrantly gemtest.each()@pytest.mark.parametrize@ParameterizedTesttests/evals_unit-testing-generator.yamlToken budget: ≤12k tokens (includes research, generation, evals)
Framework selection:
target_code has file extension → auto-detect: .js/.ts → Jest, .py → PyTest, .go → Go, .java → JUnit, .rb → RSpecframework inputMocking strategy thresholds:
Abort conditions:
target_code is unparseable or empty → emit TODO and stopRequired fields:
typescript{ test_files: [ { path: string, // e.g., "src/__tests__/service.test.js" content: string, // Full test file code framework: string // Jest|PyTest|Go|JUnit|RSpec } ], config: { file_name: string, // e.g., "jest.config.js" content: string, // Configuration code description: string // What this configures }, coverage_setup: { threshold: number, // 0-100 reporters: string[], // ["json", "lcov", "text"] exclude_patterns: string[] // Globs to ignore }, metadata: { generated_at: string, // ISO-8601 timestamp token_tier: "T1"|"T2"|"T3", sources_consulted: [ // Only for T2+ { title: string, url: string, accessed: string // NOW_ET } ] } }
Validation:
Input:
json{ "framework": "PyTest", "target_code": "class UserService:\n def get_user(self, id): return db.query(User).get(id)", "test_type": "unit", "coverage_threshold": 90 }
Output (T2 with mocking):
python# tests/test_user_service.py import pytest from unittest.mock import Mock, patch from myapp.services import UserService @pytest.fixture def mock_db(): return Mock() def test_get_user_success(mock_db): # Arrange user_service = UserService(db=mock_db) mock_db.query.return_value.get.return_value = {"id": 1, "name": "Alice"} # Act result = user_service.get_user(1) # Assert assert result["id"] == 1 mock_db.query.assert_called_once()
_(Full output would include pytest.ini config and coverage setup; truncated for ≤30 line limit)_
Token budgets (enforced):
Safety:
Auditability:
NOW_ET)Determinism:
Official Documentation (accessed 2025-10-26T02:31:24Z):
Mocking Libraries:
Property-Based Testing:
Coverage Tools:
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 10,583 | 11,714 | +11% | 1 | 1 | 0% | 2,478 | 5,358 | +116% | 0 | 0 | — |
case-02 | fail→pass | 8,258 | 6,578 | -20% | 1 | 1 | 0% | 2,258 | 4,130 | +83% | 0 | 0 | — |
case-03 | fail→pass | 11,862 | 18,329 | +55% | 1 | 1 | 0% | 3,268 | 7,200 | +120% | 0 | 0 | — |
case-04 | pass→pass | 12,539 | 10,749 | -14% | 1 | 1 | 0% | 2,954 | 4,812 | +63% | 0 | 0 | — |
case-05 | pass→pass | 14,612 | 15,967 | +9% | 1 | 1 | 0% | 2,934 | 5,486 | +87% | 0 | 0 | — |
case-06 | pass→pass | 11,271 | 11,574 | +3% | 1 | 1 | 0% | 2,453 | 4,961 | +102% | 0 | 0 | — |
case-07 | fail→fail | 23,282 | 12,435 | -47% | 1 | 1 | 0% | 6,021 | 5,538 | -8% | 0 | 0 | — |
case-08 | fail→pass | 12,251 | 7,547 | -38% | 1 | 1 | 0% | 2,892 | 3,806 | +32% | 0 | 0 | — |
case-09 | fail→pass | 15,932 | 12,557 | -21% | 1 | 1 | 0% | 3,878 | 5,443 | +40% | 0 | 0 | — |
case-10 | fail→pass | 9,476 | 9,836 | +4% | 1 | 1 | 0% | 2,545 | 4,729 | +86% | 0 | 0 | — |
case-11 | fail→pass | 12,141 | 12,756 | +5% | 1 | 1 | 0% | 3,162 | 5,480 | +73% | 0 | 0 | — |
case-12 | fail→pass | 5,404 | 5,748 | +6% | 1 | 1 | 0% | 1,039 | 3,684 | +255% | 0 | 0 | — |
case-13 | pass→pass | 25,952 | 14,629 | -44% | 1 | 1 | 0% | 6,192 | 5,811 | -6% | 0 | 0 | — |
case-14 | fail→pass | 27,107 | 15,325 | -43% | 1 | 1 | 0% | 6,196 | 5,993 | -3% | 0 | 0 | — |
case-15 | fail→pass | 18,509 | 23,708 | +28% | 1 | 1 | 0% | 4,692 | 7,925 | +69% | 0 | 0 | — |
case-16 | fail→fail | 12,367 | 9,039 | -27% | 1 | 1 | 0% | 3,329 | 4,337 | +30% | 0 | 0 | — |
case-17 | fail→pass | 15,060 | 9,625 | -36% | 1 | 1 | 0% | 3,691 | 4,662 | +26% | 0 | 0 | — |
case-18 | fail→pass | 16,510 | 11,170 | -32% | 1 | 1 | 0% | 3,856 | 4,682 | +21% | 0 | 0 | — |
case-19 | fail→pass | 13,685 | 11,568 | -15% | 1 | 1 | 0% | 3,178 | 4,680 | +47% | 0 | 0 | — |
case-20 | fail→pass | 20,442 | 7,625 | -63% | 1 | 1 | 0% | 4,788 | 4,180 | -13% | 0 | 0 | — |
case-21 | fail→pass | 19,258 | 12,234 | -36% | 1 | 1 | 0% | 4,689 | 4,942 | +5% | 0 | 0 | — |
case-22 | fail→pass | 14,878 | 6,968 | -53% | 1 | 1 | 0% | 3,330 | 4,045 | +21% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +73 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.