Generate comprehensive test cases for code. Use when writing unit tests, integration tests, or test suites. Creates tests that cover happy paths, edge cases, error conditions, and follow testing best practices for the project's testing framework.
/plugin marketplace add lexicalninja/my-little-scrum-team/plugin install my-little-scrum-team@patricks-pluginsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Input (Python function):
def divide(a, b):
if b == 0:
raise ValueError("Cannot divide by zero")
return a / b
Output:
import pytest
from calculator import divide
class TestDivide:
"""Test suite for divide function."""
def test_divide_positive_numbers(self):
"""Test dividing two positive numbers."""
assert divide(10, 2) == 5.0
assert divide(9, 3) == 3.0
def test_divide_negative_numbers(self):
"""Test dividing negative numbers."""
assert divide(-10, 2) == -5.0
assert divide(10, -2) == -5.0
def test_divide_by_zero_raises_error(self):
"""Test that dividing by zero raises ValueError."""
with pytest.raises(ValueError, match="Cannot divide by zero"):
divide(10, 0)
def test_divide_float_result(self):
"""Test that division returns float when result is decimal."""
assert divide(7, 2) == 3.5
def test_divide_zero_numerator(self):
"""Test dividing zero by non-zero number."""
assert divide(0, 5) == 0.0
Input (JavaScript function):
function validateEmail(email) {
if (!email) return false;
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
}
Output:
describe('validateEmail', () => {
test('returns true for valid email addresses', () => {
expect(validateEmail('user@example.com')).toBe(true);
expect(validateEmail('test.email+tag@domain.co.uk')).toBe(true);
});
test('returns false for invalid email addresses', () => {
expect(validateEmail('invalid')).toBe(false);
expect(validateEmail('@example.com')).toBe(false);
expect(validateEmail('user@')).toBe(false);
expect(validateEmail('user@example')).toBe(false);
});
test('returns false for empty or null input', () => {
expect(validateEmail('')).toBe(false);
expect(validateEmail(null)).toBe(false);
expect(validateEmail(undefined)).toBe(false);
});
test('handles edge cases', () => {
expect(validateEmail('user.name@sub.domain.com')).toBe(true);
expect(validateEmail('user+tag@example.com')).toBe(true);
});
});
Structure:
Coverage:
Framework-Specific:
describe/it or testtest_ prefix, pytest.fixture for setup@Test annotation, @BeforeEach for setupActivates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
Activates when the user asks about Agent Skills, wants to find reusable AI capabilities, needs to install skills, or mentions skills for Claude. Use for discovering, retrieving, and installing skills.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.