tdd%3Awrite-tests by neolabhq/context-engineering-kit
npx skills add https://github.com/neolabhq/context-engineering-kit --skill tdd:write-tests用户可以指定要关注的测试或模块:
$ARGUMENTS
如果未提供任何参数,则关注当前 git diff 中所有未提交的变更。如果所有内容都已提交,则覆盖最新提交。
在实现新功能或重构现有代码后,确保所有业务逻辑变更都有测试覆盖至关重要。此命令利用覆盖率分析和专用代理,为本地变更编排自动化测试创建流程。
为本地代码变更中的所有关键业务逻辑实现全面的测试覆盖。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
使用 haiku 代理并行执行步骤 4-5:
git status -u 以识别所有更改的文件(包括未跟踪的文件)
git show --name-status 以获取最新提交中更改的文件列表。如果只有一个文件被更改,且是简单变更,则可以自己编写测试。遵循以下指南:
确保测试:
如果有多个文件被更改,或者一个文件包含复杂逻辑,则需要使用专用代理来覆盖变更。遵循以下指南:
code-review:test-coverage-reviewer 代理(并行)(Sonnet 或 Opus 模型)
developer 代理编写测试文件(并行)(Sonnet 或 Opus 模型)
code-review:test-coverage-reviewer 代理分析文件 {FILE_PATH} 的测试覆盖需求。
背景:此文件在本地变更中被修改:
{GIT_DIFF_OUTPUT}
你的任务:
1. 阅读更改的文件并理解业务逻辑
2. 识别所有需要测试的关键代码路径:
- 新增的函数/方法
- 修改的业务逻辑
- 边界情况和错误处理
- 集成点
3. 审查现有测试(如果有)以避免重复
4. 创建所需测试用例列表,按重要性排序:
- 关键:核心业务逻辑、数据变更
- 重要:错误处理、验证
- 最好有:边界情况、性能
输出格式:
- 包含描述的测试用例列表
- 每个用例的优先级
- 建议的测试文件位置
基于覆盖率分析为文件 {FILE_PATH} 创建测试。
覆盖率审查识别出以下测试用例:
{TEST_CASES_LIST}
你的任务:
1. 阅读 TDD skill(如果可用)以获取编写测试的最佳实践
2. 阅读 @README.md 以了解项目背景和测试约定
3. 阅读目标文件 {FILE_PATH} 并理解其逻辑
4. 查看现有测试文件的模式和风格
5. 为所有识别出的用例创建全面的测试
6. 运行测试:{TEST_COMMAND}
7. 迭代直到所有测试通过
8. 确保测试:
- 清晰且可维护
- 遵循项目约定
- 测试行为,而非实现
- 覆盖边界情况和错误路径
测试命令:{TEST_COMMAND}
验证文件 {FILE_PATH} 的测试覆盖。
背景:已添加测试以覆盖此文件的本地变更。
你的任务:
1. 阅读更改的文件 {FILE_PATH}
2. 阅读新创建的测试文件
3. 验证所有关键业务逻辑是否被覆盖:
- 所有新函数都有测试
- 所有修改的逻辑都有测试
- 边界情况已测试
- 错误处理已测试
4. 识别覆盖中的任何缺口
5. 确认测试质量(清晰、可维护、遵循 TDD 原则)
输出:
- 通过:所有关键业务逻辑已被覆盖 ✅
- 缺口:列出需要添加的具体缺失测试用例
每周安装数
243
仓库
GitHub 星标数
699
首次出现
2026年2月19日
安装于
opencode236
codex234
github-copilot234
gemini-cli233
kimi-cli231
cursor231
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:
Launchcode-review:test-coverage-reviewer agents (parallel) (Sonnet or Opus models)
Launchdeveloper agents for test file (parallel) (Sonnet or Opus models)
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
Weekly Installs
243
Repository
GitHub Stars
699
First Seen
Feb 19, 2026
Installed on
opencode236
codex234
github-copilot234
gemini-cli233
kimi-cli231
cursor231
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
140,500 周安装
Verify coverage (iteration) (Sonnet or Opus models)
code-review:test-coverage-reviewer agents again per fileIterate if needed