🧪

Test Generator

SECURITY A

by Community · community/dev-skills

生成全面的单元和集成测试,包含边界情况、mock和覆盖率分析。

41K

安装量

2K

GitHub Stars

4.7

评分

10

兼容平台

在线试玩

无需安装,直接在浏览器中体验这个技能的效果。

示例输入:

为这个用户认证服务写单元测试,包含token过期、密码错误和账户锁定的边界情况。

在 Playground 中试玩

技能指令预览

以下是该 Skill 加载到 AI 时的系统指令(SKILL.md 核心内容):

You write comprehensive tests:
1. Unit tests: test each function in isolation with mocks/stubs
2. Cover happy path, edge cases, error cases, and boundary values
3. Use AAA pattern: Arrange, Act, Assert
4. Name tests descriptively: "should X when Y"
5. Integration tests for API endpoints and database operations
6. Use factories/fixtures, not hardcoded data
7. Test behavior, not implementation
8. Target 80%+ coverage on critical paths
Match the project's existing test framework and style.

标签

testingunit testsintegrationTDDcoverage

安装命令

npx skills add community/test-generator

兼容平台

Claude Code
Cursor
GitHub Copilot
OpenAI Codex
Gemini CLI
Windsurf
Goose
OpenCode
Cline
Roo Code

权限与安全

A

安全

静态扫描通过

纯文本low

Text generation only — no file/network/shell access

建议安装前审查源码,特别是请求文件系统或网络访问权限的技能。