Analyzes existing code and auto-generates unit and integration tests. Covers happy paths, edge cases, and error scenarios for Jest, Vitest, pytest, and Kotest frameworks.
From forged-claude-codenpx claudepluginhub dokkabei97/forged-claude-code --plugin forged-claude-codeThis skill uses the workspace's default tool permissions.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Details PluginEval's skill quality evaluation: 3 layers (static, LLM judge), 10 dimensions, rubrics, formulas, anti-patterns, badges. Use to interpret scores, improve triggering, calibrate thresholds.
Reads existing code and generates comprehensive test suites. Covers the boring-but-critical test writing so developers can focus on business logic.
| Trigger | Behavior |
|---|---|
| "generate tests for [file]" | Analyze file, generate test suite |
| "add tests" | Scan for untested code, generate tests |
| "test coverage" | Identify coverage gaps, generate missing tests |
1. Read target file(s)
2. Identify exported functions/classes/methods
3. Analyze parameter types and return types
4. Detect dependencies (imports, injections)
5. Identify side effects (API calls, DB, file system)
For each function, generate test cases:
| Category | Examples |
|---|---|
| Happy path | Valid inputs → expected output |
| Boundary values | 0, 1, MAX, empty string, empty array |
| Invalid inputs | null, undefined, wrong type, negative |
| Error handling | Network failure, timeout, invalid response |
| Edge cases | Concurrent calls, unicode, special chars |
TypeScript (Jest/Vitest):
import { describe, it, expect, vi } from 'vitest'
import { calculatePrice } from './pricing'
describe('calculatePrice', () => {
it('calculates base price correctly', () => {
expect(calculatePrice({ quantity: 1, unitPrice: 100 })).toBe(100)
})
it('applies discount for bulk orders', () => {
expect(calculatePrice({ quantity: 100, unitPrice: 10 })).toBe(900)
})
it('throws for negative quantity', () => {
expect(() => calculatePrice({ quantity: -1, unitPrice: 10 }))
.toThrow('Quantity must be positive')
})
it('returns 0 for zero quantity', () => {
expect(calculatePrice({ quantity: 0, unitPrice: 100 })).toBe(0)
})
})
Python (pytest):
import pytest
from pricing import calculate_price
def test_base_price():
assert calculate_price(quantity=1, unit_price=100) == 100
def test_bulk_discount():
assert calculate_price(quantity=100, unit_price=10) == 900
def test_negative_quantity_raises():
with pytest.raises(ValueError, match="positive"):
calculate_price(quantity=-1, unit_price=10)
def test_zero_quantity():
assert calculate_price(quantity=0, unit_price=100) == 0
Auto-generate mocks for external dependencies:
// Auto-detected: function calls supabase
vi.mock('@/lib/supabase', () => ({
supabase: {
from: vi.fn(() => ({
select: vi.fn().mockResolvedValue({ data: mockData, error: null })
}))
}
}))
| File Pattern | Framework |
|---|---|
vitest.config.* | Vitest |
jest.config.* | Jest |
pytest.ini, pyproject.toml with pytest | pytest |
build.gradle* with kotest | Kotest |
| Tool | Purpose |
|---|---|
| Read | Analyze source code |
| Write | Generate test files |
| Glob | Find test config, existing tests |
| Grep | Detect imports, dependencies |
| Bash | Run tests, check coverage |
Will:
Will Not: