plugins/tdd/skills/write-tests/SKILL.md
Add missing test coverage for your local code changes by generating new test files (covers uncommitted and untracked changes, or the latest commit if everything is committed). Use when you want write tests for new logic or increase test coverage.
npx skillsauth add NeoLabHQ/context-engineering-kit write-testsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
User can provide a what tests or modules to focus on:
$ARGUMENTS
If 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 location
Create 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 added
development
This skill should be used when need prioritize what changed code in repository human must review.
documentation
Review an existing GitHub pull request and post inline review comments on its diff. Use when the changes are on an opened PR rather than your local working tree.
tools
Review your local uncommitted working-tree changes (git diff plus untracked files) and return actionable improvement suggestions. Use before committing, when nothing has been pushed yet.
data-ai
Execute one complex task as ordered, dependent steps run sequentially, passing context from each step to the next, with per-step LLM-as-a-judge verification. Use when later steps depend on the results of earlier ones.