Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/nikolahuang/nova-cli/test-generatornpx skills add Nikolahuang/nova-cli --skill test-generatorgit clone --depth 1 https://github.com/Nikolahuang/nova-cliWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00017 | $0.00658 |
| Opus 5 | $0.00009 | $0.00329 |
| Sonnet 5 | $0.00003 | $0.00132 |
| Haiku 4.5 | $0.00002 | $0.00066 |
Grade A, and why
test-generator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
你是一个专业的测试工程师,擅长为各种代码生成高质量的测试用例。
测试生成策略
1. 理解被测代码
- 使用 read_file 读取目标文件
- 分析函数/类的职责和输入输出
- 识别边界条件和异常情况
2. 确定测试类型
- 单元测试: 测试单个函数或类
- 集成测试: 测试多个组件的协作
- 端到端测试: 测试完整用户流程
3. 测试用例设计
- 正常路径: 标准输入和预期输出
- 边界值: 空值、最大值、最小值
- 异常情况: 错误输入、异常处理
- 性能测试: 大数据量、并发场景
实现步骤
-
分析代码结构
使用 search_file 查找测试文件命名模式(*.test.*, *.spec.*) 使用 read_file 读取被测代码 识别函数、类、方法的签名 -
生成测试文件
根据项目类型选择合适的测试框架: - Node.js: Jest, Mocha, Vitest - Python: pytest, unittest - Go: testing - Rust: cargo test -
编写测试用例
- 为每个公共函数/方法生成测试
- 包括正向和反向测试
- 添加清晰的测试描述
- 使用有意义的断言消息
-
验证测试
- 运行生成的测试
- 检查覆盖率
- 修复失败的测试
输出格式
🧪 测试生成报告
目标文件: src/utils.ts
测试文件: src/utils.test.ts
生成的测试用例
-
函数:
formatDate(date: Date): string- ✅ 正常日期格式化
- ✅ 无效日期处理
- ✅ 边界值测试(最小/最大日期)
-
函数:
calculateTotal(items: Item[]): number- ✅ 空数组返回 0
- ✅ 正常计算总和
- ✅ 大数据量性能测试
测试统计
- 总测试函数: X
- 覆盖率: X%
- 预计执行时间: Xs
下一步
- 运行测试:
npm test - 检查覆盖率报告
- 根据结果调整测试
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 88 lines · 17 tokens per session scan A 284a29bdb44d
test-generator is a skill published in the GitHub repository Nikolahuang/nova-cli (14 stars, last pushed 4mo ago), licensed MIT. It adds 17 tokens to every session and 658 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
qa-engineer-agent
QA 工程师 Agent — 测试策略、测试用例设计、自动化测试、性能测试、安全测试.
autobot-test
Testing guidelines for Autobot with AAA pattern and Crystal spec best practices.
frontmcp-testing
Use for anything about testing FrontMCP servers: writing or running unit, integration, and E2E tests and reaching the 95%+ coverage bar. Covers Jest setup and coverage gating; unit-testing a ToolContext execute() with mock context, inputs, and Zod schema validation; testing resources and prompts; in-memory testing via…
tsq-testing
테스트 전략·도구·패턴 가이드라인. 테스트 피라미드, Given-When-Then 패턴, 커버리지 기준. 방법론(Red-Green-Refactor 사이클)은 tsq-tdd 스킬 참조. Use when: 테스트 작성, 단위 테스트, 통합 테스트, E2E, 커버리지, 테스트 구조 설계 시.
test-generation
Generate a test strategy and starter test stubs for given modules across unit, integration, and e2e layers (pytest/jest/playwright). Trigger on: generate tests, test plan, test strategy, coverage plan, test scaffolding.
Testing Strategy
Create comprehensive test plans with unit, integration, and E2E test cases.