agentsclimarketplace

Unit testing

Skill RainLib/full-stack-skill/.claude/skills/unit-testing

根据程序设计与任务拆分产出单元测试用例与预期结果,为代码开发提供验收标准。全栈工作流第 6 阶段。From its SKILL.md

Install
npx -y skills add RainLib/full-stack-skill --skill unit-testing

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

1.7 KB, 493 tokens by cl100k_base, as published. Nobody here has run it

单元测试设计

何时使用

  • 全栈工作流第 6 阶段:任务拆分完成后、代码开发之前。
  • 用户要求先写测试或设计测试用例时。

输入

读取当前迭代目录下的:

  • 程序设计文档(program-design-{id}.md)—— 模块、接口、数据模型
  • 任务拆分文档(task-breakdown-{id}.md)—— 按任务单元组织用例

执行要点

  1. 按任务组织:以任务拆分中的任务 ID 为单位组织测试用例。
  2. 粒度:以「可测单元」为单位(函数、类方法、API 端点、前端逻辑块)。
  3. 覆盖:正常路径 + 边界(空值、上限、类型错误) + 异常(网络失败、权限不足)。
  4. 预期:每个用例写明预期结果或断言要点(返回值、状态码、副作用、UI 状态)。
  5. Mock 策略:标注哪些依赖需要 mock(数据库、外部 API、文件系统)。
  6. 覆盖率目标:核心业务模块建议 ≥80%,工具/配置类可放宽。

产出

文档与状态

  • 产出写入 docs/{current_iteration_id}/unit-testing-{unit_testing_id}.md
  • 开始前:调用 history-manager skill 的 get-phase unit_testingcheck-file 确认是否已完成。
  • 完成后:调用 history-manager skill 的 set-phase unit_testing {unit_testing_id} 记录并推进状态。

What ships with it: 1 file

1.8 KB alongside SKILL.md

templates/

Keep looking

Skills are one crate of 326,758. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.