unit-testing-test-generate

unit-testing-test-generate is a skill for Claude Code from bugrabilge/bilge-development-kit. It costs 23 tokens per session (2,411 once invoked), scanned A, original, MIT.

A guide for generating unit tests: small automated checks that test individual functions or components in isolation. It focuses on coverage, edge cases, mocks, fixtures, and useful assertions.

In plain words
What is it for?
Use it to inspect existing code, identify missing test cases, generate tests across languages and frameworks, and check unusual inputs and error handling.
Why use it?
It helps find untested code paths and common input failures while keeping test suites organized and maintainable.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Use it to inspect existing code, identify missing test cases, generate tests across languages and frameworks, and check unusual inputs and error handling.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bugrabilge/bilge-development-kit/unit-testing-test-generate
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 bugrabilge/bilge-development-kit --skill unit-testing-test-generate
Clone the repo
git clone --depth 1 https://github.com/bugrabilge/bilge-development-kit

Made for: Claude Code.

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-testing-test-generate

README.md
[![agentmods](https://agentmods.dev/badge/skills/bugrabilge/bilge-development-kit/unit-testing-test-generate/github.svg)](https://agentmods.dev/skills/bugrabilge/bilge-development-kit/unit-testing-test-generate)
Your own site
<a href="https://agentmods.dev/skills/bugrabilge/bilge-development-kit/unit-testing-test-generate"><img src="https://agentmods.dev/badge/skills/bugrabilge/bilge-development-kit/unit-testing-test-generate/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-testing-test-generate

Your own site · 80×15
<a href="https://agentmods.dev/skills/bugrabilge/bilge-development-kit/unit-testing-test-generate"><img src="https://agentmods.dev/badge/skills/bugrabilge/bilge-development-kit/unit-testing-test-generate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,411 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found 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.00023 $0.02411
Opus 5 $0.00012 $0.01205
Sonnet 5 $0.00005 $0.00482
Haiku 4.5 $0.00002 $0.00241

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

Security

Grade A, and why

unit-testing-test-generate scanned grade A with 1 finding 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 5d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

result = subprocess.run(
Origin

Copies of this mod

2 near-identical copies found in the catalogue:

skills/unit-testing-test-generate/SKILL.md · 322 lines

How it starts

The opening of the file, as written. The whole thing — 322 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Automated Unit Test Generation

You are a test automation expert specializing in generating comprehensive, maintainable unit tests across multiple languages and frameworks. Create tests that maximize coverage, catch edge cases, and follow best practices for assertion quality and test organization.

Use this skill when

  • You need unit tests for existing code
  • You want consistent test structure and coverage
  • You need mocks, fixtures, and edge-case validation

Do not use this skill when

  • You only need integration or E2E tests
  • You cannot access the source code under test
  • Tests must be hand-written for compliance reasons

Context

The user needs automated test generation that analyzes code structure, identifies test scenarios, and creates high-quality unit tests with proper mocking, assertions, and edge case coverage. Focus on framework-specific patterns and maintainable test suites.

Requirements

$ARGUMENTS

Instructions

1. Analyze Code for Test Generation

Scan codebase to identify untested code and generate comprehensive test suites:

import ast
from pathlib import Path
from typing import Dict, List, Any

class TestGenerator:
    def __init__(self, language: str):
        self.language = language
        self.framework_map = {
            'python': 'pytest',
            'javascript': 'jest',
            'typescript': 'jest',
            'java': 'junit',
            'go': 'testing'
        }

    def analyze_file(self, file_path: str) -> Dict[str, Any]:
        """Extract testable units from source file"""
        if self.language == 'python':
            return self._analyze_python(file_path)
        elif self.language in ['javascript', 'typescript']:
            return self._analyze_javascript(file_path)

    def _analyze_python(self, file_path: str) -> Dict:
        with open(file_path) as f:
            tree = ast.parse(f.read())

        functions = []
        classes = []

        for node in ast.walk(tree):
            if isinstance(node, ast.FunctionDef):
                functions.append({
                    'name': node.name,
                    'args': [arg.arg for arg in node.args.args],
                    'returns': ast.unparse(node.returns) if node.returns else None,
                    'decorators': [ast.unparse(d) for d in node.decorator_list],
                    'docstring': ast.get_docstring(node),
                    'complexity': self._calculate_complexity(node)
                })
            elif isinstance(node, ast.ClassDef):
                methods = [n.name for n in node.body if isinstance(n, ast.FunctionDef)]
                classes.append({
                    'name': node.name,
                    'methods': methods,
                    'bases': [ast.unparse(base) for base in node.bases]
                })

        return {'functions': functions, 'classes': classes, 'file': file_path}

Read the full file on GitHub · 322 lines

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. 5d ago First seen · 322 lines · 23 tokens per session scan A 1c119fee07f1

Subscribe to this mod's changes

unit-testing-test-generate is a skill published in the GitHub repository bugrabilge/bilge-development-kit (10 stars, last pushed 4mo ago), licensed MIT. It adds 23 tokens to every session and 2,411 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.