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 skills add JackyST0/awesome-agent-skills --skill unit-test-generatorgit clone --depth 1 https://github.com/JackyST0/awesome-agent-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/jackyst0/awesome-agent-skills/unit-test-generator)<a href="https://agentmods.dev/skills/jackyst0/awesome-agent-skills/unit-test-generator"><img src="https://agentmods.dev/badge/skills/jackyst0/awesome-agent-skills/unit-test-generator/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/jackyst0/awesome-agent-skills/unit-test-generator"><img src="https://agentmods.dev/badge/skills/jackyst0/awesome-agent-skills/unit-test-generator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What 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.1 | $0.00020 | $0.00897 |
| Opus 5 | $0.00010 | $0.00449 |
| Sonnet 5 | $0.00004 | $0.00179 |
| Haiku 4.5 | $0.00002 | $0.00090 |
Grade A, and why
unit-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 10d 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- unit-test-generator — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 126 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Unit Test Generator
根据源代码自动生成单元测试,支持多种语言和测试框架。
Automatically generate unit tests based on source code, supporting multiple languages and testing frameworks.
When to Use
当用户请求以下操作时使用此 skill:
- 生成单元测试 / Generate unit tests
- 为函数/类编写测试 / Write tests for functions/classes
- 创建测试用例 / Create test cases
- 提高代码覆盖率 / Improve code coverage
Instructions
分析步骤 / Analysis Steps
- 识别代码 - 确定编程语言和代码结构
- 分析功能 - 理解函数/方法的输入、输出和行为
- 确定边界 - 识别边界条件和边缘情况
- 选择框架 - 根据语言选择合适的测试框架
- 生成测试 - 编写全面的测试用例
支持的语言和框架 / Supported Languages
| 语言 | 测试框架 |
|---|---|
| Python | pytest, unittest |
| JavaScript/TypeScript | Jest, Mocha, Vitest |
| Java | JUnit, TestNG |
| Go | testing (built-in) |
| Rust | cargo test (built-in) |
测试类型 / Test Types
- 正常路径测试 - 验证预期行为
- 边界条件测试 - 测试边界值
- 异常处理测试 - 验证错误处理
- 空值/空输入测试 - 处理空值情况
输出格式 / Output Format
使用 templates/test-report.md 模板格式化输出。
Use the templates/test-report.md template to format output.
## 单元测试生成报告 / Unit Test Generation Report
### 分析概述 / Analysis Summary
[代码分析总结]
### 生成的测试 / Generated Tests
[测试代码]
### 测试覆盖说明 / Coverage Notes
- 覆盖的场景
- 建议补充的测试
Examples
输入 / Input
def divide(a: float, b: float) -> float:
if b == 0:
raise ValueError("Cannot divide by zero")
return a / b
输出 / Output
单元测试生成报告
分析概述
divide 函数执行除法运算,包含除零检查。需要测试正常除法、除零异常、边界值等情况。
生成的测试
import pytest
from your_module import divide
class TestDivide:
"""Tests for the divide function."""
def test_divide_positive_numbers(self):
"""Test division of positive numbers."""
assert divide(10, 2) == 5.0
assert divide(7, 2) == 3.5
def test_divide_negative_numbers(self):
"""Test division with negative numbers."""
assert divide(-10, 2) == -5.0
assert divide(10, -2) == -5.0
assert divide(-10, -2) == 5.0
def test_divide_by_zero_raises_error(self):
"""Test that dividing by zero raises ValueError."""
with pytest.raises(ValueError, match="Cannot divide by zero"):
divide(10, 0)
def test_divide_zero_numerator(self):
"""Test division when numerator is zero."""
assert divide(0, 5) == 0.0
def test_divide_float_precision(self):
"""Test division with floating point numbers."""
assert divide(1, 3) == pytest.approx(0.333333, rel=1e-5)
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 10d ago First seen · 126 lines · 20 tokens per session scan A e4a47f93cf61
unit-test-generator is a skill published in the GitHub repository JackyST0/awesome-agent-skills (633 stars, last pushed yesterday), licensed CC0-1.0. It adds 20 tokens to every session and 897 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
go-testing
Trigger: Go tests, go test coverage, Bubbletea teatest, golden files. Apply focused Go testing patterns.
testing
To write thorough, isolated, idempotent tests — 80%+ coverage, external-only mocking, scenario-driven.
coverage
Compute code coverage for active track or module. Targets 95%+ coverage with report and justification for uncovered lines. Complements TDD workflow.
code-testing-agent
Generates and writes new unit tests for any programming language using a Research-Plan-Implement pipeline. Use when asked to generate tests, write unit tests, add tests, improve test coverage, create test project, achieve high coverage, comprehensive tests, or asked to scaffold a new test project for an app, service…
godot-testing-patterns
Expert blueprint for testing patterns using GUT (Godot Unit Test), integration tests, mock/stub patterns, async testing, and validation techniques. Covers assert patterns, signal testing, and CI/CD integration. Use when implementing tests OR validating game logic. Keywords GUT, unit test, integration test, assert…
web3-testing
Test smart contracts comprehensively using Hardhat and Foundry with unit tests, integration tests, and mainnet forking. Use when testing Solidity contracts, setting up blockchain test suites, or validating DeFi protocols.