Systematically add test coverage for all local code changes using specialized review and development agents. Add tests for uncommitted changes (including untracked files), or if everything is commited, then will cover latest commit.
56
46%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./plugins/tdd/skills/write-tests/SKILL.mdUser can provide a what tests or modules to focus on:
$ARGUMENTSIf nothing is provided, focus on all changes in current git diff that not commited. If everything is commited, then will cover latest commit.
After implementing new features or refactoring existing code, it's critical to ensure all business logic changes are covered by tests. This command orchestrates automated test creation for local changes using coverage analysis and specialized agents.
Achieve comprehensive test coverage for all critical business logic in local code changes.
Read sadd skill if available
Discover test infrastructure
Run all tests
Do steps 4-5 in parallel using haiku agents:
Verify single test execution
Analyze local changes
git status -u to identify all changed files (including untracked files)
git show --name-status to get the list of files that were changed in the latest commit.If there is only one changed file, and it's a simple change, then you can write tests yourself. Following this guidline:
Ensure tests are:
If there are multiple changed files, or one file with complex logic, then you need to use specialized agents to cover the changes. Following this guidline:
Launch review:test-coverage-reviewer agents (parallel) (Sonnet or Opus models)
Launch developer agents for test file (parallel) (Sonnet or Opus models)
Verify coverage (iteration) (Sonnet or Opus models)
review:test-coverage-reviewer agents again per fileIterate if needed
Analyze the file {FILE_PATH} for test coverage needs.
Context: This file was modified in local changes:
{GIT_DIFF_OUTPUT}
Your task:
1. Read the changed file and understand the business logic
2. Identify all critical code paths that need testing:
- New functions/methods added
- Modified business logic
- Edge cases and error handling
- Integration points
3. Review existing tests (if any) to avoid duplication
4. Create a list of test cases needed, prioritized by importance:
- CRITICAL: Core business logic, data mutations
- IMPORTANT: Error handling, validations
- NICE_TO_HAVE: Edge cases, performance
Output format:
- List of test cases with descriptions
- Priority level for each
- Suggested test file locationCreate tests for file {FILE_PATH} based on coverage analysis.
Coverage review identified these test cases:
{TEST_CASES_LIST}
Your task:
1. Read TDD skill (if available) for best practices on writing tests
2. Read @README.md for project context and testing conventions
3. Read the target file {FILE_PATH} and understand the logic
4. Review existing test files for patterns and style
5. Create comprehensive tests for all identified cases
6. Run the tests: {TEST_COMMAND}
7. Iterate until all tests pass
8. Ensure tests are:
- Clear and maintainable
- Follow project conventions
- Test behavior, not implementation
- Cover edge cases and error paths
Test command: {TEST_COMMAND}Verify test coverage for file {FILE_PATH}.
Context: Tests were added to cover local changes in this file.
Your task:
1. Read the changed file {FILE_PATH}
2. Read the new test file(s) created
3. Verify all critical business logic is covered:
- All new functions have tests
- All modified logic has tests
- Edge cases are tested
- Error handling is tested
4. Identify any gaps in coverage
5. Confirm test quality (clear, maintainable, follows TDD principles)
Output:
- PASS: All critical business logic is covered ✅
- GAPS: List specific missing test cases that need to be addeddedca19
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.