← ClaudeAtlas

test-writerlisted

Generate tests that match the project's existing test patterns and framework
claudifytech/claude-code-skills-starter · ★ 0 · AI & Automation · score 68
Install: claude install-skill claudifytech/claude-code-skills-starter
# Test Writer Write tests for a target file or function that fit how the project already tests things. ## When to use When the user asks to add tests, improve coverage, or test a specific module. ## Procedure 1. Find the project's test setup before writing anything: - Look for existing test files (`*.test.*`, `*.spec.*`, a `tests/` or `__tests__/` folder). - Identify the framework and assertion style from those files, for example Vitest, Jest, Pytest, or Go testing. - Note the project's patterns: how it names tests, sets up fixtures, and mocks dependencies. 2. Read the code under test fully. List the behaviors worth covering: the happy path, each branch, boundary values, and error handling. 3. Write tests that mirror the existing patterns exactly. Do not introduce a new framework or style. 4. Cover the cases from step 2. Prefer a few clear, meaningful tests over many shallow ones. 5. Run the tests. If any fail, decide whether the test or the code is wrong, fix the right one, and re-run until green or until you have a genuine finding to report. ## Notes - Match the project, do not impose your own preferences. - A test that always passes is worse than no test. Each test should be able to fail for a real reason.