Test Generator

Test Generator is a skill for Claude Code from Razaib-khan/ForgeWeave. It costs 23 tokens per session (593 once invoked), scanned A, original, MIT.

A workflow that creates unit, integration, and edge-case tests from existing or planned code.

In plain words
What is it for?
It is for analyzing code, generating test files, identifying coverage gaps, and explaining how to run the tests.
Why use it?
It helps find untested behavior and adds regression tests after bugs or new features are introduced.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions OpenCode.

Good fit It is for analyzing code, generating test files, identifying coverage gaps, and explaining how to run the tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/razaib-khan/forgeweave/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.

agentmods
npx agentmods add skills/razaib-khan/forgeweave/test-generator
Any agent
npx skills add Razaib-khan/ForgeWeave --skill test-generator
Clone the repo
git clone --depth 1 https://github.com/Razaib-khan/ForgeWeave

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 Test Generator

README.md
[![agentmods](https://agentmods.dev/badge/skills/razaib-khan/forgeweave/test-generator.svg)](https://agentmods.dev/skills/razaib-khan/forgeweave/test-generator)
Your own site
<a href="https://agentmods.dev/skills/razaib-khan/forgeweave/test-generator"><img src="https://agentmods.dev/badge/skills/razaib-khan/forgeweave/test-generator.svg" alt="Measured on agentmods" 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 593 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00593
Opus 5 $0.00012 $0.00296
Sonnet 5 $0.00005 $0.00119
Haiku 4.5 $0.00002 $0.00059

Measured 6d ago against content hash 6150a6604bed, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 6d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/detect_framework.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

src/forgeweave/templates/claude/.claude/skills/test-generator/SKILL.md · 83 lines

How it starts

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

Test Generator

Purpose

Analyze existing or planned code and produce comprehensive test suites. Covers unit tests for individual functions, integration tests for module interactions, and edge case tests for boundary conditions. Detects the project's test framework automatically.

When to Use

  • New code has been written without tests
  • Existing code lacks coverage in critical paths
  • A bug was fixed and a regression test is needed
  • The user explicitly asks for tests

When Not to Use

  • The code is prototype or throwaway
  • The user asked for debugging, not testing
  • The testing strategy needs architectural design first

Inputs

Input Type Required Description
target string Yes File, module, or feature to test
type enum No (default: all) unit, integration, edge-case, all
framework string No Test framework (auto-detected if omitted)

Expected Outputs

Output Description
Test files New test files following project conventions
Coverage report What's covered and what's not
Test run command How to execute the tests

Exact Workflow Steps

  1. Detect test framework from project config (Jest, Vitest, pytest, etc.)
  2. Read the target code and identify all exported functions, classes, and behaviors
  3. For each function: test happy path, error cases, edge cases (empty input, null, boundaries)
  4. Create test file following existing test conventions (naming, location, patterns)
  5. Mock external dependencies (APIs, databases, file system)
  6. Run tests to confirm they pass

Required Checks

  • All tests pass
  • Edge cases are covered (not just happy path)
  • Mocks are used for external dependencies
  • Tests are deterministic (no flaky tests)

Failure Modes

Failure Condition Response
Test framework not detectable Ask user to specify framework
Tests fail due to code bugs Report failing tests and suggest fixes
Mock is too complex Suggest integration test instead of mocked unit test

Read the full file on GitHub · 83 lines

Files

What ships with it

2 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. 6d ago First seen · 83 lines · 23 tokens per session scan A 6150a6604bed

Subscribe to this mod's changes

Test Generator is a skill published in the GitHub repository Razaib-khan/ForgeWeave (1 stars, last pushed 2mo ago), licensed MIT. It adds 23 tokens to every session and 593 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-31.