From claude-code-starter
Generates unit tests for code or functions, analyzing inputs, paths, edges, and errors. Detects project test framework (pytest, Jest, etc.), applies mocks, matches style, and writes files after confirmation.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-code-starter:testThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
为指定的代码自动生成测试用例,让用户不用自己写测试。
为指定的代码自动生成测试用例,让用户不用自己写测试。
如果用户指定了函数或文件,直接读取。
如果没有指定,问:
你想给哪个函数或文件生成测试?
读取目标代码,分析:
查看项目中已有的测试文件,了解:
如果项目没有已有测试,根据技术栈选择最常用的测试框架。
按以下优先级生成测试:
规则:
展示生成的测试代码,告诉用户:
生成了 N 个测试用例,覆盖了 xxx。要我写入到测试文件吗?
用户确认后,写入对应的测试文件。然后运行测试确认全部通过。
npx claudepluginhub lightpointventures/claude-code-starterGenerates unit tests matching project patterns and frameworks like Jest/Vitest (JS/TS), pytest (Python), Go testing, JUnit (Java), RSpec (Ruby).
Generates tests for any file type with automatic framework detection, project convention matching, and type-specific routing (React, Vue, Python, Go, Rust, PHP, E2E).