test-generator

test-generator is a skill for Claude Code, Codex from sourav15mukherjee/skillforge-free-skills. It costs 53 tokens per session (520 once invoked), scanned A, original, MIT.

A coding helper that creates unit tests for individual functions or modules and integration tests for parts working together. It detects the project's testing tool and covers normal cases, edge cases, and errors.

In plain words
What is it for?
Use it when adding tests or test coverage for code, including functions that call APIs, databases, or files.
Why use it?
It removes the work of planning a test suite from scratch and helps avoid missing unusual inputs or failure paths. It also checks existing tests to match their style and avoid duplication.

Skill for Claude CodeCodex

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

Good fit Use it when adding tests or test coverage for code, including functions that call APIs, databases, or files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sourav15mukherjee/skillforge-free-skills/test-generator
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 sourav15mukherjee/skillforge-free-skills --skill test-generator
Clone the repo
git clone --depth 1 https://github.com/sourav15mukherjee/skillforge-free-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 test-generator

README.md
[![agentmods](https://agentmods.dev/badge/skills/sourav15mukherjee/skillforge-free-skills/test-generator/github.svg)](https://agentmods.dev/skills/sourav15mukherjee/skillforge-free-skills/test-generator)
Your own site
<a href="https://agentmods.dev/skills/sourav15mukherjee/skillforge-free-skills/test-generator"><img src="https://agentmods.dev/badge/skills/sourav15mukherjee/skillforge-free-skills/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.

agentmods 80×15 button for test-generator

Your own site · 80×15
<a href="https://agentmods.dev/skills/sourav15mukherjee/skillforge-free-skills/test-generator"><img src="https://agentmods.dev/badge/skills/sourav15mukherjee/skillforge-free-skills/test-generator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 520 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 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.00053 $0.00520
Opus 5 $0.00026 $0.00260
Sonnet 5 $0.00011 $0.00104
Haiku 4.5 $0.00005 $0.00052

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

Security

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

test-generator/SKILL.md · 61 lines

What it actually says

Test Generator

Generate thorough test suites by analyzing source code and producing tests that cover happy paths, edge cases, and error scenarios.

Workflow

  1. Detect the testing framework Look for configuration files and existing tests:

    • jest.config.* or vitest.config.* → Jest/Vitest
    • pytest.ini or conftest.py → Pytest
    • *_test.go files → Go testing
    • *.test.ts, *.spec.ts → TypeScript testing

    Also check package.json for test scripts and dependencies.

  2. Read the source code Read the file(s) the user wants tested. Understand:

    • Function signatures and return types
    • Dependencies and imports
    • Side effects (API calls, DB queries, file I/O)
    • Edge cases (null inputs, empty arrays, boundary values)
  3. Read existing tests (if any) Check for existing test files to match style and avoid duplication.

  4. Generate tests covering:

    • Happy path: Normal expected behavior with typical inputs
    • Edge cases: Empty inputs, null/undefined, boundary values, large inputs
    • Error handling: Invalid inputs, thrown exceptions, rejected promises
    • Integration points: Mock external dependencies appropriately
  5. Write the test file Follow the project's naming convention (e.g., foo.test.ts or test_foo.py).

Rules

  • Match the existing test style in the project
  • Use descriptive test names: it("should return empty array when input is null")
  • Group related tests with describe blocks
  • Mock external dependencies (APIs, databases) — never call real services
  • Include setup/teardown when needed
  • Aim for 80%+ code coverage of the target file
  • Add comments explaining WHY a test exists for non-obvious cases
  • Always run the tests after generating to verify they pass
Files

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.

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. 12d ago First seen · 61 lines · 53 tokens per session scan A dcef102f9c9f

Subscribe to this mod's changes

test-generator is a skill published in the GitHub repository sourav15mukherjee/skillforge-free-skills (5 stars, last pushed 5mo ago), licensed MIT. It adds 53 tokens to every session and 520 once invoked, about $0.0003 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-31.