跳到正文
Skillpedia
测试81k · #1702

test-gaps

它能做什么

这项技能检查项目中缺失的测试覆盖,并建议需要编写的测试。适合希望知道代码中哪些部分仍需测试的开发者。

适用场景

  • ✓当你询问代码的哪些部分没有测试时。
  • ✓当你刚添加了一项功能,想知道还有哪些需要测试时。
  • ✓当你想要一份接下来要编写的测试的简短清单时。

技能链接

https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-testgen/skills/test-gaps/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-testgen/skills/test-gaps/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我的代码中哪些部分缺少测试?接下来我应该测试什么?”

每周 5 个新技能,1 分钟读完。

工作原理

它对你的项目运行覆盖率检查,报告缺口,并为每个缺口给出建议。你可以设置覆盖率阈值,并只显示最严重的缺口。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Find test coverage gaps via CLI:

npx @claude-flow/cli@latest hooks coverage-gaps --format table --threshold 80   # add --critical-only for the worst gaps (there is no --limit)
npx @claude-flow/cli@latest hooks coverage-route --task 'add auth tests'
npx @claude-flow/cli@latest hooks coverage-suggest --path src/

Or dispatch the testgaps worker via MCP: mcp__plugin_ruflo-core_ruflo__hooks_worker-dispatch({ trigger: "testgaps" })

For continuous detection, use /loop with the loop-worker skill targeting the testgaps worker.

常见问题

它会替我编写测试代码吗?

它会为发现的缺口提供测试建议,由你决定要构建什么。

如何检查覆盖率是否达到目标?

你可以设置阈值,例如 80,报告会标出低于该值的部分。

它能定期检查缺口吗?

这项技能可以与循环工作者配合使用,反复检查缺口。

详情

作者的原始描述

Detect missing test coverage and generate test suggestions. Use when the user asks about coverage gaps, untested code, or what tests to write next; also after adding a feature to find what still needs tests.

repo: ruvnet/ruflo

热度

GitHub 星标
81k
排名
#1702
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能