test-writer
Skill2 starsChanged 4 months agoMITView on GitHub
Writes comprehensive test cases including unit tests, integration tests, and E2E tests. Supports two modes - writing tests from design specs/requirements OR generating tests by analyzing existing code. Creates tests that cover happy paths, edge cases, error conditions, and follow testing best practices.
24 other projects use a version of this.
Adopted by
Most recently taken up by
- anchildress1/awesome-aitheir own version, first seen Sep 16, 2026
- RealDougEubanks/ClaudeMarketplacetheir own version, first seen Sep 10, 2026
- TSS-Blue-AI-Lab/ai-lab-agent-skillstheir own version, first seen Aug 6, 2026
- osouthgate/agent-plustheir own version, first seen Jul 3, 2026
- eugnmueller-87/claude-blueprinttheir own version, first seen Jul 2, 2026
- TheDecipherist/claude-code-mastery-project-starter-kittheir own version, first seen Jun 26, 2026
Used with
Projects with it also use code-reviewer.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
GoogleSkillcode-reviewer
Also in 5 projects that use this
Other versions24 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 24
- TheDecipherist/claude-code-mastery-project-starter-kit★ 338same name
- hamzafarooq/claude-code-starter★ 145same name
- anchildress1/awesome-ai★ 66same name
- nimbalyst/skills★ 28same name
- TSS-Blue-AI-Lab/ai-lab-agent-skills★ 25same name
- Twigpine/openclaude-skills★ 19same name
- jeremymcs/skills★ 8same name
- xcrrr/claude-skills★ 6same name
- AskExe/exe-build-skills★ 4same name
- osouthgate/agent-plus★ 4same name
14 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository40 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- accessibility-checkerSkill
- accessibility-design-checkerSkill
- agent-capability-assessorSkill
- agent-creatorSkill
- api-implementerSkill
- architecture-reviewerSkill
- best-practices-checkerSkill
- bug-detectorSkill
- changelog-generatorSkill
- code-documentationSkill
- code-style-analyzerSkill
- color-system-designerSkill
- component-designerSkill
- component-implementerSkill
- config-setupSkill
- conflict-resolverSkill
- convert-to-extensionSkill
- database-implementerSkill
- design-systemSkill
- escalation-handlerSkill
- git-commit-helperSkill
- idea-refinerSkill
- implementation-plannerSkill
- import-formatterSkill
- interaction-designerSkill
- layout-designerSkill
- performance-analyzerSkill
- quality-gate-managerSkill
- requirement-analyzerSkill
- resource-allocation-optimizerSkill
- responsive-design-plannerSkill
- security-scannerSkill
- spacing-system-designerSkill
- specification-checkerSkill
- task-to-agent-matcherSkill
- team-health-checkerSkill
- technical-spec-writerSkill
- typography-designerSkill
- utility-implementerSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. 0 are common, 13 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 24 edited versions we read keep these.
13
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Requirement-Based: Write tests from task requirements or design specifications
- Distinctive: line 21
Write unit tests for individual functions/components
- Distinctive: line 22
Write integration tests for component interactions
- Distinctive: line 23
Write E2E tests for user flows (if applicable)
- Distinctive: line 35
Add comments explaining complex test scenarios
- Distinctive: line 40
Test files with appropriate naming
- Distinctive: line 41
Test cases covering all scenarios
- Distinctive: line 48
Unit Tests: Test individual functions/components in isolation
- Distinctive: line 49
Integration Tests: Test component interactions, API integrations
- Distinctive: line 50
E2E Tests: Test complete user flows
- Distinctive: line 51
Snapshot Tests: Test component rendering (if applicable)
- Distinctive: line 52
Performance Tests: Test performance characteristics (if needed)
- Distinctive: line 175
Arrange-Act-Assert: Follow AAA pattern
- Very specific: line 183
Jest/Mocha: Use describe/it or test blocks
- Very specific: line 184
pytest: Use test_ prefix, pytest.fixture for setup
- Very specific: line 185
JUnit: Use @Test annotation, @BeforeEach for setup
- Very specific: line 186
Go: Use TestXxx naming, t.Run for subtests
“Common” is measured: kept by at least 6 in 10 of the 24 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Test Writer Skill
Modes
This skill operates in two modes:
- Requirement-Based: Write tests from task requirements or design specifications
- Code-Analysis: Generate tests by analyzing existing code
Instructions
Mode 1: Requirement-Based Testing
- Analyze test requirements from task
- Identify what needs to be tested (functions, components, endpoints)
- Write unit tests for individual functions/components
- Write integration tests for component interactions
- Write E2E tests for user flows (if applicable)
- Cover happy paths, edge cases, and error conditions
Mode 2: Code-Analysis Testing
- Analyze the code to understand what needs testing
- Identify test cases from code behavior:
- Happy path scenarios
- Edge cases (empty inputs, null values, boundary conditions)
- Error conditions and exception handling
- Integration points and dependencies
- Generate tests following project conventions
- Add comments explaining complex test scenarios
Output Format
Return test implementation with:
- Test files with appropriate naming
- Test cases covering all scenarios
- Setup and teardown where needed
- Mocking for external dependencies
- Clear assertions and expectations
Test Types
- Unit Tests: Test individual functions/components in isolation
- Integration Tests: Test component interactions, API integrations
- E2E Tests: Test complete user flows
- Snapshot Tests: Test component rendering (if applicable)
- Performance Tests: Test performance characteristics (if needed)
Test Coverage Areas
- Happy Paths: Normal, expected behavior
- Edge Cases: Boundary conditions, empty inputs, null values
- Error Conditions: Invalid inputs, error handling
- State Changes: Component state transitions
- User Interactions: Click, input, navigation
- API Responses: Success and error responses
Examples
Example 1: Requirement-Based (JavaScript)
Input: "Write tests for calculateTotal function"
Output:
// tests/utils.test.js
describe('calculateTotal', () => {
test('calculates total for valid items array', () => {
const items = [
{ price: 10.00 },
{ price: 20.00 },
{ price: 5.00 }
];
expect(calculateTotal(items)).toBe(35.00);
});
test('returns 0 for empty array', () => {
expect(calculateTotal([])).toBe(0);
});
test('returns 0 for null input', () => {
expect(calculateTotal(null)).toBe(0);
});
test('handles items with zero price', () => {
const items = [{ price: 10.00 }, { price: 0 }, { price: 5.00 }];
expect(calculateTotal(items)).toBe(15.00);
});
});Example 2: Code-Analysis (Python)
Input (existing code):
def divide(a, b):
if b == 0:
raise ValueError("Cannot divide by zero")
return a / bOutput:
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.0Example 3: Code-Analysis (JavaScript)
Input (existing code):
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);
});
test('returns false for empty or null input', () => {
expect(validateEmail('')).toBe(false);
expect(validateEmail(null)).toBe(false);
expect(validateEmail(undefined)).toBe(false);
});
});Best Practices
- Independent Tests: Each test should be independent and isolated
- Clear Names: Descriptive test names that explain what is being tested
- Arrange-Act-Assert: Follow AAA pattern
- Mock External Dependencies: Mock APIs, databases, external services
- Test One Thing: Each test should verify one behavior
- Fast Tests: Tests should run quickly
- Maintainable: Tests should be easy to understand and maintain
Framework-Specific Guidelines
- Jest/Mocha: Use
describe/itortestblocks - pytest: Use
test_prefix,pytest.fixturefor setup - JUnit: Use
@Testannotation,@BeforeEachfor setup - Go: Use
TestXxxnaming,t.Runfor subtests
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

