unit-test-generator

unit-test-generator is a skill for Claude Code, Codex from Bilal140202/the-lord-of-the-skills. It costs 20 tokens per session (897 once invoked), scanned A, a copy of unit-test-generator, MIT.

A tool that generates unit tests from existing source code and supports several programming languages and testing frameworks. Unit tests check small pieces of code, such as individual functions or classes, in isolation.

In plain words
What is it for?
Use it to create tests for Python, JavaScript or TypeScript, Java, Go, and Rust code using frameworks such as pytest, Jest, JUnit, or the languages' built-in tools.
Why use it?
It reduces the effort needed to identify normal cases, edge cases, invalid input, and error handling. This can help developers add tests and improve coverage without writing every case from scratch.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create tests for Python, JavaScript or TypeScript, Java, Go, and Rust code using frameworks such as pytest, Jest, JUnit, or the languages' built-in tools.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bilal140202/the-lord-of-the-skills/jackyst0__awesome-agent-skills
Install

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.

Any agent
npx skills add Bilal140202/the-lord-of-the-skills --skill jackyst0__awesome-agent-skills
Clone the repo
git clone --depth 1 https://github.com/Bilal140202/the-lord-of-the-skills

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for unit-test-generator

README.md
[![agentmods](https://agentmods.dev/badge/skills/bilal140202/the-lord-of-the-skills/jackyst0__awesome-agent-skills/github.svg)](https://agentmods.dev/skills/bilal140202/the-lord-of-the-skills/jackyst0__awesome-agent-skills)
Your own site
<a href="https://agentmods.dev/skills/bilal140202/the-lord-of-the-skills/jackyst0__awesome-agent-skills"><img src="https://agentmods.dev/badge/skills/bilal140202/the-lord-of-the-skills/jackyst0__awesome-agent-skills/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.

agentmods 80×15 button for unit-test-generator

Your own site · 80×15
<a href="https://agentmods.dev/skills/bilal140202/the-lord-of-the-skills/jackyst0__awesome-agent-skills"><img src="https://agentmods.dev/badge/skills/bilal140202/the-lord-of-the-skills/jackyst0__awesome-agent-skills.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 897 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 8d ago against content hash e4a47f93cf61, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

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 8d 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.

Origin

This is a copy

100% identical to unit-test-generator — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/gondor/claude-code/JackyST0__awesome-agent-skills/SKILL.md · 126 lines

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

  1. 识别代码 - 确定编程语言和代码结构
  2. 分析功能 - 理解函数/方法的输入、输出和行为
  3. 确定边界 - 识别边界条件和边缘情况
  4. 选择框架 - 根据语言选择合适的测试框架
  5. 生成测试 - 编写全面的测试用例

支持的语言和框架 / 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)

Read the full file on GitHub · 126 lines

Files

What ships with it

4 files 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.

Changes

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.

  1. 8d ago First seen · 126 lines · 20 tokens per session scan A e4a47f93cf61

Subscribe to this mod's changes

unit-test-generator is a skill published in the GitHub repository Bilal140202/the-lord-of-the-skills (4 stars, last pushed 6d ago), licensed MIT. 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. It is 100% identical to unit-test-generator, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

agent-tester

Agent skill for tester - invoke with $agent-tester.

ruvnet/ruflo · 15 tokens

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.

wshobson/agents · 46 tokens

nemo-automodel-recipe-development

Create and modify NeMo AutoModel training and evaluation recipes, including YAML structure, builders, and execution flow.

NVIDIA/skills · 31 tokens

neuron-test-engineer

Write tests for Neuron AI agents, RAG systems, workflows, and tools using the built-in testing utilities. Use this skill when the user mentions testing agents, writing unit tests, mocking AI providers, testing tool execution, verifying RAG retrieval, testing workflow behavior, or creating test cases for Neuron AI…

neuron-core/neuron-ai · 94 tokens

moai-ref-testing-pyramid

Test pyramid strategy, coverage targets, test patterns, and quality metrics reference. Agent-extending skill that amplifies manager-develop test-creation and quality-validation work with production-grade testing patterns. NOT for: production code implementation, architecture design, DevOps, security audits.

modu-ai/moai-adk · 61 tokens

java-unit-test

A code-generation guide for Java unit tests in Spring Boot projects. Unit tests check one small piece of code in isolation; Spring Boot is a Java framework for building web applications and services.

hashgraph-online/awesome-codex-plugins · 113 tokens